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 CF126A0C55; Mon, 6 Sep 2021 20:09:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52344410EF; Mon, 6 Sep 2021 20:09:27 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4A4B0410ED; Mon, 6 Sep 2021 20:09:24 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="220039941" X-IronPort-AV: E=Sophos;i="5.85,272,1624345200"; d="scan'208";a="220039941" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 11:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,272,1624345200"; d="scan'208";a="478374359" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga008.jf.intel.com with ESMTP; 06 Sep 2021 11:09:23 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 6 Sep 2021 11:09:22 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 6 Sep 2021 11:09:22 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 6 Sep 2021 11:09:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nitIJoWytXjGKvYAHuyP6U6BxMOTJsVuN3nyN2kgrP6uBkVYvvWftHHNwHfZ/zZdGxrANuOmTPqWmwEVT3Wiem8B8UC71ZKRASaua3LyfCOiOnA0KNh34MzPJsBLQN/MLMAbKfQ8S6XFIR25ZxUUmZWp3DGic9E7Fo8hqWZWRrCE4Ekq/5tGF6VWO6g+slwNjalg0C7JdTwzGozpsKP15j6qOVp7UwWd6XbpfDwEd1Kr7jPqlEJZk535ekoeLp7fGgZyiFL00/XT7BNLCwq4mw94cjFBHr5F5NYQNmFxpneobADJqo7bylIQOdz1E+Rrqtc50Mt46Ka7rcFfvgB0tA== 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; bh=0ZzJVn4K9/BiE9oC/CcGu0eQqDga73w/8d8W9GGitdM=; b=nfmQoce9KVsU7CKcbvwo3X0OrcvpnMkW3qiGr2htamkIvBSTQc7RM8RPTC8hXhVczByUTZy1P8iwM9EqNP6uGDgxZQf3q9isPIuR+J6RiFX1WieXFZ0AOkU90wgxqBHtAxHT15e2+z/qsVMG4dBqAxo72zY+3v9emMdmfn7vYdc5xKiuaFV9E23OBWpBm2nIxmv9SzL8YY8OEXEW9ICt+n9e/1rMSz/XuWkAFNaiJefDNHLxQNyU6yFph1RF5TnY2bnLmzad4Bsc7jzxqJdQo9hkTBRCmF9TQEN9q5PlVvMVjvrpyua6l1QKba8QgWDwgdLbt+WDHbIfjdW67c09FA== 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=0ZzJVn4K9/BiE9oC/CcGu0eQqDga73w/8d8W9GGitdM=; b=pyDfjCzM0FihRicKnXrRFeD4hZHPS734czw+cdhbCdPGhK0nufxykYC7X0Y9h+hzJMTk8tzh7Vd9ItyZ0ORIPTCQKKprqzT8T8y8DCKC3/TlW8QMmv4Joo5rGqtt3822UY3PfAKH1np1qjyau3xC/y+xc4jaqRaZBKYiWlizLsU= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4998.namprd11.prod.outlook.com (2603:10b6:510:32::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Mon, 6 Sep 2021 18:09:18 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 18:09:18 +0000 To: Jerin Jacob , Konstantin Ananyev CC: dpdk-dev , Thomas Monjalon , "Andrew Rybchenko" , Qiming Yang , Qi Zhang , Beilei Xing , References: <20210820162834.12544-1-konstantin.ananyev@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <4f53c485-9b7c-17ff-30a8-7b8eeaebc5d3@intel.com> Date: Mon, 6 Sep 2021 19:09:12 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB9PR06CA0005.eurprd06.prod.outlook.com (2603:10a6:10:1db::10) 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 DB9PR06CA0005.eurprd06.prod.outlook.com (2603:10a6:10:1db::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Mon, 6 Sep 2021 18:09:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55becde1-4bb5-415a-123f-08d971617197 X-MS-TrafficTypeDiagnostic: PH0PR11MB4998: 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: 43Q+q+hlgvQRcLONk4GONi/qnxbwhedwYp5vCB9bARGE4TTCL9EVbEYZsfncWfFKy+6RymYcbpuNady1FKHWrjxY427cK1JohZVM8cgaYhyaxgs+6SyDhaZfksozXpXITHnZ58wNuYfNtk0rGwIcEyYN5lK9aSifmm7NBf0p0ljFSiXPMumOC9gJRT41zaFUG1g4XWrozb/uMkr4fKxNTOElHv2rFqjw7Lmmw6gNM0wygjSO0YVxF3b/KlFGhlrRphyj3BF2Ua/1+Fv9MFasY650vxvrFQ2rsIXnJv5PT22lbgK4u+/Ynp3WWDU5oWS6cXL92ofxyF5NhQcA0UZDHxBaOJW8v8efNvHT0pDm+E7+KoqHo6IgEgzdvO/gM0jg3maZAaLnPcFnxSYWi5w5DIL9vUGRgINQ087cRVZlVWfxiLq8L/U56RGHzpxmYSyE3lXao14RY4JFPb5iKdOy7CkG6Bszi7lhSi3HmiG2duWLd+DNwaj0iEkRYW5lnO1jXqaBL+aQeCGFhZWbVjr/Fg2CoVCPSclVSzwqzI0BJ4JxWY6MV6TqS5gpkPeh0KaX0M7ewlN6FzgeYIhAq4e5FckK1cZetLnkAruuukKR5eRQR8fFlgZKWgKhGo7YK/3ciSA6zlnXpsK7nWmMe3366mUgw/mIlhoQQoKOKgCoiDBRno2WeBg2OdMQjjANLHgVy68BahRbkVV0TNguRNI3gvw1PrllhbK6j0XqOxuM7Q8GN2Gta7gqm1etmR8PmhP4I1e9EiLzx0ydoMhu3+o5krwWZ4OVowp4p6JjZlTjLAJK9ID2Kihbf8D1uvgsgfqb 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:(4636009)(376002)(136003)(346002)(366004)(396003)(39860400002)(186003)(966005)(6666004)(478600001)(6636002)(4326008)(44832011)(31686004)(26005)(110136005)(53546011)(38100700002)(956004)(16576012)(5660300002)(83380400001)(31696002)(2616005)(36756003)(8936002)(6486002)(86362001)(66556008)(54906003)(8676002)(2906002)(66946007)(66476007)(316002)(10126625002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWdWK2JuNzFqd0xZbFZvNWFSM1VpbDZGWkVCbm0yZWdyeUtkY0N6M241b0d5?= =?utf-8?B?MW9OdkhoaTJqWmZZU043TWZSaHRRemNGU1EzWGRkdDZXaE1zbys0UnJHRTEx?= =?utf-8?B?ZEwwcTJ3ejdXNE5rTUVkWVpNa3VSa1J0MDlTMG4yWmZnMWlyVE9YZHdhajMx?= =?utf-8?B?YW4veGxqN2FsTHBzaXEvRVlQMHB1NFVUZE5BQ0toU2ROWDQ0cXlPNHMrOEdT?= =?utf-8?B?VU43VFBRWGpnVzMxNDY3NGZrNm1oNjlDZWYvRWhPRjdDYmxxQ1B1UFJjOFVs?= =?utf-8?B?clNwdHJsQU9QbW1lMVNPK3R1aHhHTVlISXN6cy8xMEdIUVkwNXN0OGVPOS84?= =?utf-8?B?K3hnYmtaSGRkK1dqdlErVU9RQnNpY3V2UERQODh6TVZCc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phREFEMHJwc0hROWswR1Q1MEF4?= =?utf-8?B?c09VSHpwY1ZDeDFIY2dOTElaa09aNzhOcEtSeFJPSDVqdHpjQlhZY2kyR2JG?= =?utf-8?B?LzNrU1EyUUs0T0tzQUI0M0dSbGxqSjdWaWh3MjZibU0wUGQzSTRhK2l5MDQ4?= =?utf-8?B?UnlrWFFlUmUrcHlmenFQeHJqMVFvTllzZ2J1NncrKzJuSHVySlBFVk1ram9r?= =?utf-8?B?MWZiZnlVYmxKbjJtM2lDNkJMN0hDMFFKL0V4MGVNSDRlS2hKNWM4Umkva0xE?= =?utf-8?B?YlVPVGhlQUozOCtSV2dxei96bzNjdEVQWFNyZVlTOHpldTNoaUhDUnlqdkp5?= =?utf-8?B?a2RDOXg0ZWlwdWlpTWFpWmpVM3NtdHpEenl2dVR2TmNjQ0UvUmh0YnlIYXpO?= =?utf-8?B?Sjh3UWdWa0VWRWFhWTNkODFUSFB1K0Zvb24rMXA0bFk1VUVobW5CejJ1enlI?= =?utf-8?Q?zA1FlzZdlCuAEy7OpfJkkD1uxG7kK2yNWwWtkQQ?= X-MS-Exchange-CrossTenant-Network-Message-Id: 55becde1-4bb5-415a-123f-08d971617197 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 18:09:18.2651 (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: VFQ0ypCLzL2vDeoRZJovehob3O9yEogaYqQrwbHgKlnoEjFVkFtZIXrLUzf2rvXgGKlJaWe/tzJ8Nh44qmfr9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4998 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC 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" On 8/26/2021 1:37 PM, Jerin Jacob wrote: > On Fri, Aug 20, 2021 at 9:59 PM Konstantin Ananyev > wrote: >> >> NOTE: This is just an RFC to start further discussion and collect the feedback. >> Due to significant amount of work, changes required are applied only to two >> PMDs so far: net/i40e and net/ice. >> So to build it you'll need to add: >> -Denable_drivers='common/*,mempool/*,net/ice,net/i40e' >> to your config options. > >> >> That approach was selected to avoid(/minimize) possible performance losses. >> >> So far I done only limited amount functional and performance testing. >> Didn't spot any functional problems, and performance numbers >> remains the same before and after the patch on my box (testpmd, macswap fwd). > > > Based on testing on octeonxt2. We see some regression in testpmd and > bit on l3fwd too. > > Without patch: 73.5mpps/core in testpmd iofwd > With out patch: 72 5mpps/core in testpmd iofwd > So roughly 1.3% drop. > Based on my understanding it is due to additional indirection. > What is the additional indirection? I can see all dereferences area same. > My suggestion to fix the problem by: > Removing the additional `data` redirection and pull callback function > pointers back > and keep rest as opaque as done in the existing patch like [1] > > I don't believe this has any real implication on future ABI stability > as we will not be adding > any new item in rte_eth_fp in any way as new features can be added in slowpath > rte_eth_dev as mentioned in the patch. > > [2] is the patch of doing the same as I don't see any performance > regression after [2]. > Only there is an additional check after Konstantin's patch (in both 'rte_eth_rx_burst()' & 'rte_eth_tx_burst()'): " if (port_id >= RTE_MAX_ETHPORTS) return -EINVAL; " Which I can see removed again in your patch [2] which fixes the regression. I wonder if this can be reason of restoring the performance drop, can you please test original patch by just removing the 'RTE_MAX_ETHPORTS' check? Thanks, ferruh > > [1] > - struct rte_eth_burst_api { > - struct rte_eth_fp { > + void *data; > rte_eth_rx_burst_t rx_pkt_burst; > /**< PMD receive function. */ > rte_eth_tx_burst_t tx_pkt_burst; > @@ -85,8 +100,19 @@ struct rte_eth_burst_api { > /**< Check the status of a Rx descriptor. */ > rte_eth_tx_descriptor_status_t tx_descriptor_status; > /**< Check the status of a Tx descriptor. */ > + /** > + * User-supplied functions called from rx_burst to post-process > + * received packets before passing them to the user > + */ > + struct rte_eth_rxtx_callback > + *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; > + /** > + * User-supplied functions called from tx_burst to pre-process > + * received packets before passing them to the driver for transmission. > + */ > + struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; > uintptr_t reserved[2]; > -} __rte_cache_min_aligned; > +} __rte_cache_aligned; > > [2] > https://pastebin.com/CuqkrCW4 >