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 29327A0543; Tue, 6 Sep 2022 14:18:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF49D40143; Tue, 6 Sep 2022 14:18:11 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2049.outbound.protection.outlook.com [40.107.220.49]) by mails.dpdk.org (Postfix) with ESMTP id CD3D5400D6 for ; Tue, 6 Sep 2022 14:18:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdATGl8PsG2kb7TcvWZxNNwmKNZn1lizuP4r6sXpCE6CxGRNl+S7GgYrwChArg81eC3Ryjrfut+/P4Cy8PHj6VmEEqewRyTekkuIzEYrBduH5JJTwed5Pf6AK/+Gx73XE7QlVhG+grk3qibBXbRB7WWK8q+QP5APmIV5hT3xYCIx+RbtENtJcAUfnv2gZ/4wsgygD5iNUR1mPDxJAUKLBH2vWa5eIeZr+O40QiCk6wjyRvPTigxbcEc5LQQN0ME1A252+BHUr/YCVa98ZAV93UKhYCzyfPNNOBDETWOPUKQvScdBZRYAxWG6K6gWgyDnCiRVj3MkDY3v9lAEItrB0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GevNneMtmZi8HYVgWgj43Vm/wFA0Oek8n5k/GTjCxmM=; b=BAw0FFy3xr91TVzQzjakjkG97FqcBO2sSurf6cdXXqjZk2VI88+WWVn5jsG7Ll0GlHGOTpQ09p8yPrKT/JxEG8VhEcwT/J4/2k8VYtJHBQSPoW1PLG2c3LG7TnddvMKIQzJtffhrMBwP84SB7bCvthXR2XLb6cceHjaN9N/FOa0n2KrqknnxbL4EGu8S5o2qIPPOusd9xL3izCzLMgHghrFXqQJO3i9ueTuYvkO5tbZPcOYaBNbwm4KRTqkMIed6fUYMadCt4eOuiXM1YIqisLRCTFQwQoPblVdoymk8Ru1J9dHhMssSaWnOwogbw1ta0DbV2TeqxcKSYEhDIucCsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=marvell.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GevNneMtmZi8HYVgWgj43Vm/wFA0Oek8n5k/GTjCxmM=; b=I7tRcrbEoPTBfnmE501pkZ7/YWLzLjMe5MiA4SY+D+o4BVwNV9gF/VjXMteH9RpZNWKKTfGiDbCT89vdv6gv3IgPJlsWr8DCGzSiQkut0W53CpE75je/2hvIi8aFAgRZGCENUzUI3qWrtJeCysvmJK3o/gSQeiFecakNqvwsQQY= Received: from BN0PR04CA0194.namprd04.prod.outlook.com (2603:10b6:408:e9::19) by CO6PR02MB8802.namprd02.prod.outlook.com (2603:10b6:303:141::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12; Tue, 6 Sep 2022 12:18:08 +0000 Received: from BN1NAM02FT025.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e9:cafe::ef) by BN0PR04CA0194.outlook.office365.com (2603:10b6:408:e9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Tue, 6 Sep 2022 12:18:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT025.mail.protection.outlook.com (10.13.2.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Tue, 6 Sep 2022 12:18:07 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 6 Sep 2022 13:18:06 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Tue, 6 Sep 2022 13:18:05 +0100 Envelope-to: hpothula@marvell.com, xuan.ding@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org, wenxuanx.wu@intel.com, xiaoyun.li@intel.com, stephen@networkplumber.org, yuanx.wang@intel.com, mdr@ashroe.eu, yuying.zhang@intel.com, qi.z.zhang@intel.com, viacheslavo@nvidia.com, jerinj@marvell.com, ndabilpuram@marvell.com Received: from [10.71.194.74] (port=62406) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oVXWn-0004rI-ER; Tue, 06 Sep 2022 13:18:05 +0100 Message-ID: Date: Tue, 6 Sep 2022 13:18:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [EXT] Re: [PATCH v2 1/3] ethdev: introduce pool sort capability Content-Language: en-US To: Hanumanth Reddy Pothula , "Ding, Xuan" , Thomas Monjalon , Andrew Rybchenko CC: "dev@dpdk.org" , "Wu, WenxuanX" , "Li, Xiaoyun" , "stephen@networkplumber.org" , "Wang, YuanX" , "mdr@ashroe.eu" , "Zhang, Yuying" , "Zhang, Qi Z" , "viacheslavo@nvidia.com" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram References: <20220812104648.1019978-1-hpothula@marvell.com> <20220812172451.1208933-1-hpothula@marvell.com> <76e4091d-4037-ef5b-377f-7daa183e27d3@xilinx.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34512745-61b2-4440-8c8c-08da9001db84 X-MS-TrafficTypeDiagnostic: CO6PR02MB8802:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3hwE43hdyRdXZ7cMABMJe01wKPIqxtJ3JZMPKuamzeVJxrGs65KXVrHqfhsWk2AwI9RnEj7zXMc98Bb1QNldawa/EdAyvQVDR95VY86Gu5QDRMoGfBijEaJPUR6DJ7lPToEWXjjFFhGnB2NQ5bS1HkxywzK2kZJou18fpTcbwkxt+SiHdffegJHFQJyGzpdYru8AeDriJ70vgXtdMd3H2XGS7mYMhhBS3v95U7Ra/kjNxiP87JNHxlqaRJjAiz4y0reMO1Cb/1+735drF8CNl5Z5WZTn5YmiJ2mXIfOKwYP+XEqzmgLWd654QQDojbdGWgW3UW5CSudS6yXYyanjfbpZuIvSiDZXw8egUURiEMqMMwcNZjsKvYUfK9pyGRflr1EkiafE/NDp964E01qcb/zESegggu81j6o7Gk4vpbcnyImc5CXBrfeiO2tIdxEUk2ErrQCNPI/fn2VteWF4MyEU32mlD2rvS42bl9C2EhTN4NiC88QRXW/PbHmwIIdHMOiwRmPTGAAXgG9+HwIPk8lElIZLH/JX52Py0crfPaRVSPp8VyKq2vG9opG/Hx8FeQyAJS5qhJie6VtnvzZn5Nb8C4n8+bLt2mRBIPl0n5Bo9MqNKxp+q790GrSyBAqT7sOjYhWkbdwsVWEPVsSgblyqjj63yIEQV3KJiR5WkQW0hWidgU1y1cczuJkd9nP7dlYjmTNhoYi0DcHSLL3pZS3A/qXVOuApBsv6K8Km4w+wjysYu3RM+CY4gchAZrNSOPZHXRuKych4E4QAGQZl/CBYlqrLW5MB7kev9dzfMzItNgry9D+fg3+SuBQlfzNRhSoXfzhvfD2Bw2trP45YMQ== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(136003)(39860400002)(376002)(46966006)(36840700001)(40470700004)(316002)(31696002)(478600001)(4326008)(8676002)(70206006)(70586007)(36860700001)(2616005)(40480700001)(356005)(5660300002)(44832011)(7636003)(7416002)(2906002)(26005)(53546011)(82740400003)(82310400005)(40460700003)(41300700001)(426003)(8936002)(9786002)(54906003)(110136005)(31686004)(36756003)(336012)(47076005)(83380400001)(186003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2022 12:18:07.3297 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34512745-61b2-4440-8c8c-08da9001db84 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT025.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR02MB8802 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 8/30/2022 1:08 PM, Hanumanth Reddy Pothula wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Wednesday, August 24, 2022 9:04 PM >> To: Ding, Xuan ; Hanumanth Reddy Pothula >> ; Thomas Monjalon ; Andrew >> Rybchenko >> Cc: dev@dpdk.org; Wu, WenxuanX ; Li, Xiaoyun >> ; stephen@networkplumber.org; Wang, YuanX >> ; mdr@ashroe.eu; Zhang, Yuying >> ; Zhang, Qi Z ; >> viacheslavo@nvidia.com; Jerin Jacob Kollanukkaran ; >> Nithin Kumar Dabilpuram >> Subject: [EXT] Re: [PATCH v2 1/3] ethdev: introduce pool sort capability >> >> External Email >> >> ---------------------------------------------------------------------- > > > Thanks Ding Xuan and Ferruh Yigit for reviewing the changes and for providing your valuable feedback. > Please find responses inline. > >> On 8/23/2022 4:26 AM, Ding, Xuan wrote: >>> Hi Hanumanth, >>> >>>> -----Original Message----- >>>> From: Hanumanth Pothula >>>> Sent: Saturday, August 13, 2022 1:25 AM >>>> To: Thomas Monjalon ; Ferruh Yigit >>>> ; Andrew Rybchenko >>>> >>>> Cc: dev@dpdk.org; Ding, Xuan ; Wu, WenxuanX >>>> ; Li, Xiaoyun ; >>>> stephen@networkplumber.org; Wang, YuanX ; >>>> mdr@ashroe.eu; Zhang, Yuying ; Zhang, Qi Z >>>> ; viacheslavo@nvidia.com; jerinj@marvell.com; >>>> ndabilpuram@marvell.com; Hanumanth Pothula >>>> Subject: [PATCH v2 1/3] ethdev: introduce pool sort capability >>>> >>>> Presently, the 'Buffer Split' feature supports sending multiple >>>> segments of the received packet to PMD, which programs the HW to >>>> receive the packet in segments from different pools. >>>> >>>> This patch extends the feature to support the pool sort capability. >>>> Some of the HW has support for choosing memory pools based on the >>>> packet's size. The pool sort capability allows PMD to choose a memory >>>> pool based on the packet's length. >>>> >>>> This is often useful for saving the memory where the application can >>>> create a different pool to steer the specific size of the packet, >>>> thus enabling effective use of memory. >>>> >>>> For example, let's say HW has a capability of three pools, >>>> - pool-1 size is 2K >>>> - pool-2 size is > 2K and < 4K >>>> - pool-3 size is > 4K >>>> Here, >>>> pool-1 can accommodate packets with sizes < 2K >>>> pool-2 can accommodate packets with sizes > 2K and < 4K >>>> pool-3 can accommodate packets with sizes > 4K >>>> >>>> With pool sort capability enabled in SW, an application may create >>>> three pools of different sizes and send them to PMD. Allowing PMD to >>>> program HW based on packet lengths. So that packets with less than 2K >>>> are received on pool-1, packets with lengths between 2K and 4K are >>>> received on pool-2 and finally packets greater than 4K are received on pool- >> 3. >>>> >>>> The following two capabilities are added to the rte_eth_rxseg_capa >>>> structure, 1. pool_sort --> tells pool sort capability is supported by HW. >>>> 2. max_npool --> max number of pools supported by HW. >>>> >>>> Defined new structure rte_eth_rxseg_sort, to be used only when pool >>>> sort capability is present. If required this may be extended further >>>> to support more configurations. >>>> >>>> Signed-off-by: Hanumanth Pothula >>>> >>>> v2: >>>> - Along with spec changes, uploading testpmd and driver changes. >>> >>> Thanks for CCing. It's an interesting feature. >>> >>> But I have one question here: >>> Buffer split is for split receiving packets into multiple segments, >>> while pool sort supports PMD to put the receiving packets into different pools >> according to packet size. >>> Every packet is still intact. >>> >>> So, at this level, pool sort does not belong to buffer split. >>> And you already use a different function to check pool sort rather than check >> buffer split. >>> >>> Should a new RX offload be introduced? like >> "RTE_ETH_RX_OFFLOAD_POOL_SORT". >>> > Please find my response below. >> >> Hi Hanumanth, >> >> I had the similar concern with the feature. I assume you want to benefit from >> exiting config structure that gets multiple mempool as argument, since this >> feature also needs multiple mempools, but the feature is different. >> >> It looks to me wrong to check 'OFFLOAD_BUFFER_SPLIT' offload to decide if to >> receive into multiple mempool or not, which doesn't have anything related split. >> Also not sure about using the 'sort' keyword. >> What do you think to introduce new fetaure, instead of extending existing split >> one? > > Actually we thought both BUFFER_SPLIT and POOL_SORT are similar features where RX > pools are configured in certain way and thought not use up one more RX offload capability, > as the existing software architecture can be extended to support pool_sort capability. > Yes, as part of pool sort, there is no buffer split but pools are picked based on the buffer length. > > Since you think it's better to use new RX offload for POOL_SORT, will go ahead and implement the same. > >> This is optimisation, right? To enable us to use less memory for the packet >> buffer, does it qualify to a device offload? >> > Yes, its qualify as a device offload and saves memory. > Marvel NIC has a capability to receive packets on two different pools based on its length. > Below explained more on the same. >> >> Also, what is the relation with segmented Rx, how a PMD decide to use >> segmented Rx or bigger mempool? How can application can configure this? >> >> Need to clarify the rules, based on your sample, if a 512 bytes packet received, >> does it have to go pool-1, or can it go to any of three pools? >> > Here, Marvell NIC supports two HW pools, SPB(small packet buffer) pool and LPB(large packet buffer) pool. > SPB pool can hold up to 4KB > LPB pool can hold anything more than 4KB > Smaller packets are received on SPB pool and larger packets on LPB pool, based on the RQ configuration. > Here, in our case HW pools holds whole packet. So if a packet is divided into segments, lower layer > HW going to receive all segments of the packet and then going to place the whole packet in SPB/LPB pool, > based on the packet length. > If the packet is bigger than 4KB, you have two options, 1- Use multiple chained buffers in SPB 2- Use single LPB buffer As I understand (2) is used in this case, but I think we should clarify how this feature works with 'RTE_ETH_RX_OFFLOAD_SCATTER' offload, if it is requested by user. Or lets say HW has two pools with 1K and 2K sizes, what is expected with 4K packet, with or without scattered Rx offload? > As pools are picked based on the packets length we used SORT term. In case you have any better term(word), please suggest. > what about multiple pool, like RTE_ETH_RX_OFFLOAD_MULTIPLE_POOL, I think it is more clear but I would like to get more comments from others, naming is hard ;) >> >> And I don't see any change in the 'net/cnxk' Rx burst code, when >> multiple mempool used, while filling the mbufs shouldn't it check which >> mempool is filled. How this works without update in the Rx burst code, >> or am I missing some implementation detail? >> > Please find PMD changes in patch [v2,3/3] net/cnxk: introduce pool sort capability > Here, in control path, HW pools are programmed based on the inputs it received from the application. > Once the HW is programmed, packets are received on HW pools based the packets sizes. I was expecting to changes in datapath too, something like in Rx burst function check if spb or lpb is used and update mbuf pointers accordingly. But it seems HW doesn't work this way, can you please explain how this feature works transparent to datapath code? >> > > I will upload V3 where POOL_SORT is implemented as new RX OFFLOAD, unless If you have any other suggestion/thoughts. > <...>