From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A76E0A32A1 for ; Thu, 24 Oct 2019 06:54:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3218A1C1C2; Thu, 24 Oct 2019 06:54:23 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30079.outbound.protection.outlook.com [40.107.3.79]) by dpdk.org (Postfix) with ESMTP id 5FFA01C1C1 for ; Thu, 24 Oct 2019 06:54:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KD5EKrxF9w9diAL3tmmLbv3lIg7uG8sljMuIQ6G2pjj+MLBRxliT07VBCLCmfIbdyFSMnRcpK0KDQdzBMhGgIio5wQ1Gkuin9VQPBN1Yj1ni6z89bMSOZCNdfaXEScHS4dhkjTlmy4whL5KhCHS/iadqwXUxlxUsPCMGpMtxW2gii6Wlr2BYJ5CwwzGFhxpvWPAlCLviplWcSSBN+xHjaB/ZdnRBqSTk9UhHNVtA5lodxToCbA0+uQPetYxnPw/QAm/40Qyn1MinDQhxCHeb1JjTGP7vyYoG6bq8dXC9y5685SQI/jyYxLvFNvw95Gm8kCDl1ryiCG7ILWjUMEQEzQ== 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-SenderADCheck; bh=p58v6YjwDHBC0n0qWb4yy9B8f/lsFtT5ft8KLtMZuw8=; b=MaeB09s1oym2F7QNJ3IkNpCER/XFFX7o/h8no7oizrpzd+4i3U67tW65d3UAqgtbJxlEB+3PhG21jSyAzVel5ZLtpeEu34iUhFdXE4aYIG7/GMsjs936WIvFJY9lEnD+vA21RXSTRI50MVNf4mQrP/SAclF1lpPJp9V9Jiv+JiQh3d6VBnmsEBu3CpSV7rGZEGf+IA5BPGs7/mZ9yMdYm1xatLYDNi9f5fkTciTFCX9zC3HSDSwmAxBzzb20WmfzhAn9XGLyTNa6PHsJUezYv7zCIPuOvH4Ic8mboHwM1+A5txEzzGQ2t9Y/yM1eW7MCCzV43/WQ/63pmBU+8Aie7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p58v6YjwDHBC0n0qWb4yy9B8f/lsFtT5ft8KLtMZuw8=; b=K3nN8F90qZoZpgGcaKd0L2Qsw6Mz+MMmk5tiuYRSqgJeiUhTykZH7QjcFTiTo3Vb2/WfRnH/+eR0C+Cbb6niqdYjS/0j1O7CpqUaW0aeDGGl1bXddOXnT3qJxQA5APyyMSBlhkoLXG2hpZhARODXC+EY76Kl0Yd3pCRE2mwz2wI= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3921.eurprd05.prod.outlook.com (52.133.43.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Thu, 24 Oct 2019 04:54:20 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::380a:57ee:f35:e802]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::380a:57ee:f35:e802%7]) with mapi id 15.20.2347.030; Thu, 24 Oct 2019 04:54:20 +0000 From: Shahaf Shuler To: Olivier Matz CC: "dev@dpdk.org" , Andrew Rybchenko , Bruce Richardson , "Wang, Haiyue" , Jerin Jacob Kollanukkaran , "Wiles, Keith" , "Ananyev, Konstantin" , =?iso-8859-1?Q?Morten_Br=F8rup?= , Stephen Hemminger , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2] mbuf: support dynamic fields and flags Thread-Index: AQHVhPkgRl/t1IBmsU+RdN3b0pY45KdoJ4vwgAAbcoCAAQClcA== Date: Thu, 24 Oct 2019 04:54:20 +0000 Message-ID: References: <20190710092907.5565-1-olivier.matz@6wind.com> <20191017144219.32708-1-olivier.matz@6wind.com> <20191023133335.GM25286@glumotte.dev.6wind.com> In-Reply-To: <20191023133335.GM25286@glumotte.dev.6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 726afbd6-ec39-448f-f421-08d7583e3b76 x-ms-traffictypediagnostic: AM0PR0502MB3921: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0200DDA8BE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(376002)(136003)(39860400002)(366004)(189003)(199004)(74316002)(9686003)(26005)(14454004)(2906002)(99286004)(6246003)(102836004)(478600001)(8676002)(229853002)(316002)(33656002)(6436002)(55016002)(66446008)(76116006)(66556008)(66476007)(6506007)(64756008)(66946007)(8936002)(66066001)(4326008)(76176011)(5660300002)(256004)(7696005)(81156014)(81166006)(186003)(25786009)(11346002)(476003)(71190400001)(14444005)(305945005)(7416002)(7736002)(3846002)(486006)(6116002)(86362001)(54906003)(71200400001)(52536014)(6916009)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3921; H:AM0PR0502MB3795.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yz+EYJmBASVwH22gjLgqrBPvrvv1VY3svjnVJ70r4w4EqqyQJZCuje/ENWqSdTpkRSlQpA3KZi54kPbi9I/1GZZabNzJb70sQW/FeU/b83XblU72lgIWGfciTFs7hw1Z3gyHDcAZXrYIvmZXEqe2ghhBD6qf7CBAqBZei+Ja5/tjYpkLLa7o9FXR3dNYsYPFQCbAm7na2fVWzfwgzffvT/PsshuiwhjeY5kBtbRR14dRu3G/UaLHm/OcYPKiioQRehz0Q2zwd3fxQ+MBG+Osi1sQOAIBwO+ry3WO3e+lH1BVkThSlqjE2Fg/wm7PXnO2TmPnbiJoKTRZfLftticES4j0ZI/ECSV6EJkBmkC61bYTe5FK9RRZdmpiOqWcU3uMttF1AvKRL9kLR1JHmaqvnUERvMmXIROtxhzPOvybUeZu+uaAe0DX9qzZRiMZvcd9 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 726afbd6-ec39-448f-f421-08d7583e3b76 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2019 04:54:20.3833 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DbxVxUnLcv25P910AvJSR4AiFnm5//k+G0ZYL7QUW4OTqhPxjNI4oNrRCBaqo7VTX7IhfVnIjV7eJ95GBIII1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3921 Subject: Re: [dpdk-dev] [PATCH v2] mbuf: support dynamic fields and flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Wednesday, October 23, 2019 4:34 PM, Olivier Matz: > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: support dynamic fields and flags >=20 > Hi Shahaf, >=20 > On Wed, Oct 23, 2019 at 12:00:30PM +0000, Shahaf Shuler wrote: > > Hi Olivier, > > > > Thursday, October 17, 2019 5:42 PM, Olivier Matz: > > > Subject: [dpdk-dev] [PATCH v2] mbuf: support dynamic fields and > > > flags > > > > > > Many features require to store data inside the mbuf. As the room in > > > mbuf structure is limited, it is not possible to have a field for > > > each feature. Also, changing fields in the mbuf structure can break t= he > API or ABI. > > > > > > This commit addresses these issues, by enabling the dynamic > > > registration of fields or flags: > > > > > > - a dynamic field is a named area in the rte_mbuf structure, with a > > > given size (>=3D 1 byte) and alignment constraint. > > > - a dynamic flag is a named bit in the rte_mbuf structure. > > > > > > The typical use case is a PMD that registers space for an offload > > > feature, when the application requests to enable this feature. As > > > the space in mbuf is limited, the space should only be reserved if > > > it is going to be used (i.e when the application explicitly asks for = it). > > > > According to description, the dynamic field enables custom application = and > supported PMDs to use the dynamic part of the mbuf for their specific > needs. > > However the mechanism to report and activate the field/flag registratio= n > comes from the general OFFLOAD flags. > > > > Maybe it will be better to an option to query and select dynamic fields= for > PMD outside of the standard ethdev offload flags? >=20 > It is not mandatory to use the ethdev layer to register a dynamic field o= r flag > in the mbuf. It is just the typical use case. >=20 > It can also be enabled when using a library that have specific needs, for > instance, you call rte_reorder_init(), and it will register the sequence = number > dynamic field. >=20 > An application that requires a specific mbuf field can also do the regist= ration > by itself. >=20 > In other words, when you initialize a subpart that needs a dynamic field = or > flag, you have to do the registration there. >=20 I guess my question mainly targets one of the use cases for dynamic mbuf fi= elds which is vendor specific offloads. On such case we would like to have dynamic fields/flags negotiated between = the application and PMD.=20 The question is whether we provide a unified way for application to query P= MD specific dynamic fields or we let PMD vendor to implement this handshake= as they wish (devargs, through PMD doc, etc..)