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 BF21DA0C57; Mon, 1 Nov 2021 10:41:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B140740DF6; Mon, 1 Nov 2021 10:41:04 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id D846140040 for ; Mon, 1 Nov 2021 10:41:03 +0100 (CET) Received: from [192.168.1.71] (unknown [188.170.83.209]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 2C3D07F529; Mon, 1 Nov 2021 12:41:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 2C3D07F529 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1635759663; bh=Cd0Ab49TNuETQHHUv1PY9MZwGPYpJUWia4Ilia1+8tU=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=pv1r5voUwbyKLJO357b5ad9jZ58JyMba+GYmeeWdzWuhQUVxGUdVX4LCu5wue4DdG o5ws1uYNqgmcWwe6zVrGgfieXo9jfk7yhIbmZ2B+u78BtKofAvqU0EnUspsWmrQC1e Mcik7s3MPr4IKsnAVVMVvkRjTuiLStfpN0ycAyp4= To: Ivan Malov , dev@dpdk.org Cc: David Marchand , Thomas Monjalon , Ferruh Yigit , Ori Kam References: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> From: Andrew Rybchenko Message-ID: <32956056-8804-046c-da59-119a6c378dd3@oktetlabs.ru> Date: Mon, 1 Nov 2021 12:41:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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" 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.