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 499C5A0C4E; Tue, 2 Nov 2021 16:45:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 110E54113F; Tue, 2 Nov 2021 16:45:49 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 29F8741139 for ; Tue, 2 Nov 2021 16:45:48 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CBC5E5C00E1; Tue, 2 Nov 2021 11:45:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 02 Nov 2021 11:45:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= jurzBIYBI+wclYKe2e0Xgz6V8xaY+RpvwB6ujEwmz6o=; b=NlSQm26mg5uq6kx6 1Is84GRPYhISTgEkALR+fENACAVOdYFDNiN79Lc/DCBu2p/9n0XGry/EpQ33NFTr /btZMk3Cl/1WEAMgwpfyjbEU4JK47E+Rs5EQ6YS0uW4VHxHcEkNjzQlKJMfNT4Pa yVSLZq5pRxRgOd6NkAjxr7ycQdMoiXbOSwiiDI7tK2PoEwaf4ELlWQD8u8TLtjrI /VjpxoyUyll4CP2C0S7stP00a29BJuIvvYVF75qPQk96Hie0eh25PY9OKPEc2q2O 0NQmBtHrcCq/W3uxzA3lTRJdd16ZHoq2ZrIFiVY+qBIQmisM2n0/FkJr2rgrtUZM 3H1y4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=jurzBIYBI+wclYKe2e0Xgz6V8xaY+RpvwB6ujEwmz 6o=; b=KBItOfxtIAccNjj8ZbY//AOga2ixVLSMu0bfhxduJL3E/ST/Lcv17NO0+ /rn/bV2r/8wVVmalkHzccDHnYsIux4OoDmjYpndzE3Q9EGAvZcoK5XBVnNzWhgm3 kX6HbMdXH/ylkPSknB35i7izRlAjiuRxhFZbtBZ+H3vRQOf66CZ3lAGz+4cyWOmO KlIhs2ybplWMg3VK6EhmHIcBwFSG4MoI6l1c7vIQMuyBg9e0iqAIkPEuvjO9EucA RL8S24wIEzdfBlWg40aCbJu/RceGMgHaS+5uyAe9CAJXSTtx0frOg9GLG+9HDx9s 4/PbV/5D9HJqAgTGdh1fVZsKwD7+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtddtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Nov 2021 11:45:46 -0400 (EDT) From: Thomas Monjalon To: Ivan Malov , Andrew Rybchenko Cc: dev@dpdk.org, David Marchand , Ferruh Yigit , Ori Kam Date: Tue, 02 Nov 2021 16:45:45 +0100 Message-ID: <2115605.bGoMZ7lrYc@thomas> In-Reply-To: <32956056-8804-046c-da59-119a6c378dd3@oktetlabs.ru> References: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> <32956056-8804-046c-da59-119a6c378dd3@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [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" 01/11/2021 10:41, Andrew Rybchenko: > On 10/27/21 12:00 PM, Ivan Malov wrote: > > 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) { > > First of all I think that the patch is wrong and origin code is better. > If flow API is not supported at all (ops == NULL), what's the point > to return some proxy port? > > > *proxy_port_id = port_id; > > return 0; > > } > > > > IMHO, spamming of testpmd logs in described case should be fixed > in testpmd itself to avoid logs in the case of ENOTSUP. That's it. I think we should not call this API in testpmd if not doing rte_flow transfer rule.