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 4C7F7A0547; Tue, 26 Oct 2021 17:58:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D3C340E0F; Tue, 26 Oct 2021 17:58:57 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 8187A407FF for ; Tue, 26 Oct 2021 17:58:55 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0FDEA5C03C5; Tue, 26 Oct 2021 11:58:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 26 Oct 2021 11:58:55 -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= 44gJe4XFzqb3eapymXgxlb9X9wb+vCrX6nB9uYWVdlc=; b=tqUzFF74r9cL9L/3 NKkv/818NWu8juwoF1NTTtd4mliWver1MXMBtk4t/NrSAd5GDp1w4QPgh5L9mG5a yKZqeTJCEJ0lrHQBAGIBI6TIj0XT7z98+92VX2MVqq/RQ/AdbIZVwQzWF6u5Xehi vD6BcQdCb1NNFmQmunWkPrfGhu0FSLRbDJlK8R5B+f8AxdZEjiQROknAY59cSgsZ obPCozTFzlkE0vcNaV82zWoHnmG9ioDux2ShAFAqrgGDuSqleODML2pcJMBSsCpO /4U09TrroHoJwZLEAj1PzK0P7gDB7MyfuUuUJn2QFJILfdqOjW4b4r6siW7MivZQ DwimWw== 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=44gJe4XFzqb3eapymXgxlb9X9wb+vCrX6nB9uYWVd lc=; b=T9zOSdiXLMJSoHLYYubWKrKgrrcafg7kI900pogn51wuqRgJTzBhasdCo wUHupn0tlGcJMgYt7VtEWDHRD7wflu7U1CMY4Jck6loRpbvjMqLllvaVovlFSCXW V98vY3ZDfRdSZ3hAlNMScnD3vfwg6mLK56V95Uv02vRoPm1QC7fLewtHEJq6iN79 uwR6/GuGGalIKiNwxopzWACac72Sx3+4QuTC79iPeLuBMJyMosphP7MPFfgZPTUb OiUPzV/97v0Tm2Q2yt/9MNkwFat+hlR8vNaxQ9/i2AHkz4WglNJu7tfZv9SwQ0vv z+IexMQEGr5fyj3f0zfzSn0pw5H9Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefkedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepteduheduhffgleehtddvhfehfffhleeggeehvddthffhudegieeu hefffedufeegnecuffhomhgrihhnpehquhgvshhtihhonhdrnhgvthdpughpughkrdhorh hgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Oct 2021 11:58:52 -0400 (EDT) From: Thomas Monjalon To: Ivan Malov Cc: David Marchand , dev , Ferruh Yigit , Andrew Rybchenko , Ori Kam , Xiaoyun Li , Ray Kinsella Date: Tue, 26 Oct 2021 17:58:50 +0200 Message-ID: <2396318.f23G9BEs4G@thomas> In-Reply-To: <52ec19b3-8765-ff61-1e29-3f0073ec0c17@oktetlabs.ru> References: <20211005003604.31684-1-ivan.malov@oktetlabs.ru> <52ec19b3-8765-ff61-1e29-3f0073ec0c17@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 26/10/2021 17:47, Ivan Malov: > 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 > > ^^^^ We should avoid such meaningless error message. Please Ivan what do you suggest?