From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40064.outbound.protection.outlook.com [40.107.4.64]) by dpdk.org (Postfix) with ESMTP id 802EB1B94E for ; Fri, 11 Jan 2019 12:09:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FR4IjeJZ7Sl6onC79mXZV1CUWD4bqCLGdQ2AaVOnk+k=; b=Xa+3JEUdJBzf2CwtjHp7z/Tq6eHIqiTXd3DdETRe8awuBBCgTSgfCBQpY0BpV/r41nStTA3vcBuQ4G0fPfOCYRgAw9z6I5YaS0B3Etso0btyzRfgCo9GVzSR/xNIIFxib323w/RjM8mfCXah8xwYPn8bJ8+tnCpm004NOPSwRyw= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3946.eurprd05.prod.outlook.com (52.134.71.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.18; Fri, 11 Jan 2019 11:09:38 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1da8:cd09:4e78:111c]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1da8:cd09:4e78:111c%2]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 11:09:38 +0000 From: Yongseok Koh To: David Marchand CC: Thomas Monjalon , Olivier Matz , Shahaf Shuler , "dev@dpdk.org" , "roszenrami@gmail.com" Thread-Topic: [PATCH v4 1/2] mbuf: add function returning default buffer address Thread-Index: AQHUqYVSxIEyYNHNmUipmnhXPYex3KWpvXEAgAArwQA= Date: Fri, 11 Jan 2019 11:09:38 +0000 Message-ID: <20190111110927.GB8355@minint-98vp2qg> References: <20190109085426.39965-1-yskoh@mellanox.com> <20190110224030.2671-1-yskoh@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR04CA0026.namprd04.prod.outlook.com (2603:10b6:a03:40::39) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3946; 6:NgIkJ4o01icl6xZHzfJ9dZTRpE5nHEtszFF17NMm3hjRhYLChW9J6/+8aiwHoebZJmhO7KUUM1GNRMxUyhIRC7h/e7t+eDQFFBYmQWRHd7R9NTOeNOplTbMb4a2z7abYrFmeVvGzIAokrNKejBK4itGBnO1rb59DSABba8xsrstJGMD0yoJrDGQI6lGBueu8TGPw8uznPfR/wdsA+byplR3If31MXE2qdjGOx7G4fSuHS6XOXAeko4KBiZ/W8gJ+skBxf+va0Xq79Gsqc9c3pTxJOCZGa1PaizsKe8Oex86npTmXl8udGy1kcplr3usrBjhwru1ZXoC0YeG1o402dEwZvAUGed3qFydJx8kRivGBGCNfjRjg7BSdacHZL2UXtbXJFGmCAtumUDrlB7OY2o0ox9ts9+1jrh+2yzDk4uWWAzOv0G74wm5GMcLHdyxPsXiEHeJAvA/ZC53SIt5DBQ==; 5:/A7E49hQCUvvS15xKb1sRKMqzwQ3S9MW4BSC324V3Qg26dB2+rXrDr+AwaMxc9eP+iE/T9nwvyasgZkw0cYpoA+AGow11kN6xezp4QI+oh18mQfLhX7YzekZn4NxWISrt/UiMC0ERXZrRF2sxmPMjPSKi0rX8kWMwr7iRh0Sn9958MOqF4MaV7KmeUoNudeKPp+TAA32snxaUTPCuE6Gig==; 7:Khz5uIg1uGmOdZD/LuIZrSUeJsj+vRr2GKTd5iSWPtdEWu1ZG9yM2zTyh2VJKZbNRLRXJ7sy3HO5Tfc/FOOB0F6+Vhxtyys77IcYA/JjYdBxMf6Ucn5d0aYWx69Jm8ZN2kFJZ/vOkZsTSJF3KftscQ== x-ms-office365-filtering-correlation-id: 8581a9f6-aa51-416c-5367-08d677b54697 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB3946; x-ms-traffictypediagnostic: DB3PR0502MB3946: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(366004)(376002)(136003)(39860400002)(396003)(346002)(199004)(189003)(54094003)(8936002)(53936002)(7736002)(71200400001)(2906002)(71190400001)(6916009)(86362001)(14454004)(6116002)(4326008)(3846002)(1076003)(11346002)(93886005)(446003)(476003)(105586002)(6436002)(8676002)(81156014)(81166006)(478600001)(316002)(39060400002)(6486002)(97736004)(68736007)(102836004)(26005)(305945005)(486006)(66066001)(53546011)(386003)(6506007)(33896004)(186003)(5660300001)(33656002)(54906003)(33716001)(14444005)(99286004)(6512007)(9686003)(76176011)(106356001)(256004)(52116002)(229853002)(25786009)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3946; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: bMbCfzXBcpPIe0xVKYb49LVPx1MMpTDGOcMBAguc7t+yngtaPNnZMtWy4nBDCzyyxgHD4pB+eTXH7Oc5OFUo3RSYSSRZWE6HkWdLykPN/Meu8PJ6QPWTDlBSQrnQp/CnhKDeAzzriDHQktrVUX+8RkgM/5HhwAyMkz9zaxnJF0UNOL5JouQgmO3vRi2cY8jQeeWpKRSp9mKm1EusZ6qLeWO5Ilgw3SCTapkuKuwS8hrJF7nCcCpO0fK/+L0eSj/bd0ce0+ubxrOmYm3uVX/bXIVLtquY/Il+DZ8vgLWpYvZd+87FYNDrGGDgqilYipR+PME9yR8yZAFmm94lNxuqN98n32kuxWvOt1C5az7RUPhyO/cdMVpNZmTaE2BmPzEDRhc2+2mUsXCno9X5401peKmWWa1qBGjwHwGDODHvh8w= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8581a9f6-aa51-416c-5367-08d677b54697 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 11:09:36.3955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3946 Subject: Re: [dpdk-dev] [PATCH v4 1/2] mbuf: add function returning default buffer address 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: , X-List-Received-Date: Fri, 11 Jan 2019 11:09:40 -0000 On Fri, Jan 11, 2019 at 09:32:52AM +0100, David Marchand wrote: > On Fri, Jan 11, 2019 at 9:11 AM David Marchand > wrote: >=20 > > On Thu, Jan 10, 2019 at 11:40 PM Yongseok Koh wrot= e: > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > > >> index bc562dc8a9..5787616999 100644 > >> --- a/lib/librte_mbuf/rte_mbuf.h > >> +++ b/lib/librte_mbuf/rte_mbuf.h > >> @@ -788,8 +788,54 @@ rte_mbuf_from_indirect(struct rte_mbuf *mi) > >> } > >> > >> /** > >> + * Return the default buffer address of the mbuf. > >> > > > > Nit: missed it... s/default // Okay > > > > + * > >> + * @warning > >> + * @b EXPERIMENTAL: This API may change without prior notice. > >> + * This will be used by rte_mbuf_to_baddr() which has redundant code = once > >> + * experimental tag is removed. > >> > > > > Good point. > > I wonder if we have a "todolist" for release n+2 so that we don't forge= t > > about such things to do. > > Thomas ? > > >=20 > Maybe we could have something explicit in rte_mbuf_to_baddr that would > avoid it "inherits" the experimental tag. >=20 > @@ -844,9 +844,13 @@ struct rte_mbuf_ext_shared_info { > static inline char * > rte_mbuf_to_baddr(struct rte_mbuf *md) > { > +#ifdef ALLOW_EXPERIMENTAL_API > + return rte_mbuf_buf_addr(md, md->pool); > +#else > char *buffer_addr; > buffer_addr =3D (char *)md + sizeof(*md) + > rte_pktmbuf_priv_size(md->pool); > return buffer_addr; > +#endif I like it, so that we can't forget to change it. Yongseok