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 E75C5A0C4E; Tue, 2 Nov 2021 16:59:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B74844113F; Tue, 2 Nov 2021 16:59:03 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C6AA141139 for ; Tue, 2 Nov 2021 16:59:01 +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) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id B1BFF7F4C4; Tue, 2 Nov 2021 18:59:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru B1BFF7F4C4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1635868741; bh=pGfQOfIqbYJhGbJSW1b+pp0n8TJPnd4pUACl/pabZF0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=WcFjz3FSBqjMhq4xk6OBTaidJbAhvn0+84qmTIGxnn8eI4v3N/m0je3kLllmhrgcH dP1IqXfge70FMifo19UEzXRNiZyJcBzdVUz8CrvuBYawfgrApqEKKZJh9zqCHqrhfR PqCHVIqLlBsxOJW/UhmgYu6+qGCRgugfqt1SkrKs= To: Thomas Monjalon , Ivan Malov Cc: dev@dpdk.org, David Marchand , Ferruh Yigit , Ori Kam References: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> <32956056-8804-046c-da59-119a6c378dd3@oktetlabs.ru> <2115605.bGoMZ7lrYc@thomas> From: Andrew Rybchenko Message-ID: <4cf45c3f-47df-b6c9-7f9e-2ce996878e45@oktetlabs.ru> Date: Tue, 2 Nov 2021 18:58:58 +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: <2115605.bGoMZ7lrYc@thomas> 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 11/2/21 6:45 PM, Thomas Monjalon wrote: > 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. > Since testpmd does not pursue top flow insertion rate etc, I tend to agree. For debugging purposes (testpmd main goal) the best way is to pick proxy just before usage without any caching etc.