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 55619A0C55; Wed, 13 Oct 2021 22:16:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E3A641134; Wed, 13 Oct 2021 22:16:42 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id CB20C410FA for ; Wed, 13 Oct 2021 22:16:40 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="291013332" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="291013332" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 13:16:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="563231652" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2021 13:16:38 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 13:16:38 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 13:16:37 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 13 Oct 2021 13:16:37 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 13 Oct 2021 13:16:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WeG3b58QsQ7ce46T0UcVd4aE79WqLtKGkt45doh0P5H6qqY4EUijhG/nZ0hnNohM/UXZwAHK2dSroFebo6PzowV5FZw3kizPy7GoE9XusPJMb8HfDx4Nicia0UtINE9pHtkyNIOfKRt10WQ99+qTRtrEeen9Q9DWFWr7S37QdwWx+WgQxNBwruM91/oxIom0TTvSs1Ft9VCB1kDda1bbBlsp5FPcPk/saUYc/c3cL5oXGbYm7MUB0fk5U5XEZONE9gwu6YC3UGd0mW+KKuNOY1McDVf4iOdeNC74gHcE0gYWQCjjS6/hW9rACl0CpNnjQX424DtcwxM2rQXXAA0U9g== 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=lI8zC6m2Aq5RuSC0ruzsb7DCvLoJDSi3qTq/yW0gU40=; b=dWTgoj0YHOl28uC9ZCI9EJDX7krp7MXXVy39mYPh3agJ/ECCjzQlhvUaFxBmdLCEk3Zae6b2sJNOha8O3IC89nacg7UEZsYjj1odUe9A+Nl8KnSgWthi/DpB9NbcqEdxAhrwMEip43rABzchaxhV4xSPjLjx72EJ2rSBQ3Lcj4ZkElrdx8tmrZqvF4VB3gJPMG4KgyEXd0Emo4PMLxeHD30TXejy5M9ydUGU2dJDFRbR+VaUi95SWuhILgLn4OJ9aGpWDbttIdT1ZVpuuzx359z8XNf9p2I3aIIC6ZDnUbOtVBE/uCSNIAZQHI85rAuY7NDmqYdfo5zMQqLdlmBFxg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lI8zC6m2Aq5RuSC0ruzsb7DCvLoJDSi3qTq/yW0gU40=; b=ivHq1XDrYpyrfua81Mic8L+Ie+Fs2LVevXp94Qfu1dAiR834Ty7s+D2632FeKnTvE5Ul6alq0hcJRkbQxkdhxCJyFDRYyhPiLP7pO6DoEAw76vAMTq5llbphWXuYkkttqAxJJ69MoQE7B2mF6fjvSH4m6jFfzvwkpY9HKiTgfYM= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5175.namprd11.prod.outlook.com (2603:10b6:510:3d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25; Wed, 13 Oct 2021 20:16:28 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.016; Wed, 13 Oct 2021 20:16:28 +0000 Message-ID: <13c451b3-e138-810d-2250-18d30dce8f99@intel.com> Date: Wed, 13 Oct 2021 21:16:12 +0100 Content-Language: en-US To: Konstantin Ananyev , , "jerinj@marvell.com" , Ajit Khaparde , Raslan Darawsheh , "Andrew Rybchenko" , Qi Zhang , Honnappa Nagarahalli CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <0211007112750.25526-1-konstantin.ananyev@intel.com> <20211013133704.31296-1-konstantin.ananyev@intel.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211013133704.31296-1-konstantin.ananyev@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR07CA0094.eurprd07.prod.outlook.com (2603:10a6:6:2b::32) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR07CA0094.eurprd07.prod.outlook.com (2603:10a6:6:2b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.4 via Frontend Transport; Wed, 13 Oct 2021 20:16:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7015332b-b438-4d95-84a4-08d98e8655e0 X-MS-TrafficTypeDiagnostic: PH0PR11MB5175: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,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: pDBKoMQKi9XlgT+mFGjH0//RpMyAZpluaZZ9oR5KKVFb/iBy8F5NuS9fzj5XRcF5Wxo25vFGr3qFhoTBpyvA3HrfLjNP6k8dtT6yIURALT5VKTiwtznJN9v4SYadi9z+yiRMwL7yj25p7PogQ7cVdQawL4RysBYSjXxPEh5k+XKNeh4DuXV8JH4Tz45LQgRdjixOxGqU5noiwZ1SiqXf86dcZGyz8kvC6y4X2HlthyA4wdiNRzQldSICaiYMplBJuxIlPmORgq9T2GOF3QlL29qLJEo+8eqiFKioZ3zX+25g9ZFMPTRcZRw+/+jUJ5lY+WqBO17frCT6Er5XxKkw4jXsBexhA489qCK6ckDJgXuAosGAKu6nNPwoAAbI9hfvAFQ4A9nEQHYUEXwqhhymmleoodfjHn78UZTmNtI57F1I6hVJc0Z9jAQZCxuF5EeEj2y+Tys/vzck/9gQZ4r3EkbkkQgf6wvlLennAT9Fyxp5bDYfkhJzZLNRRgbsgxC4jkUxbVUvY4VsAiDS6/4SWhwvthFTDsk9SPOQ7Yoly/2zbSuvOugGf7m7B2Z8twjKED/8If8S+y+8aQj6Kq4M5QVR8Vz50ZVzl3aSxdheC2NPVwqJs/MqK5YEJRZ/jv62EfA/3WtT822HoEFCwK7ls7RMIJMEkadcSlw8uIFGQPcMotLA1PyQxK3o9mUAhtaTSU5hJEMYOhKWwymfazmTeo7RDFgpRUCAN3Vv5lJDYgcCcDM89ixthTkRTpTb7VxbC1DyCS4x9X0HGWSoJIS4Er/LJFFymj4+oDFPOO6ShJPePPRQdn0F0lpZ1kAe2LURKSgbEPvPW+ImBAmEcdcZ3A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2906002)(7416002)(31686004)(316002)(7406005)(86362001)(8936002)(4326008)(186003)(956004)(31696002)(82960400001)(44832011)(66946007)(966005)(36756003)(53546011)(66476007)(66556008)(26005)(107886003)(110136005)(6486002)(6666004)(508600001)(2616005)(16576012)(8676002)(83380400001)(5660300002)(38100700002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dUxrZnNKUm10MkE0SHNOWnhUdFBxQXdseUQraGs0ZlBqRXBSM3ptZUlLYm1r?= =?utf-8?B?LzNZNjZtQVJYWGxqdmRPU0t0RFB6NmRQbWNZUWQ1VmNkbm53Qmx5WkEwQlZ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tCTCs1SDZ2bHlPUnZM?= =?utf-8?B?S0V5WUUxdDhUVUxwSEtyQk5uQW9MUjF3ZnNvUkdlbzByVjlSVWgwUkswVWZp?= =?utf-8?B?YVk4R2d4akN4ZUprOHU2U2wyYko5d2dqOUpSU2ZnQlVXcmx5Q1hNNElreVFE?= =?utf-8?B?WUcyN3NLMnNqdVJ3Z0x3N3pUMmdJdnQ1bjg1bmVXQThpM1NqMFQvL00zTk9v?= =?utf-8?B?N1FQbFprZFdCWTdZVkxCelpneU1wUW9wUVhPcEpJMEc4ZVorL3paanJJQ3hK?= =?utf-8?B?ZEt3QjdyRFh3UzMwUHR2UVI2aDYrQmljVUtJdHZiSURkSFAyaVBaSFoyaWNG?= =?utf-8?B?VXpsS0VyeDl5WkZQRndDQVQrR2xibGZOL09iZ1p3S3dWT3NmMU9KakVwNExP?= =?utf-8?B?YVIzSXVYN2EvMXFuSjJwaHNJemNaVFJjcDNEYjJ5aG1Jd1ZrRkJrZ1V0TlA5?= =?utf-8?B?N2hvbml5dWRIWkdTWXYwKzJsWG1GelVGWFl6MUt5M2xvN2tBMFJ6VkVoVFo0?= =?utf-8?B?T1JsbnZCY3JOMUdjSkYrUDAyRHZoaTRtdVhxM0llcnBEbldMUzhKcityK0ZN?= =?utf-8?B?dlBMeDdmajluZGFNSUZZWDV5Sm05YWEvM2RadktCVm1tVGhQZmZOWVM1ZHJj?= =?utf-8?B?ZmN3MFFxOXNreFcyVWZ4cGxpajJObGt1OHo0OFhKd3kwTGhURnI2MkQyRzkx?= =?utf-8?B?MysxYUpiZk1DQ0VFR0txY0FSRTVDdmNKNGVpMEJNRGtML0pkVWp1RmpIazNK?= =?utf-8?Q?iGYOKmpNMa1H4ARH6UMtbI5k9FPtsd3Sn6uAMS4?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7015332b-b438-4d95-84a4-08d98e8655e0 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 20:16:28.2796 (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: FGuq2yeVdgE8/+Q+OQciyiHxvg8CO03/H30Yk43Xy2HosSBdVU4RMJKc/ZGlZ/nEzqdZJ94UMzl9Y2esBPqsYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5175 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 0/6] 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" On 10/13/2021 2:36 PM, Konstantin Ananyev wrote: > v6 changes: > - Update comments (Andrew) > - Move callback related variables under corresponding ifdefs (Andrew) > - Few nits in rte_eth_macaddrs_get (Andrew) > - Rebased on top of next-net tree > > v5 changes: > - Fix spelling (Thomas/David) > - Rename internal helper functions (David) > - Reorder patches and update commit messages (Thomas) > - Update comments (Thomas) > - Changed layout in rte_eth_fp_ops, to group functions and > related data based on their functionality: > first 64B line for Rx, second one for Tx. > Didn't observe any real performance difference comparing to > original layout. Though decided to keep a new one, as it seems > a bit more plausible. > > 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. > > 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. > > 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 structures > 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. > > 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 slowdown. > 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: . > > That approach was selected to: > - Avoid(/minimize) possible performance losses. > - Minimize required changes inside PMDs. > > 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 > > Would like to thank everyone who already reviewed and tested previous > versions of these series. All other interested parties please don't be shy > and provide your feedback. > > Konstantin Ananyev (6): > ethdev: allocate max space for internal queue array > ethdev: change input parameters for rx_queue_count > ethdev: copy fast-path API into separate structure > ethdev: make fast-path functions to use new flat array > ethdev: add API to retrieve multiple ethernet addresses > ethdev: hide eth dev related structures > For series, Reviewed-by: Ferruh Yigit No performance regression detected on my testing. I am merging the series to next-net now which helps testing, but before merging to main repo it will be good to get more ack and test results (I can squash new tags later). @Jerin, @Ajit, @Raslan, @Andrew, @Qi, @Honnappa, Can you please test this set for any possible regression? Series applied to dpdk-next-net/main, thanks.