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 C3F8CA0032; Mon, 11 Jul 2022 11:54:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B600640223; Mon, 11 Jul 2022 11:54:10 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4770E4021F for ; Mon, 11 Jul 2022 11:54:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657533248; x=1689069248; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=urRl67Rgbj7RF8qo1NSrTRj8bHP9CM9qNyFAAoPjLcE=; b=n5aUcQaIdVkWloPsqMoe+kB6KL4V7Dxt27va0xWi9Zh4fIlFuyPHSOvT NoecjFv5YdkoPxLeuUflfIZPE6wAJvvHeWcaD0IQbHcbGY2aau3qQuoX2 boQ4PMs27NkspwPhauENJDDGkIT7rs8nvG78Y1HtUMeACAcYT2T0Vdhip n7KeISLmMTIhiS004E2fe0KIAkXLtQzdxDKJB4DqDriNh9LocBbojFVc0 6ccoZ/Hdj7W2yeDtSOXA3itXfWWQBrNlFO/DkIqpUSTjf9WJH4dKCGGl4 oBxvxXCbiWEkSqdssdDv0VUGl6qG2a8Bf5o3tSVoXFECwbYM4dCLb8FZ0 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="265031061" X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="265031061" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 02:54:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,262,1650956400"; d="scan'208";a="592201007" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga007.jf.intel.com with ESMTP; 11 Jul 2022 02:54:07 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 11 Jul 2022 02:54:06 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 11 Jul 2022 02:54:06 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 11 Jul 2022 02:54:06 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) 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.2308.27; Mon, 11 Jul 2022 02:54:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwWOFGVePWMwxDA51L2k2Ru5Qr3GllEXG7AgcWGaNatM831/wjz070gqE0zltZ1k7YS6Y3q/3BnpfMmaAhSxcl+EK34BJWgSTenzMw8KWxhYS3SYzAoIIRz4p0s3iMbiTYgZp3ZpvxvTpUggRdYTJAl5wKaeJe0xJNnsxrXNxx+UwSfbGhVw+qDHkVxPf5RmAUotfCCjE9BWHPjkIj7uoIif8tBOl+farwhyDSZ0PVM01l5A3PvYkr6dc0AcRANPXEb/8qbdy9TQOM4WuDTPxNx+mJapZBnPFrPiYCn5873nwG1NRyLHyfQOL+rPtwYMwLx2meSAAqriyXsRGSNDcQ== 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=FMT+wh0u3V+Om3zp6JpUlDshobtAXhSaa9XoUU+TenE=; b=euOgm48PgcguPJX/uE+ZGCWNQjCIdJ5S2n8lE+rXN5nfgQYszXOLe6n6IwSXH/5Snd+no1N2KjYXFhB87nur4UDXkaomqELekH3m8mJTc1rKo+e5t2HSaPYmn6Ps7ZPxC6aUvuaEELEXuAZ15jCJ86zBVY9altgwNDGrFx/zkZHroQKOROr9AVTjEGiy2yZ69Qf2aKmsNSCyPYphYVJfrL51fys8BVajwl1v2oVP6SszQ6obAZ6VQ+/oar7geaEAkiglfz/VO4t2YdCx43oJKFpDFNVlW8/mpfrn65hCgnr6y2qpma3r4fT8V6mftVkVYLUBpkaVLnf9lrqHvNdjJA== 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 BN9PR11MB5513.namprd11.prod.outlook.com (2603:10b6:408:102::11) by PH7PR11MB5957.namprd11.prod.outlook.com (2603:10b6:510:1e0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.25; Mon, 11 Jul 2022 09:54:03 +0000 Received: from BN9PR11MB5513.namprd11.prod.outlook.com ([fe80::e0da:195a:2906:2c2]) by BN9PR11MB5513.namprd11.prod.outlook.com ([fe80::e0da:195a:2906:2c2%9]) with mapi id 15.20.5417.026; Mon, 11 Jul 2022 09:54:03 +0000 From: "Ding, Xuan" To: Thomas Monjalon , "Wu, WenxuanX" CC: "andrew.rybchenko@oktetlabs.ru" , "Li, Xiaoyun" , "ferruh.yigit@xilinx.com" , "Singh, Aman Deep" , "dev@dpdk.org" , "Zhang, Yuying" , "Zhang, Qi Z" , "jerinjacobk@gmail.com" , "stephen@networkplumber.org" , "Wu, WenxuanX" , "Wang, YuanX" , Ray Kinsella Subject: RE: [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split Thread-Topic: [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split Thread-Index: AQHYfxM4xb+F2+Bh1k6ZBMjgUj729a1yw9QAgAZRIaA= Date: Mon, 11 Jul 2022 09:54:03 +0000 Message-ID: References: <20220303060136.36427-1-xuan.ding@intel.com> <20220613102550.241759-1-wenxuanx.wu@intel.com> <20220613102550.241759-3-wenxuanx.wu@intel.com> <3814226.y1PWrYsiD0@thomas> In-Reply-To: <3814226.y1PWrYsiD0@thomas> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 46ef1149-df31-4295-c4a7-08da6323494e x-ms-traffictypediagnostic: PH7PR11MB5957:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bJppm362U1SZGeD7Q/5aP7ldM0hYaSbv2+uMGZfOoIBsWxAKYu7l5ByHTZGGJTgM6/lGYHMZhj0NgAkZAw+vxiwbTY3zkOuXqbVlemQMqdfrmY20Waujt3Fwl2+5b2cpT/LWWhk74zBSywg/k/pfxCKRkns6o8MYFxmp+bzD9/Zq7LyJgVK5vvWbuE+beZobJjYCGVk3uRVK9KqR2INhcnJlPmHQSGK5cvTWkYbWAiXS2qyipHET55f4dTPYhqanbWpHMhHyr7tqMs7/02BAlpBOPZhf/WtmUyELrLFvl8BrmMelmS7wPkhuhkGKTDwG1d56xF1tW7MJUZljVqoo28FqhCwMOYdSJWPf5CWg7i770PKIZ1cUqKER6H+bPnjYiYNuLXNDotQzMyI6pqxYqIEhEmeLoXlacp/09MrQVm62XTFHRCsurTVckvJf4rivTC1nXOHa8Fi68fv78Lrjk4TUGwcu1X4IENw8gZQiQTfcU1GhdzF6kCHzmBvBJaSDL558KUISOu+qJK/ZIU75FKnsDORjRln81JWHpbQeLnmUpNi+TE9Vy/FCucNXVZb7/RMYr1cOVP0//1M6/AeF7Q+a+z+sQpTuKSzfW+J5/CISIQAMcLY9c6qUAsdReklRLgG67cYw46WVc7Wgf0vT7YgxX4pi+r3VVz/Cfveh7PRwbRsnzH0H3nf9ycLvSCQPPZTlhtlUnCEYOYJTBhkgNIBDvAZAL6xQp5wUbI+PsMEimxzKmebdTuruOUMhHAKu1EUnRhcopFaY7Dzro1r8NMs2PUZ48w2Mw/oIahDs8VdwVyNCanZKXovxcjL6g3Ex x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5513.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(346002)(366004)(376002)(39860400002)(82960400001)(38070700005)(86362001)(122000001)(33656002)(8676002)(66446008)(66476007)(66556008)(76116006)(4326008)(55016003)(64756008)(110136005)(54906003)(6636002)(316002)(52536014)(66946007)(38100700002)(5660300002)(2906002)(83380400001)(8936002)(9686003)(26005)(7696005)(71200400001)(478600001)(53546011)(6506007)(41300700001)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U5Uuj9B6ptL2f5l5jlQMjTqqWLGv2lMJ9QBGgwqwvoispPwF1XplE7hdR0ZR?= =?us-ascii?Q?cCA/50C46v9gbjkjT6fJ9RwXwNIVSgoxf/0jKv/NJo9F4e3sw+dPX8/fn7rx?= =?us-ascii?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tVXlxjrl+kOxa19R9fdL?= =?us-ascii?Q?1gVAF0diLXjW/Vz+gHlVokeRIhfy641gE0G+/0wAF1p1ZKkJVO09ecIFCpsT?= =?us-ascii?Q?+c1vD3HutL1EFfa8Arjci5ZPwiTLvOq06NDRi/4Y5nUbKb8w/JEvFJvZQ1dQ?= =?us-ascii?Q?lR4LVJRfMA4dWcTuTzFmOO7yLaICAKL3vxIx150enhG7YKUL0vD3Icvf4rNt?= =?us-ascii?Q?23Md+H6mj/Zcc04sQu9XsDvBfWorbjjvxBENzdbqa2pNofnH82aXIdCL3dLD?= =?us-ascii?Q?rwyfA99gld7QqIc7TMp9YMiu37X+8SsF0E769oP/8bLVRxXl0D3WkcYh6+3S?= =?us-ascii?Q?fKai/epblZ6OFEySaf6GK+PZI9halriMPojWx/Ybz+T6EX62OQWWaEFH9AwV?= =?us-ascii?Q?csFsONLWzixPgKGgXq/ubAAm3KS6yMNEc7sTulcTli1zLg4b+sKzyD8u5FiD?= =?us-ascii?Q?jqMqvhU4l9+1Fy0RVFN52xszA6roExQEiZ8DVYfn4Va5ILBuDNDnJJ06/fD1?= =?us-ascii?Q?8f16Wdxmv1hUjbZSlLC9kWhEjPoh0nFRbhIijXlgt4ZM4xzQxU6foh1jXEVv?= =?us-ascii?Q?9iLRzabi3ysuuUH4LzPJw7xXl4y+6wfan2irA1wP?= 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: BN9PR11MB5513.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46ef1149-df31-4295-c4a7-08da6323494e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2022 09:54:03.0938 (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: q6gCQtqkqnHruyyZyzEri/MKWCVgvW9gpG1qW8JwVIG1MMJfzM0Is2B9kWZshjHw04Vlr9Lxnvz2b4k9oYHy0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5957 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 Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, July 7, 2022 5:08 PM > To: Wu, WenxuanX > Cc: andrew.rybchenko@oktetlabs.ru; Li, Xiaoyun ; > ferruh.yigit@xilinx.com; Singh, Aman Deep ; > dev@dpdk.org; Zhang, Yuying ; Zhang, Qi Z > ; jerinjacobk@gmail.com; > stephen@networkplumber.org; Wu, WenxuanX ; > Ding, Xuan ; Wang, YuanX ; > Ray Kinsella > Subject: Re: [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer s= plit >=20 > 13/06/2022 12:25, wenxuanx.wu@intel.com: > > --- a/lib/ethdev/rte_ethdev.h > > +++ b/lib/ethdev/rte_ethdev.h > > @@ -1176,6 +1176,9 @@ struct rte_eth_txmode { > > * specified in the first array element, the second buffer, from the > > * pool in the second element, and so on. > > * > > + * - The proto_hdrs in the elements define the split position of > > + * received packets. > > + * > > * - The offsets from the segment description elements specify > > * the data offset from the buffer beginning except the first mbuf. > > * The first segment offset is added with RTE_PKTMBUF_HEADROOM. > > @@ -1197,12 +1200,21 @@ struct rte_eth_txmode { > > * - pool from the last valid element > > * - the buffer size from this pool > > * - zero offset > > + * > > + * - Length based buffer split: > > + * - mp, length, offset should be configured. > > + * - The proto_hdr field should not be configured. > > + * > > + * - Protocol header based buffer split: > > + * - mp, offset, proto_hdr should be configured. > > + * - The length field should not be configured. > > */ > > struct rte_eth_rxseg_split { > > struct rte_mempool *mp; /**< Memory pool to allocate segment > from. */ > > uint16_t length; /**< Segment data length, configures split point. */ > > uint16_t offset; /**< Data offset from beginning of mbuf data buffer. > */ > > - uint32_t reserved; /**< Reserved field. */ > > + /**< Supported ptypes mask of a specific pmd, configures split point. > */ >=20 > The doxygen syntax is wrong: remove the "<" which is for post-comment. Thanks for your catch. >=20 > > + uint32_t proto_hdr; > > }; >=20 > How do we know it is a length or buffer split? > Is it based on checking some 0 value? Yes, as Andrew suggests, we introduced the API rte_eth_supported_hdrs_get()= in v9. It will report the driver supported protocol headers to be split. If the API returns ENOTSUP, it means driver supports length based buffer sp= lit. Of course, no matter what kind of buffer split it is, we need to check RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT first. Thanks, Xuan >=20