From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 087BDC05027 for ; Wed, 1 Feb 2023 08:50:32 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10057406A2; Wed, 1 Feb 2023 09:50:32 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 81CFE4021F for ; Wed, 1 Feb 2023 09:50:30 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id BC7A050; Wed, 1 Feb 2023 11:50:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru BC7A050 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1675241429; bh=9TSH2sI1tmOGqtIBGX5AalcSQ8c2B3ulU0RfI7d/PD4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WIvwTV0y1z77vU/FYpgkAVwW4+9VQjMrCWs8Lq+kdsLAIASLD2fbN+eIHgMn3ialK NGj3ku2Dg8yWgHg0UY4Ua+oF41+9yt3ggJsVhYTiM6yz8ukdVRd9sYD1IyoNKNKV60 zqbFfZ1+L/56G7McdzJwYz2xDcjeyE7+4zRUsdKg= Message-ID: <0377ab58-b69e-e327-e2fc-5b96febdedaa@oktetlabs.ru> Date: Wed, 1 Feb 2023 11:50:29 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 1/2] ethdev: add PHY affinity match item Content-Language: en-US To: Jiawei Wang , viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net, Aman Singh , Yuying Zhang , Ferruh Yigit Cc: dev@dpdk.org, rasland@nvidia.com References: <20230130170041.1360-1-jiaweiw@nvidia.com> <20230130170041.1360-2-jiaweiw@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20230130170041.1360-2-jiaweiw@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 1/30/23 20:00, Jiawei Wang wrote: > For the multiple hardware ports connect to a single DPDK port (mhpsdp), Sorry, what is mhpsdp? > currently, there is no information to indicate the packet belongs to > which hardware port. > > This patch introduces a new phy affinity item in rte flow API, and "This patch introduces ..." -> "Introduce ..." rte -> RTE > the phy affinity value reflects the physical port of the received packets. > > While uses the phy affinity as a matching item in the flow, and sets the > same phy_affinity value on the tx queue, then the packet can be sent from tx -> Tx > the same hardware port with received. > > This patch also adds the testpmd command line to match the new item: > flow create 0 ingress group 0 pattern phy_affinity affinity is 1 / > end actions queue index 0 / end > > The above command means that creates a flow on a single DPDK port and > matches the packet from the first physical port (assume the phy affinity 1 Why is it numbered from 1, not 0? Anyway it should be defined in the documentation below. > stands for the first port) and redirects these packets into RxQ 0. > > Signed-off-by: Jiawei Wang [snip] > diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst > index c15f6fbb9f..a1abd67771 100644 > --- a/doc/guides/rel_notes/release_23_03.rst > +++ b/doc/guides/rel_notes/release_23_03.rst > @@ -69,6 +69,11 @@ New Features > ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter > required for eth_rx, eth_tx, crypto and timer eventdev adapters. > > +* **Added rte_flow support for matching PHY Affinity fields.** Why "Affinity", not "affinity"? > + > + For the multiple hardware ports connect to a single DPDK port (mhpsdp), > + Added ``phy_affinity`` item in rte_flow to support physical affinity of > + the packets. Please, add one more empty line to have two before the next section. > > Removed Items > ------------- [snip] > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index b60987db4b..56c04ea37c 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -2103,6 +2110,27 @@ static const struct rte_flow_item_meter_color rte_flow_item_meter_color_mask = { > }; > #endif > > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * > + * RTE_FLOW_ITEM_TYPE_PHY_AFFINITY > + * > + * For the multiple hardware ports connect to a single DPDK port (mhpsdp), > + * use this item to match the physical affinity of the packets. > + */ > +struct rte_flow_item_phy_affinity { > + uint8_t affinity; /**< physical affinity value. */ Sorry, I'd like to know how application should find out which values may be used here? How many physical ports are behind this one DPDK ethdev? Also, please, define which value should be used for the first port 0 or 1. I'd vote for 0.