From patchwork Tue Dec 13 18:53:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 87930 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2363821qgi; Tue, 13 Dec 2016 10:55:37 -0800 (PST) X-Received: by 10.176.82.212 with SMTP id w20mr82886889uaw.40.1481655337753; Tue, 13 Dec 2016 10:55:37 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f184si13687185vkc.56.2016.12.13.10.55.36; Tue, 13 Dec 2016 10:55:37 -0800 (PST) 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id EF16B60877; Tue, 13 Dec 2016 18:55:35 +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 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 40E4B60818; Tue, 13 Dec 2016 18:54:43 +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 5B34E60657; Tue, 13 Dec 2016 18:54:38 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id E074A62EA6 for ; Tue, 13 Dec 2016 18:53:57 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id t196so34027892lff.3 for ; Tue, 13 Dec 2016 10:53:57 -0800 (PST) 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:in-reply-to :references; bh=UHP2uxbwcQQHSxrgjUmoCyt5Lj/4lf9EccqLQRmgq0E=; b=O12/9uC3OKpzxlWZ7G7sdpwVcXrqz21dtzZVoxdDa7vZiJEGsdowdLpazLCffqiLfq r4JPs/J/TqLlgtLaJKxnR+jaBmqQK2q6TyfRovHI3w1OY/RaXfWUL15E3FHDMAUADUXQ O/lQs/0EkxdwfpIjOhu/xkU0+Saw4dmBUwRLWj8bNGnjuHlT1vU+EJGIYUUWJ3a/K2jz yMa/Co/83HULoA/CwPSsqQyrz1VzM0ipflBUSRL+KyrtNrIeq1Nru5FXuyoCUPEJCHA7 VNKpDk/T4BXfsAoRo3hg85Jo6ydaFteGaUMEPOdGE1n/BNvzXLKYoKul0B97iEGV3GFo wT6Q== X-Gm-Message-State: AKaTC02lXs2OL27W295O9wLk5E5iMIxdqO7YpMvD1V3AIg0XwBuijGnxNnRBXgeF4ToRH1XVITg= X-Received: by 10.25.18.165 with SMTP id 37mr5763609lfs.103.1481655236740; Tue, 13 Dec 2016 10:53:56 -0800 (PST) Received: from localhost.localdomain (ppp91-77-165-188.pppoe.mtu-net.ru. [91.77.165.188]) by smtp.gmail.com with ESMTPSA id f14sm5311888lff.40.2016.12.13.10.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Dec 2016 10:53:55 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 13 Dec 2016 21:53:37 +0300 Message-Id: <1481655217-30447-7-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 In-Reply-To: <1481655217-30447-1-git-send-email-maxim.uvarov@linaro.org> References: <1481655217-30447-1-git-send-email-maxim.uvarov@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv2 6/6] linux-gen: pktio ipc: fix warn on close 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" odp_pktio_close() on stopped pktio calls flush_in_queues() which call several recv() and treating negative return code as errors. Adjust pktio ipc code accordingly. Signed-off-by: Maxim Uvarov --- platform/linux-generic/pktio/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.1.250.gff4ea60 diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index f521016..9527795 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -430,7 +430,7 @@ static int ipc_pktio_recv_lockless(pktio_entry_t *pktio_entry, ready = odp_atomic_load_u32(&pktio_entry->s.ipc.ready); if (odp_unlikely(!ready)) { IPC_ODP_DBG("start pktio is missing before usage?\n"); - return -1; + return 0; } _ipc_free_ring_packets(pktio_entry, pktio_entry->s.ipc.tx.free);