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 1A262A0547; Tue, 26 Oct 2021 17:47:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0073B40E0F; Tue, 26 Oct 2021 17:47:26 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 8B953407FF for ; Tue, 26 Oct 2021 17:47:24 +0200 (CEST) Received: from [100.65.5.102] (unknown [5.144.123.126]) (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 E76E37F5FD; Tue, 26 Oct 2021 18:47:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E76E37F5FD DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1635263244; bh=miXHIuQmsaEGzpGJPh4h/XWapKPwWhnoLlkr0u2FMG0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=W/zK7UynJuCJ8G3HXZiK8oCZ5JEOuKLY7zSS/eL7VvrlbUGMKq1f+8F99NtGGUICF P4mXHE6LXTGyDXuK3JG0e0yJTrVv09cmE41ng+WbSTEQA+ltzk8boEIspr7CEJd99n rSGs9RPlLK685o5aJIguRVToQqE90jNyQ2bFrYtY= To: David Marchand Cc: dev , Ferruh Yigit , Andrew Rybchenko , Ori Kam , Xiaoyun Li , Thomas Monjalon , Ray Kinsella References: <20211005003604.31684-1-ivan.malov@oktetlabs.ru> <20211014032146.23234-1-ivan.malov@oktetlabs.ru> From: Ivan Malov Message-ID: <52ec19b3-8765-ff61-1e29-3f0073ec0c17@oktetlabs.ru> Date: Tue, 26 Oct 2021 18:47:18 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] ethdev: add API to query proxy port to manage transfer flows 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" Hi David, On 26/10/2021 17:46, David Marchand wrote: > On Thu, Oct 14, 2021 at 5:22 AM Ivan Malov wrote: >> >> Not all DPDK ports in a given switching domain may have the >> privilege to manage "transfer" flows. Add an API to find a >> port with sufficient privileges by any port in the domain. >> >> Signed-off-by: Ivan Malov >> Reviewed-by: Andrew Rybchenko >> Acked-by: Ori Kam >> --- >> Patch series [1] has reworked support for "transfer" flows. >> This allows to elaborate on the idea which first appeared >> in RFC [2]. Hence the patch in question. >> >> net/sfc driver is going to support the new API. The >> corresponding patch is already in progress and will >> be provided in the course of this release cycle. >> >> [1] https://patches.dpdk.org/project/dpdk/list/?series=19608 >> [2] https://patches.dpdk.org/project/dpdk/list/?series=18737 >> > > [snip] > >> @@ -568,6 +568,25 @@ eth_rx_metadata_negotiate_mp(uint16_t port_id) >> } >> } >> >> +static void >> +flow_pick_transfer_proxy_mp(uint16_t port_id) >> +{ >> + struct rte_port *port = &ports[port_id]; >> + int ret; >> + >> + port->flow_transfer_proxy = port_id; >> + >> + if (!is_proc_primary()) >> + return; >> + >> + ret = rte_flow_pick_transfer_proxy(port_id, &port->flow_transfer_proxy, >> + NULL); >> + if (ret != 0) { >> + fprintf(stderr, "Error picking flow transfer proxy for port %u: %s - ignore\n", >> + port_id, rte_strerror(-ret)); >> + } >> +} > > I did not follow this subject, but I find it odd to get a warning > regardless of what is done in testpmd. > Like simply running a forwarding test with null pmd, I get: The API is meant to avoid returning error when the PMD does not support the corresponding method. However, it has to return error when the PMD does not support flow API at all (rte_flow_ops_get() failure). I guess, this is exactly what happens in your case. net/null does not support "flow_ops_get", and the API in question forwards error from rte_flow_ops_get(). Non-dummy PMDs should not trigger the error you see. > > $ ./devtools/test-null.sh > EAL: Detected CPU lcores: 8 > EAL: Detected NUMA nodes: 1 > EAL: Detected static linkage of DPDK > EAL: Multi-process socket /run/user/114840/dpdk/rte/mp_socket > EAL: Selected IOVA mode 'VA' > Interactive-mode selected > Auto-start selected > > vvvv > Error picking flow transfer proxy for port 0: Function not implemented - ignore > Error picking flow transfer proxy for port 1: Function not implemented - ignore > ^^^^ > > testpmd: create a new mbuf pool : n=2048, size=2176, socket=0 > testpmd: preferred mempool ops selected: ring_mp_mc > Configuring Port 0 (socket 0) > Port 0: 12:C9:63:52:5A:8B > Configuring Port 1 (socket 0) > Port 1: 92:69:E3:1E:31:82 > Checking link statuses... > > -- Ivan M