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 0BCF9A0543; Tue, 4 Oct 2022 09:52:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E6D140DDC; Tue, 4 Oct 2022 09:52:56 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 64B2640A87 for ; Tue, 4 Oct 2022 09:52:55 +0200 (CEST) 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 BF01D5D; Tue, 4 Oct 2022 10:52:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru BF01D5D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1664869974; bh=nVkAY7zf1mafigJN/YT2B0Ib9QX1NxbXwOpbZEsbpMA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nFB30oCJH04DFNRV4qc4JshGA7zp6rwYtA3sCePLNuFqrqNg94DDoaMbQqR6NfDQb RYEo1zsye7SL+tHOk22mx3B4LKO/6luyy0C+EhbxLhokkHjsCJUHapnzKG1JuzpN3Q 7A0F4k0SE123/2AKBxyBxPD9N1CoS3yeXpke462Q= Message-ID: Date: Tue, 4 Oct 2022 10:52:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v7 1/4] ethdev: introduce protocol header API Content-Language: en-US To: "Wang, YuanX" , "dev@dpdk.org" , Thomas Monjalon , Ferruh Yigit , Ray Kinsella Cc: "ferruh.yigit@xilinx.com" , "Li, Xiaoyun" , "Singh, Aman Deep" , "Zhang, Yuying" , "Zhang, Qi Z" , "Yang, Qiming" , "jerinjacobk@gmail.com" , "viacheslavo@nvidia.com" , "stephen@networkplumber.org" , "Ding, Xuan" , "hpothula@marvell.com" , "Tang, Yaqi" , Wenxuan Wu References: <20220812181552.2908067-1-yuanx.wang@intel.com> <20221001210521.15955-1-yuanx.wang@intel.com> <20221001210521.15955-2-yuanx.wang@intel.com> <03471965-b295-67c5-cd9f-7cfd0e421b51@oktetlabs.ru> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: 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 10/4/22 05:21, Wang, YuanX wrote: > Hi Andrew, > >> -----Original Message----- >> From: Andrew Rybchenko >> Sent: Monday, October 3, 2022 3:04 PM >> To: Wang, YuanX ; dev@dpdk.org; Thomas >> Monjalon ; Ferruh Yigit ; >> Ray Kinsella >> Cc: ferruh.yigit@xilinx.com; Li, Xiaoyun ; Singh, Aman >> Deep ; Zhang, Yuying >> ; Zhang, Qi Z ; Yang, >> Qiming ; jerinjacobk@gmail.com; >> viacheslavo@nvidia.com; stephen@networkplumber.org; Ding, Xuan >> ; hpothula@marvell.com; Tang, Yaqi >> ; Wenxuan Wu >> Subject: Re: [PATCH v7 1/4] ethdev: introduce protocol header API >> >> On 10/2/22 00:05, Yuan Wang wrote: >>> Add a new ethdev API to retrieve supported protocol headers of a PMD, >>> which helps to configure protocol header based buffer split. >>> >>> Signed-off-by: Yuan Wang >>> Signed-off-by: Xuan Ding >>> Signed-off-by: Wenxuan Wu >>> Reviewed-by: Andrew Rybchenko >>> --- >>> doc/guides/rel_notes/release_22_11.rst | 5 ++++ >>> lib/ethdev/ethdev_driver.h | 15 ++++++++++++ >>> lib/ethdev/rte_ethdev.c | 33 ++++++++++++++++++++++++++ >>> lib/ethdev/rte_ethdev.h | 30 +++++++++++++++++++++++ >>> lib/ethdev/version.map | 3 +++ >>> 5 files changed, 86 insertions(+) >>> >>> diff --git a/doc/guides/rel_notes/release_22_11.rst >>> b/doc/guides/rel_notes/release_22_11.rst >>> index 0231959874..6a7474a3d6 100644 >>> --- a/doc/guides/rel_notes/release_22_11.rst >>> +++ b/doc/guides/rel_notes/release_22_11.rst >>> @@ -96,6 +96,11 @@ New Features >>> * Added ``rte_event_eth_tx_adapter_queue_stop`` to stop the Tx >> Adapter >>> from enqueueing any packets to the Tx queue. >>> >>> +* **Added new ethdev API for PMD to get buffer split supported >>> +protocol types.** >>> + >>> + * Added ``rte_eth_buffer_split_get_supported_hdr_ptypes()``, to get >> supported >>> + header protocols of a PMD to split. >>> + >> >> ethdev features should be grouped together in release notes. >> I'll fix it on applying if a new version is not required. > > We will send a new version. For the doc changes, I don't understand your point very well. > Since will be no new changes to the code within this patch, could you help to adjust the doc? > Thanks very much. Please, read a comment just after 'New Features' section start. Hopefully it will make my note clearer. Anyway, don't worry about it a lot. I can easily fix it on applying. > >> >> [snip] >> >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index >>> 0c2c1088c0..1f0a7f8f3f 100644 >>> --- a/lib/ethdev/rte_ethdev.c >>> +++ b/lib/ethdev/rte_ethdev.c >>> @@ -6002,6 +6002,39 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE >> *file) >>> return eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, >> file)); >>> } >>> >>> +int >>> +rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, >>> +uint32_t *ptypes, int num) { >>> + int i, j; >>> + struct rte_eth_dev *dev; >>> + const uint32_t *all_types; >>> + >>> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>> + dev = &rte_eth_devices[port_id]; >>> + >>> + if (ptypes == NULL && num > 0) { >>> + RTE_ETHDEV_LOG(ERR, >>> + "Cannot get ethdev port %u supported header >> protocol types to NULL when array size is non zero\n", >>> + port_id); >>> + return -EINVAL; >>> + } >>> + >>> + if (*dev->dev_ops->buffer_split_supported_hdr_ptypes_get == NULL) >>> + return -ENOTSUP; >>> + all_types = >>> +(*dev->dev_ops->buffer_split_supported_hdr_ptypes_get)(dev); >>> + >>> + if (!all_types) >> >> Should be compared with NULL explicitly as coding standard says. I can fix it >> on applying as well. > > Sure, I will fix in v8. > >> >> [snip]