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 ECBD4A00E6 for ; Fri, 12 Jul 2019 14:23:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A838D1B9CD; Fri, 12 Jul 2019 14:23:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 998251B9B2 for ; Fri, 12 Jul 2019 14:23:27 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6CCKrX8011872; Fri, 12 Jul 2019 05:23:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=g5Rq7t5g1UWK6szbg7LlFGV8SZeCoZ+juxRCHc2mUq4=; b=xiHiNAT8sSU2sQFZ4GsX46ihY5xtLDd78pt4gqRuyoO0lbCvnzV/Oj9sbPYh0hc8diaf alU6k+JDvOVGFBTAY6tjPGj3JRfwghq7zbIfyg0hEYzwwyLO3VtV/jyGZ6GQffuaJ0A4 wV09nxQ12SNlrwbishulyyrsUB+KJmTgQ0CwC6FZ8L/EIdzjRRW0DmvvQ4KalztX3HK2 a42u/3qF4Y6FWW5ETZ9YHMKHeVF3hAgGfu5WrC1aS8Id7M7Ey0tsG4sVuhp33CyMlUK2 Dgib5yyvv2NstaJL5MEngk/7DBcWFwmsTsJjJSA0Sk+SK7ijotziFmKYWXXRfZuPiCgf DA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2tpdc82rnk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 12 Jul 2019 05:23:26 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 12 Jul 2019 05:23:23 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.50) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 12 Jul 2019 05:23:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H+YGXdZSvQ/m7k3mDfVbra6djXtQvh1SWC+cjXDDLJVBkJnYGh9kVeHW28V+M7U6jdEMU79a6+c4lcB8W8XL8RLLbNqqheif4/NINFPmM0w/uim2WFJWuSa+ijbuwDgi72eAtcDqBgCbXGuZcCb/IjiCL5bpfmJpk04fLL2s+4F/0wUNnC/8o3ayM1aq8nMYfGG+t9Nt5m9vQ+9h5ExqR1nIHaAcJBT5NeuczQWKU+qRYFOIGmux8AKZ/mPex5ywTXpKeXu0eHHg6uiWyFfLxEo5xw5wIgLHa+NsjmXddjUJnqOC8ve5Eu6LA1yIE1I5fCxIqmSZz28fAzLcszw65g== 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=g5Rq7t5g1UWK6szbg7LlFGV8SZeCoZ+juxRCHc2mUq4=; b=BBRbM/4NmgsSYR1qTkxdUogfcIDUaeWqdKq5ZtRR9nyUwEVmli+hBbiDsXc+4L67qoIf0T/sLlKyvc4pBCyXC6JthwvLhHfTUTu1XXu+4CdrhtRt6yn7cXb6rAi3N8WibGtFwHVRN9f5vYWhAhwPD9wtzUIv5VBv8afj1sM85djPTHV4tBp9xBYO8EwlPNfy6miYWjdD6pbGB0aep8SY/3I2p7lMe338NqOgVFh7spSliN828MIuL+sAYJt26sLSMzlWrvMAifYd8w4jtyKZZJ3VaXFcNmlFQvOZOd0cjxTN4ZEnRPa1pxaoBjnlycFX/6OuA2Rkec1yvGRRdt22/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g5Rq7t5g1UWK6szbg7LlFGV8SZeCoZ+juxRCHc2mUq4=; b=hbAbF655ZcI/BznuyaXD0VwMQOAfMeqjJd2c1A6hDKBERy/Btv3lScS3HRb+ZV6vOhNlyO60CHRlDhKea9tM8ZCQac6t0UCov6XQW3LFYRAKJQdYeDfPf00bRJEHS0AGt93MJBxKUh2xbtmEr+dyZcC7XSW+x8jFPuRqYO53uF0= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2855.namprd18.prod.outlook.com (20.179.58.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Fri, 12 Jul 2019 12:23:19 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862%4]) with mapi id 15.20.2052.020; Fri, 12 Jul 2019 12:23:19 +0000 From: Jerin Jacob Kollanukkaran To: Olivier Matz , Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC] mbuf: support dynamic fields and flags Thread-Index: AQHVNwH+FsVYuQrbM0u8dWG3XibI1KbEIZKAgADnKQCAAdxwYA== Date: Fri, 12 Jul 2019 12:23:19 +0000 Message-ID: References: <20190710092907.5565-1-olivier.matz@6wind.com> <20190710104917.73bc9201@hermes.lan> <20190711073638.64ljp526pengnwga@glumotte.dev.6wind.com> In-Reply-To: <20190711073638.64ljp526pengnwga@glumotte.dev.6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [106.200.248.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 87b5a90c-77d6-4f70-ccfa-08d706c3b993 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2855; x-ms-traffictypediagnostic: BYAPR18MB2855: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 00963989E5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(136003)(376002)(39860400002)(396003)(199004)(13464003)(189003)(2906002)(74316002)(26005)(478600001)(446003)(14444005)(11346002)(256004)(81166006)(186003)(3846002)(6246003)(8936002)(476003)(305945005)(33656002)(53546011)(8676002)(99286004)(110136005)(486006)(81156014)(6116002)(76176011)(316002)(4326008)(7736002)(229853002)(76116006)(14454004)(66476007)(9686003)(52536014)(64756008)(66446008)(7696005)(66946007)(68736007)(25786009)(102836004)(55016002)(6436002)(86362001)(71190400001)(71200400001)(5660300002)(6506007)(66556008)(53936002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2855; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TpPex6GkQN+Sh3v9uiOJ0/cL9qds48W9lPadMW60IOSYVsfnTU1zDW6hg37tgGVxYfCofXSVip7rK4Gw/BA43FdYOWSZYBo7eCcmDRSlRFbX9BBk20Ht8CRUCu/DboF7TBB6zQMdO3siD89Qi0CYq5Huxa956BA1UJiREEqze25/66dKYQzXf0KgDYAdLO5y/IoajEsp28iuBnpikYD5MEAFSb73VdvqON+uaWemNQZ3Pk56ERD0riTsa9QO+CVS8qpGXgN93ujqGa9l1P1sVSbX/V02NHogOi86mi05wrvJ34BtZBONenMRfqyFCaJzIkgZEtcisRF5ttl+4koOLLEzgLCuDZTrUp0dL8QppJsRkOZZO2ohsqGvmUi5PnRWnWtJuuKnPhph5CA+yayXnzxHN/42+ywuVEILDHJdPhU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 87b5a90c-77d6-4f70-ccfa-08d706c3b993 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2019 12:23:19.6855 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2855 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-12_04:, , signatures=0 Subject: Re: [dpdk-dev] [RFC] 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" > -----Original Message----- > From: dev On Behalf Of Olivier Matz > Sent: Thursday, July 11, 2019 1:07 PM > To: Stephen Hemminger > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC] mbuf: support dynamic fields and flags >=20 > On Wed, Jul 10, 2019 at 10:49:17AM -0700, Stephen Hemminger wrote: > > On Wed, 10 Jul 2019 11:29:07 +0200 > > Olivier Matz wrote: > > > > > /** > > > * Indicate that the metadata field in the mbuf is in use. > > > @@ -738,6 +741,8 @@ struct rte_mbuf { > > > */ > > > struct rte_mbuf_ext_shared_info *shinfo; > > > > > > + uint64_t dynfield1; /**< Reserved for dynamic fields. */ > > > + uint64_t dynfield2; /**< Reserved for dynamic fields. */ Since the mbuf size is fixed, What is the downside of union scheme[1] vs up= side of proposed scheme [1] Example like: RTE_STD_C11 union { void *userdata; /**< Can be used for external metadata */ uint64_t udata64; /**< Allow 8-byte userdata on 32-bit */ }; # The fields like mbuf: hash.usr, used in variety of use case together Like libraries like distributor() and Eventdev using it. If we switch to dynamic mbuf scheme, We wil take those field using rte_mbuf_dynfield_reg= ister() on library init? # I see an upside of dynamic mbuf if we can add rte_mbuf_dynfield_unregiste= r API. But can we ever do that? Because it will be complex if we need introduce no= tification mechanism etc. # In the real world use case, if with union scheme, fastpath API can simply= deference=20 specific element (say mbuf->fieldx). With dynamic scheme, the offset need t= o store in some other data structure and de reference in fastpath before assessing= the interested field. Right?