From patchwork Sun Mar 27 00:05:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 64507 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp805329lbc; Sat, 26 Mar 2016 17:05:26 -0700 (PDT) X-Received: by 10.50.6.111 with SMTP id z15mr3355941igz.21.1459037126165; Sat, 26 Mar 2016 17:05:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j86si17826466iod.12.2016.03.26.17.05.25; Sat, 26 Mar 2016 17:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 28A6A61981; Sun, 27 Mar 2016 00:05:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 58A9761935; Sun, 27 Mar 2016 00:05:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CB0D161956; Sun, 27 Mar 2016 00:05:18 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id EE58561879 for ; Sun, 27 Mar 2016 00:05:17 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id h6so77423624oia.2 for ; Sat, 26 Mar 2016 17:05:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eqIwCsBUp93j3eEu6HlG4GFQNJpoQqx33o516VPv2wc=; b=V4pGCcoSriKBo3jbuoe3qVlFIIWd1FOU+NKK6TuPVUBSfHN8wnlI6ybeZRxWL5f+oG Pxlxa8QPNYPLbS7dsaW4MuUaGHdAnttu3VaQYEgond7YLj7vJWTGZQDIoelH6Agul+fb ysp3e66kXx6Q4H47BHCofJke0gfAMj/Y+nKzZBHmJIExCQGCsZXeMGl8x5oMxjdDe6Sg gRV2v8LBL/BoJpBwFNzlJi5HywewAXs2T0qmWMb1I4Sxg50aAi3DD6ouVnyi41/ZrZUd 2aCzDn9gx4yAegXRBObaOhqsgbt+zTrYRd0uPVuJuMbCVWiqletg0MA41oBGSlRbmLm9 0J3A== X-Gm-Message-State: AD7BkJKzpTvP+bzVZE9JwwVrVzc/2xsmYe66B2H0aVEdrN7XvW0UH6s6VeFr0lQb5jcP0g7vNKg= X-Received: by 10.157.7.15 with SMTP id 15mr8626826ote.187.1459037117463; Sat, 26 Mar 2016 17:05:17 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id c16sm3979096oig.27.2016.03.26.17.05.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 26 Mar 2016 17:05:16 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 26 Mar 2016 19:05:14 -0500 Message-Id: <1459037114-4678-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: pktio: handle transient output queue nonempty conditions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Out queues are normally empty but any non-empty state should be very transient. Retry odp_queue_destroy() operation when performing destroy_out_queues() function to handle such cases. This addresses bug https://bugs.linaro.org/show_bug.cgi?id=2089 Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_packet_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 9192be2..b29623e 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -300,7 +300,9 @@ static void destroy_out_queues(pktio_entry_t *entry, int num) for (i = 0; i < num; i++) { if (entry->s.out_queue[i].queue != ODP_QUEUE_INVALID) { - odp_queue_destroy(entry->s.out_queue[i].queue); + while (odp_queue_destroy(entry->s.out_queue[i].queue) + != 0) + ; entry->s.out_queue[i].queue = ODP_QUEUE_INVALID; } }