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 73AEFA0C41; Wed, 6 Oct 2021 18:42:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC22940696; Wed, 6 Oct 2021 18:42:51 +0200 (CEST) Received: from AZHDRRW-EX02.NVIDIA.COM (azhdrrw-ex02.nvidia.com [20.64.145.131]) by mails.dpdk.org (Postfix) with ESMTP id 3A40040685 for ; Wed, 6 Oct 2021 18:42:50 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by mxs.oss.nvidia.com (10.13.234.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.15; Wed, 6 Oct 2021 09:42:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oejiu03ctj1DZ/TG3M7l1pswMAqfVtmFPPPBKSo9YZEae5j9+IHIyvZ+N1rsxB5aUbDQthble7TrtFcbFpYnKdTbGuE1b9r33p6MRm393VWDOdVcgSwtgEKGW9BF5AA1DEjMycFbwmvBwZEQXWIW5uoPnH0jF91Ypfw47OIVLFbyqhXOBDa94SpzIaCb/3/Lq47VEyUJEn4nTU9I/qmWJ1ZOq8IIfgaOdU6xEwhGlvW8koj1ZCvTirMZMl1NihY0gGCfFHGySJNXeJ35asKApRg+n6a6/7qTG3AbbxMr98LGTH1e+Evbl/I/9v6PEOiiz5oYVLjdcePu0Cwbqc/3Vw== 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=QJfEzVh0GJaArs7QS37WJDPMAnKYr3jgN406C9On+c4=; b=cMGyMZ7T83kTqDs6VqNWCRU8piqO5bse2aNtQ6lbN7ZX4sy//OE/JoZ77EthZ95pXNWki4wdM3TngnnCeyMD8QFiaRqCbvUym9KhXCxgPXQCAuYXBV8prxKcXeuDoPOwb/QFYnz56sqObPLYrHu0IbIVhqLFOtMUNShherKbv6+gNkQEcrFyFJ6z8uz6xuSGJRQwVavFJTrBiiafDAnhg6XymIkHivVbl7BJcjvIvEFOZ7wvM28AdkCi/u+pOHwEGry+kJ5XcnDQ7pPzwNOVIRigNbN/TSs/s1Ple8B8LbShx48U9sv/3f9O1lNx2NWRq8/cEwJG6BqvUJAF353sqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJfEzVh0GJaArs7QS37WJDPMAnKYr3jgN406C9On+c4=; b=fwu0DnT+0bcrLKodNc2harJT+HYn6cPD5ze6ZnrLewhGq+npzijnQw2ojX0EAUzHrfrnTQHHSWqz220ToF0tvF4PdTePeHxgSCLkDX8t/2uu3aaSyVCfrgQ2a+3HO5asIvlbkWf9c5OPyTZuh/fEx7yXqclkSzUlsrgs3Y6iLNCs8+4e/RlWTEV3K1xrfVTZD6rXTHUrowKzrdIAmx2i05USqPKGehNOrrUchGdp0hPCKvcksAxFeMx34MHWoMcQ8v/TyH9lQw1yVERHTC3T1IVk4UY1DnysOHmpsgwUF45kzc1oPh8wheKyB6YbqA9u8X1F8bzkbN7MLmwSQNaYxw== Received: from DM4PR12MB5167.namprd12.prod.outlook.com (2603:10b6:5:396::10) by DM4PR12MB5325.namprd12.prod.outlook.com (2603:10b6:5:39e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Wed, 6 Oct 2021 16:42:48 +0000 Received: from DM4PR12MB5167.namprd12.prod.outlook.com ([fe80::3c73:8e07:c9ba:f6db]) by DM4PR12MB5167.namprd12.prod.outlook.com ([fe80::3c73:8e07:c9ba:f6db%3]) with mapi id 15.20.4566.022; Wed, 6 Oct 2021 16:42:48 +0000 From: Ali Alnubani To: Konstantin Ananyev , "dev@dpdk.org" CC: "xiaoyun.li@intel.com" , "anoobj@marvell.com" , "jerinj@marvell.com" , "ndabilpuram@marvell.com" , "adwivedi@marvell.com" , "shepard.siegel@atomicrules.com" , "ed.czeck@atomicrules.com" , "john.miller@atomicrules.com" , "irusskikh@marvell.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "rahul.lakkireddy@chelsio.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@oss.nxp.com" , "haiyue.wang@intel.com" , "johndale@cisco.com" , "hyonkim@cisco.com" , "qi.z.zhang@intel.com" , "xiao.w.wang@intel.com" , "humin29@huawei.com" , "yisen.zhuang@huawei.com" , "oulijun@huawei.com" , "beilei.xing@intel.com" , "jingjing.wu@intel.com" , "qiming.yang@intel.com" , Matan Azrad , Slava Ovsiienko , "sthemmin@microsoft.com" , NBU-Contact-longli , "heinrich.kuhn@corigine.com" , "kirankumark@marvell.com" , "andrew.rybchenko@oktetlabs.ru" , "mczekaj@marvell.com" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "maxime.coquelin@redhat.com" , "chenbo.xia@intel.com" , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "mdr@ashroe.eu" , "jay.jayatheerthan@intel.com" Thread-Topic: [dpdk-dev] [PATCH v4 0/7] hide eth dev related structures Thread-Index: AQHXuSfrbAS7YLyeP0+CYU2WV6D+H6vGLrZw Date: Wed, 6 Oct 2021 16:42:47 +0000 Message-ID: References: <20211001140255.5726-1-konstantin.ananyev@intel.com> <20211004135603.20593-1-konstantin.ananyev@intel.com> In-Reply-To: <20211004135603.20593-1-konstantin.ananyev@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d028f3ed-b736-4ca2-0e02-08d988e8547c x-ms-traffictypediagnostic: DM4PR12MB5325: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mVzAUv5hgym2Br/nTt9u5QfCft/frNpPY6CdLzcewkWCPe96n6tNcU7dbyVWinDSHSzWI1ZNaYq3HD04j2ui39fXjsxZWXwM2u1W7gq5WQCpt+e7CH4+2udxVWojiFIhRMqgpJIF9TgHVxOXcPy/Is8LZxmqidn9598+mX01lQZVmDVB7pHP623FUTn39gtzGg5MwrsXhUNmlhC/4aB3ucUNU4yuOIRWPmy+clappBJv0HJEpbsjS69FQ5mypyjUJla5/zK71lxK+4J2uV9Cbl1ZOvNnBsLFDByF1cbXwn8VtyLUihj3Zt3oB3AbP5e6GIlHQrZkC1Ktb4Ra3fRAbcAKZ8hTCITK1KFOVyoHAvu36T6imnfDl3AWZm+tPQQ50JeSK2dxx/l+q5L++2DiB0ZjwPHNmNyQ9i6c5S0uFNl0WuGVetqtXk8kue7uBTbxhjbpz6layRmlXTiLNEDCzzdnp3JQqN+IxQ61cjuxKzGujqp/6EkV1PF4+NMNQHDR8i8dOXp6XesSsj9V4iG14aLF296MLJLPyBU8ZuVcvJ7q+bRALcMdRZjJJXaEZ8PucqDsxE6BO9Hy1cpS7/O724DRiBc/CMaNBge1t9EEOuhZKTE3l/jA+xvDXJwtl0u5EsAEcre3GnerIv1K6L6R3P3gAP06mHLIHDGAxiqlklHluT2jvng3//ol/0uBEFJMmLBJ1ZvXcaMUKTcUVKDe7dsOIYhV3MThPZFaNb7PRJLqP4Xdru2Yk42O8l6LzspHjJlxM61mam1TxHhryuE/mrjahIEVjX1swD0V/CpK2S0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5167.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66476007)(508600001)(45080400002)(8676002)(316002)(966005)(66946007)(76116006)(71200400001)(4326008)(38100700002)(55016002)(38070700005)(107886003)(66446008)(66556008)(64756008)(122000001)(7696005)(110136005)(86362001)(186003)(5660300002)(9686003)(8936002)(52536014)(33656002)(2906002)(53546011)(6506007)(83380400001)(26005)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cr4kiJbJXxiCgQ5LNOhq2Nxr+80f7nCE+mxeBO+2s9b+ZaH0wi3Mmzvu9tow?= =?us-ascii?Q?oK8PbKybziMtd2ePydDL8NJdiMzBCHppc+z+danAeqGwFjDLqyH8bV1tDAUk?= =?us-ascii?Q?PbDQ1yNSFl1H7AHePoJ/65LeuhNjhCBQaCgxG8ynfXl3/pecIjA1Yq/heaVP?= =?us-ascii?Q?UpzEp5A3cLeyp2FAqSZQ37H2lpDJ7GEE2QLYE3DXMIsjcmXNWkbjP8FTBwpF?= =?us-ascii?Q?8mmpOnCbvHupUSWbP3Q13z26hfB3SnaxbMu/cDO8zr+EDJ4dMjRmYgn/aB4A?= =?us-ascii?Q?5cGbTthqLD2BBlj8/IYmRapn/LrCceh+4ApmEOcTcRFtPcLg/JwTX/vTdEZY?= =?us-ascii?Q?LhdbnL5ZSdaYzCp8VLncel4pTq2nhuZHpO3I06ys25SLWiAlQaptvMI6KKX3?= =?us-ascii?Q?5HOwgX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0QxMdxTs4U/l6zCrVBM6VRd?= =?us-ascii?Q?7ADYf2R8KWcm8tFMVsRAbJuG?= 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: DM4PR12MB5167.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d028f3ed-b736-4ca2-0e02-08d988e8547c X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2021 16:42:47.9338 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JoMBJlsoOQwwl9gsA27tZXGtbYJhCWDCJ3mIsjTV0D076jsoP0TxzYpM+QdHUmENth49hWfPtwG6B3mfgz2N3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5325 Subject: Re: [dpdk-dev] [PATCH v4 0/7] hide eth dev related structures 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 Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Konstantin Ananyev > Sent: Monday, October 4, 2021 4:56 PM > To: dev@dpdk.org > Cc: xiaoyun.li@intel.com; anoobj@marvell.com; jerinj@marvell.com; > ndabilpuram@marvell.com; adwivedi@marvell.com; > shepard.siegel@atomicrules.com; ed.czeck@atomicrules.com; > john.miller@atomicrules.com; irusskikh@marvell.com; > ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; > rahul.lakkireddy@chelsio.com; hemant.agrawal@nxp.com; > sachin.saxena@oss.nxp.com; haiyue.wang@intel.com; johndale@cisco.com; > hyonkim@cisco.com; qi.z.zhang@intel.com; xiao.w.wang@intel.com; > humin29@huawei.com; yisen.zhuang@huawei.com; oulijun@huawei.com; > beilei.xing@intel.com; jingjing.wu@intel.com; qiming.yang@intel.com; > Matan Azrad ; Slava Ovsiienko > ; sthemmin@microsoft.com; NBU-Contact-longli > ; heinrich.kuhn@corigine.com; > kirankumark@marvell.com; andrew.rybchenko@oktetlabs.ru; > mczekaj@marvell.com; jiawenwu@trustnetic.com; > jianwang@trustnetic.com; maxime.coquelin@redhat.com; > chenbo.xia@intel.com; NBU-Contact-Thomas Monjalon > ; ferruh.yigit@intel.com; mdr@ashroe.eu; > jay.jayatheerthan@intel.com; Konstantin Ananyev > > Subject: [dpdk-dev] [PATCH v4 0/7] hide eth dev related structures >=20 > v4 changes: > - Fix secondary process attach (Pavan) > - Fix build failure (Ferruh) > - Update lib/ethdev/verion.map (Ferruh) > Note that moving newly added symbols from EXPERIMENTAL to DPDK_22 > section makes checkpatch.sh to complain. >=20 > v3 changes: > - Changes in public struct naming (Jerin/Haiyue) > - Split patches > - Update docs > - Shamelessly included Andrew's patch: > https://patches.dpdk.org/project/dpdk/patch/20210928154856.1015020-1- > andrew.rybchenko@oktetlabs.ru/ > into these series. > I have to do similar thing here, so decided to avoid duplicated effort= . >=20 > The aim of these patch series is to make rte_ethdev core data structures > (rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback, etc.) internal to > DPDK and not visible to the user. > That should allow future possible changes to core ethdev related structur= es > to be transparent to the user and help to improve ABI/API stability. > Note that current ethdev API is preserved, but it is a formal ABI break. >=20 > The work is based on previous discussions at: > https://www.mail-archive.com/dev@dpdk.org/msg211405.html > https://www.mail-archive.com/dev@dpdk.org/msg216685.html > and consists of the following main points: > 1. Copy public 'fast' function pointers (rx_pkt_burst(), etc.) and > related data pointer from rte_eth_dev into a separate flat array. > We keep it public to still be able to use inline functions for these > 'fast' calls (like rte_eth_rx_burst(), etc.) to avoid/minimize slowdow= n. > Note that apart from function pointers itself, each element of this > flat array also contains two opaque pointers for each ethdev: > 1) a pointer to an array of internal queue data pointers > 2) points to array of queue callback data pointers. > Note that exposing this extra information allows us to avoid extra > changes inside PMD level, plus should help to avoid possible > performance degradation. > 2. Change implementation of 'fast' inline ethdev functions > (rte_eth_rx_burst(), etc.) to use new public flat array. > While it is an ABI breakage, this change is intended to be transparent > for both users (no changes in user app is required) and PMD developers > (no changes in PMD is required). > One extra note - with new implementation RX/TX callback invocation > will cost one extra function call with this changes. That might cause > some slowdown for code-path with RX/TX callbacks heavily involved. > Hope such trade-off is acceptable for the community. > 3. Move rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback and related > things into internal header: . >=20 > That approach was selected to: > - Avoid(/minimize) possible performance losses. > - Minimize required changes inside PMDs. >=20 > Performance testing results (ICX 2.0GHz, E810 (ice)): > - testpmd macswap fwd mode, plus > a) no RX/TX callbacks: > no actual slowdown observed > b) bpf-load rx 0 0 JM ./dpdk.org/examples/bpf/t3.o: > ~2% slowdown > - l3fwd: no actual slowdown observed >=20 > Would like to thank everyone who already reviewed and tested previous > versions of these series. All other interested parties please don't be sh= y and > provide your feedback. >=20 > Konstantin Ananyev (7): > ethdev: allocate max space for internal queue array > ethdev: change input parameters for rx_queue_count > ethdev: copy ethdev 'fast' API into separate structure > ethdev: make burst functions to use new flat array > ethdev: add API to retrieve multiple ethernet addresses > ethdev: remove legacy Rx descriptor done API > ethdev: hide eth dev related structures >=20 Tested single and multi-core packet forwarding performance with testpmd on = both ConnectX-5 and ConnectX-6 Dx. Tested-by: Ali Alnubani Thanks, Ali