From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7286A0C47; Wed, 27 Oct 2021 11:00:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A46B94068C; Wed, 27 Oct 2021 11:00:21 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id A441F4068C for ; Wed, 27 Oct 2021 11:00:19 +0200 (CEST) Received: from localhost.localdomain (unknown [5.144.122.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 4AFFD7F5F5; Wed, 27 Oct 2021 12:00:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 4AFFD7F5F5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1635325218; bh=E+YMKLjGy6gS878IotajAw/JJfKJHqcEGUj3yDAH+PQ=; h=From:To:Cc:Subject:Date; b=a/+gx+fUJgVZe1Zdy9P/iRK4ovl2nlg0fZ8Mn/oUyjStbX1WanlqVk+YYCcx9XOuQ s75G2j6+MuAuWzxxf1ZxT0+7v9mDC0iTVFJ9qfKts98q1RPCupy2OXVNjCBB4FRp77 DfXldE5ScbRwNgSsdUJhlGH/7xmPu3YdOqlmtH8E= From: Ivan Malov To: dev@dpdk.org Cc: David Marchand , Thomas Monjalon , Ferruh Yigit , Ori Kam , Andrew Rybchenko Date: Wed, 27 Oct 2021 12:00:03 +0300 Message-Id: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick transfer proxy API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There are PMDs which do not support flow offloads at all. In such cases, the API in question returns ENOTSUP. This is too loud. Restructure the code to avoid spamming logs. Fixes: 1179f05cc9a0 ("ethdev: query proxy port to manage transfer flows") Signed-off-by: Ivan Malov --- lib/ethdev/rte_flow.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index d268784532..9d98d2d716 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -1335,10 +1335,7 @@ rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); struct rte_eth_dev *dev; - if (unlikely(ops == NULL)) - return -rte_errno; - - if (ops->pick_transfer_proxy == NULL) { + if (ops == NULL || ops->pick_transfer_proxy == NULL) { *proxy_port_id = port_id; return 0; } -- 2.20.1