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 F2CC1A0032; Fri, 16 Sep 2022 10:39:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E265740687; Fri, 16 Sep 2022 10:39:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 81A6040156 for ; Fri, 16 Sep 2022 10:39:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663317581; x=1694853581; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=UDEplj7zGFn5JeTsmUDnDPzw7MvitXX9s4+5G0RcnTM=; b=H2p7qnsXT+oBk1wwWjUSgI9l6cnQ7n12+6mXVDwkqDljn0EQZylQ3Cyl XZo//Rypj/TLttLjQm7O/tCpF6t/SfXa7bm2IwCSjglBcvN+mQeZ0O3XV 81h0xCGe3CJIvSnI3pW2erggdtW1/SBtCWv9M/vAw6SuqpEoe3o+jLWJ5 xyDtvohLfcHiY/fwLI9ztWmOoJDdIgHTyeJ+iSgQFaMAtn0jcIf3lvAH3 GmMkaVYlcmOELddocL0IJC2Th0B14HKKyMzBPtNhPF+HR1DnkYPOqJWxd saXhZwh/OR/p51V7lgkaBxx06hQ7PSsMhbce+ThuxFKj/Gjb9iyxl9uWd w==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="278674013" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="278674013" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 01:39:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="568759289" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 16 Sep 2022 01:39:40 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 16 Sep 2022 01:39:39 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Fri, 16 Sep 2022 01:39:39 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Fri, 16 Sep 2022 01:39:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajRbB5SuQE+HBa/ULJgTXQW5afqQXxOD67mCOJ9h4p8KXaUZaXIoU/fiwaxUyWgOQxX/WICkb9vR5JVZDeCs7Ahr3/srUXnuTuekn6sEkbRJ3JyVW9swywvxznSVBEkSqoiO7bqqRWIr9Lqzmxzaw5G8pmCcxTDNkgxbD6TVnDw/SkK2fEvIqVI4G4WQaGGnrXGhSd1KK3UQ50cNbBhleWFkPThBUYPM7JYvcx04bIsAfI/50rdzroEqVdbeDp2pGAcqDemal2lTQ5DhFy7uKk2E+890je91slVXSy7FSF5cd6lqk1JSSXmnQd6kjFXNGK8fCULUKffF0TAv2rLDHg== 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=7BYISAgj2Qu1N2Qqy45WUQRSJJrryP91pk5ZTx9+6hU=; b=oNM4/ct2+Ia9UP4kpD0blibeBMe9H3YPuujqCM83MNVvvgTyF+nHJHiQ93+e442dRF1Sci/cgN5HUcGL6KobbhRERPWpNzOeHrMcp7ghIe3xRr48XxdZrpbaS0+u8BSpGd9M19GsELzprZnTstSACwbaQMKiUhxWkL85PqyW/zVAj10/cTa6vKC8qVoRgej/E5x8n4/GaO/0V2YbvysMwhN1SyQyLvkqRCRndHx2TAl61LC/rQiSoRz5/E8Fxy6nRV1SE1eOPsb9Uf6y6TaBP3w1cXpbTTDE90nAK8gzAVodKwNtriUD4Scti5u/zGjsCJeqnlf0l8BQ4LC77uBmuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB6953.namprd11.prod.outlook.com (2603:10b6:510:204::6) by BL1PR11MB5554.namprd11.prod.outlook.com (2603:10b6:208:31d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Fri, 16 Sep 2022 08:39:36 +0000 Received: from PH7PR11MB6953.namprd11.prod.outlook.com ([fe80::3132:50b1:d7f7:a1ae]) by PH7PR11MB6953.namprd11.prod.outlook.com ([fe80::3132:50b1:d7f7:a1ae%7]) with mapi id 15.20.5612.022; Fri, 16 Sep 2022 08:39:35 +0000 From: "Wang, YuanX" To: Suanming Mou , "dev@dpdk.org" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit , Andrew Rybchenko CC: "mdr@ashroe.eu" , "Li, Xiaoyun" , "Singh, Aman Deep" , "Zhang, Yuying" , "Zhang, Qi Z" , "Yang, Qiming" , "jerinjacobk@gmail.com" , Slava Ovsiienko , "stephen@networkplumber.org" , "Ding, Xuan" , "hpothula@marvell.com" , "Tang, Yaqi" , Wenxuan Wu Subject: RE: [PATCH v3 2/4] ethdev: introduce protocol hdr based buffer split Thread-Topic: [PATCH v3 2/4] ethdev: introduce protocol hdr based buffer split Thread-Index: AQHYvr58j4LacoqSlU+GCOBl/R4u763dDzqAgAM7X9A= Date: Fri, 16 Sep 2022 08:39:35 +0000 Message-ID: References: <20220812181552.2908067-1-yuanx.wang@intel.com> <20220902191027.666923-1-yuanx.wang@intel.com> <20220902191027.666923-3-yuanx.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB6953:EE_|BL1PR11MB5554:EE_ x-ms-office365-filtering-correlation-id: 2f464f73-0082-4a09-da57-08da97befc4c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WoHfpKkTg5vqKVWnRllHH8j8xB7zPtn9Bpzp8bqqxmRwjUBOe+2yLZphlNiqpu1LJ6Sc6sm1jetuc/dB/dvKS14lnyu7Ig3aKx+2Q7GS5XQGdtiDDEb9ilfQfFFo5bkTk7dw1ul27IQ0mpI/JILjAD/GqNChkwKAIpoAcZeBcBH4omb/i1qTxM/IY47Z7pFvzAk8N0A3/BuL6vCMO0xEfTlWsRr7OMhZP+VD7lzY0Dm5jF7w2Vw5SuHw6HZSh5luOcx7KuiMIONtMM+B38LOp6rBrvJYC9h1GFeoLXGwdIuRJ0Saed1CrlnIk84r7NK6NITnBvlFUCmanxGPQQKQvLIjUtRfFB/zoc84qyVBtjOXFgi7zg6qVS+O6zD8UF42iDcazCqhQMB0zBl3Fnevhn3eBPs08BdD3pp3ksAobiV0mejjK8fCdMgO5fEgLpU5tyFiyaCymiUWh5UdVnarTB8T+HVyO3MfMyZParKrquVDOx0VqmhNgMz+lv8Tp4LItLsR17Ml/ysIf/EvwLkxhYZGf426bD9gxei25dbKvXIJ68Fl+bJIpKHImZNwj8y+zDPilhf1EV+QkkoQfDN0klEoKKVLAS2CmJHFi54JOXTwYNDsLQNlMX0UH9lSAPSVoBMfh9gXZMiq6kunkVz9FVpQvJTFCJeke6HuXrFECZoxjm//XOXT8bsGshnZd51OLuMp/h5kglnsz6ApcU/oMKVeZ3DyRVieWqNoT4yM00eQcZZAUiA94vN2YgsF7LUQ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6953.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(346002)(366004)(396003)(39860400002)(136003)(451199015)(2906002)(38070700005)(5660300002)(82960400001)(7416002)(8936002)(33656002)(53546011)(26005)(9686003)(41300700001)(478600001)(71200400001)(7696005)(86362001)(38100700002)(52536014)(122000001)(316002)(186003)(107886003)(83380400001)(6506007)(66946007)(55016003)(64756008)(66556008)(8676002)(66446008)(4326008)(76116006)(110136005)(54906003)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?D6EmiENC0/U/LKmOP6xTmV1hGW9J5zgJKa2x9yVvw0YX5RIKDMH0w81HDd7f?= =?us-ascii?Q?nBT8VA0rcYupeOD2W8/2jP4vlCXbS9abBJ3XKhPtORmnd0ry9VaiTAq5PfQD?= =?us-ascii?Q?n6uoK1NCrt9NT8Ir9q4eBu9WBX/E95SrJWUDFqFSPJG4TfuVYPKXd4nOFLDd?= =?us-ascii?Q?bJqvKdPC8xw7AQh4MCYY0UJq6aySmp3OcmVQh4YakgBhtnZZ9XQOYMBfg5ow?= =?us-ascii?Q?cl31N8beP0zr4/L2T5zsDNaKEM6UGse4PDCdhV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U?= =?us-ascii?Q?8jtB7GoDTfO7Sg9pPOGe3iUmjrzcK1cWQ1h310sUZWGSr4vQxUTn5ZhazNAm?= =?us-ascii?Q?4vrEx8kOtq3Cv5rsBLkPQGmipmTnVS/TfsVzS+y/tXEFvuoo9spUnw1TPogR?= =?us-ascii?Q?9q4Drbtwk9dGmpydB+KJUtBlrVg4WIvtT+WFmLCdUmpLvjSX8JGKq6K7DJH8?= =?us-ascii?Q?E7yGwFhiIktrsEu6nmB2lmXXAbrkq+0cugT/TTSM+w7OmJy5OBTQJE5nFYit?= =?us-ascii?Q?Zqt+fVmQJ6vvm+7GmWmrqpznJCViRWChEkAATWoYStwsHQE8XFbP7kO2+gwt?= =?us-ascii?Q?NTkuO3M0T5BTyv2mk9Q+T3415RY2nfIQFzwnUPTDCs8l8Su6t7tnYR5giPNH?= =?us-ascii?Q?cTFPp8lBVVp0Eyl5pEKa9HMCX2WJlyzWfzym/0c03g2IRX93Su7yZmsktz+T?= =?us-ascii?Q?VHebxDsIeqwq9aTroTDg82/Pd5V2kOEAxzlzmPVL?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6953.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f464f73-0082-4a09-da57-08da97befc4c X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2022 08:39:35.8666 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DWEZB4Z5yco8C8LW5gPPKwwu2x+QqbbNgsmeLSmxPSyA7P4+RQxpoZB9oG2yrYWfMX9Od/8p9usHN4Smukx93w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5554 X-OriginatorOrg: intel.com 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 Hi=20 > -----Original Message----- > From: Suanming Mou > Sent: Tuesday, September 13, 2022 3:57 PM > To: Wang, YuanX ; dev@dpdk.org; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; Ferruh Yigit > ; Andrew Rybchenko > > Cc: mdr@ashroe.eu; Li, Xiaoyun ; Singh, Aman Deep > ; Zhang, Yuying ; > Zhang, Qi Z ; Yang, Qiming ; > jerinjacobk@gmail.com; Slava Ovsiienko ; > stephen@networkplumber.org; Ding, Xuan ; > hpothula@marvell.com; Tang, Yaqi ; Wenxuan Wu > > Subject: RE: [PATCH v3 2/4] ethdev: introduce protocol hdr based buffer s= plit >=20 > Hi >=20 > > -----Original Message----- > > From: Yuan Wang > > Sent: Saturday, September 3, 2022 3:10 AM > > To: dev@dpdk.org; NBU-Contact-Thomas Monjalon (EXTERNAL) > > ; Ferruh Yigit ; Andrew > > Rybchenko > > Cc: mdr@ashroe.eu; xiaoyun.li@intel.com; aman.deep.singh@intel.com; > > yuying.zhang@intel.com; qi.z.zhang@intel.com; qiming.yang@intel.com; > > jerinjacobk@gmail.com; Slava Ovsiienko ; > > stephen@networkplumber.org; xuan.ding@intel.com; > hpothula@marvell.com; > > yaqi.tang@intel.com; Yuan Wang ; Wenxuan Wu > > > > Subject: [PATCH v3 2/4] ethdev: introduce protocol hdr based buffer > > split > > >=20 > snip >=20 > > @@ -1693,13 +1695,44 @@ rte_eth_rx_queue_check_split(const struct > > rte_eth_rxseg_split *rx_seg, > > } > > offset +=3D seg_idx !=3D 0 ? 0 : RTE_PKTMBUF_HEADROOM; > > *mbp_buf_size =3D rte_pktmbuf_data_room_size(mpl); > > - length =3D length !=3D 0 ? length : *mbp_buf_size; > > - if (*mbp_buf_size < length + offset) { > > - RTE_ETHDEV_LOG(ERR, > > - "%s mbuf_data_room_size %u < %u > > (segment length=3D%u + segment offset=3D%u)\n", > > - mpl->name, *mbp_buf_size, > > - length + offset, length, offset); > > - return -EINVAL; > > + > > + int ret =3D > > rte_eth_buffer_split_get_supported_hdr_ptypes(port_id, NULL, 0); >=20 > One small question, since the ptypes =3D=3D NULL and num =3D=3D 0, I ass= ume ret > will always be <=3D0, right? The usage of rte_eth_buffer_split_get_supported_hdr_ptypes is the same as r= te_eth_dev_get_supported_ptypes. In this scenario, the function returns the total number of supported ptype= s, or an error code less than 0. >=20 > > + if (ret <=3D 0) { > > + /* Split at fixed length. */ > > + length =3D length !=3D 0 ? length : *mbp_buf_size; > > + if (*mbp_buf_size < length + offset) { > > + RTE_ETHDEV_LOG(ERR, > > + "%s mbuf_data_room_size %u < %u > > (segment length=3D%u + segment offset=3D%u)\n", > > + mpl->name, *mbp_buf_size, > > + length + offset, length, offset); > > + return -EINVAL; > > + } > > + } else { > > + /* Split after specified protocol header. */ > > + uint32_t ptypes[ret]; > > + int i; > > + > > + ret =3D > > rte_eth_buffer_split_get_supported_hdr_ptypes(port_id, ptypes, ret); > > + for (i =3D 0; i < ret; i++) > > + if (ptypes[i] & proto_hdr) > > + break; > > + >=20 > snip