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 9D597A04FD; Fri, 29 Jul 2022 12:02:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E8CB4069C; Fri, 29 Jul 2022 12:02:18 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 8076140151 for ; Fri, 29 Jul 2022 12:02:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659088936; x=1690624936; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=+x7PHZVF1N+QLgqcbiiB2Bb9acAzWgn2omu1bZeZb34=; b=WzGKC+1P2jjptoSpLsUtFLQtH115CHGjphuLOFEFSXlKFNJ8jjCmLthx ZvczTKe7/5W+CNhfiBNPWQhkSgN/pbuh/ZtrJ7M/UrHlQrgAowIcitr+P TImTJcheLXMTtQM9gcZadFrfaiFpiLm4eG+HXGwP7k72T0c5R39qHFb/5 N7wfteeP4Fl2tnO4YCYcBu6lom6T+mqL4SobklWxD4K3JZIilxhThOAze QlShAS0jitWKy6lKAC8Qelydqbdxw6dScy3PfbbqMHQ7IJkgIo1uyWqEn zAfW5v3TQraH7Se8Fxd9lIzWpQw12kQzoWa5VGO1ARQoQtGB0BPow2wXS w==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="269120049" X-IronPort-AV: E=Sophos;i="5.93,201,1654585200"; d="scan'208";a="269120049" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 03:02:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,201,1654585200"; d="scan'208";a="690689968" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jul 2022 03:02:15 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 29 Jul 2022 03:02:12 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Fri, 29 Jul 2022 03:02:12 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Fri, 29 Jul 2022 03:02:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1Ah4IbGDM9WbppDP6X31gtb7N6GuCf7cWl9Pk9a0xQWaFBIcGi//oaWaYrvYptzi4NVTpVrYJxM8gXNjxSvw8VUP0bUTYrOitk7JGMDpcQ+Wx01ipXMng9LgavYn2tqIbWe6stccwhr7YY3cKVMBjxxgP7/bgqIrN8bWSakuiakovA+Mhj/TbjmWxnBZF5vjaocwtTqOQ+g4KOJto3yMXUBbMpyx6UPa7d0PHM4FJB0V4ZwkVMLVxOCVZwpCwJaFaCrtHYv5iYQsDFIHSO/wflchMYg3CsP9uklXz5qdK+lzm8uh1Gvpc0ehJfcKA1eDSjBzKsWwZz2eP5vy/vy7w== 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=Ln9krIae8S0neX8UC1jt/VOOKaZ4Ke//FUIUyz8ISLY=; b=Y4cK86GEg98M3iZnRfDlnehdveeX2lcfw+EYRTcn4AycItF7UMXUhQett1TdeZZSgcUSFaeKEmmxrCYtwBIbzVrYvJgBHT5/YNEPTd5reAnoVCe/L/m/ixtJ90ksBn+ggyLxJCeCagw0qcVaiLxn8DwDwKZg4g2Sjeoha8hCtWBvm1nvvrGXpNajyy/0HOv4J1dZW0yRkQkhwzExLC68hExBtFQD6dyZsrtFgKKz1YTo2pDWSlNcP1Gg2WL+O3qVeAmthY5SZbcQnQtVw1ylY9gzF+e/kcpSvpO7Rrj2MHuODwITtYepza3xQvHXPjX1eqbNYhj//6YlBvDwteHIOA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by BYAPR11MB3559.namprd11.prod.outlook.com (2603:10b6:a03:f7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.6; Fri, 29 Jul 2022 10:02:09 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d%5]) with mapi id 15.20.5458.024; Fri, 29 Jul 2022 10:02:09 +0000 Date: Fri, 29 Jul 2022 11:01:59 +0100 From: Bruce Richardson To: David Marchand CC: dev , Ray Kinsella , Parav Pandit , Xueming Li , Hemant Agrawal , Sachin Saxena , Rosen Xu , Anatoly Burakov , "Stephen Hemminger" , Long Li , "Matan Azrad" , Viacheslav Ovsiienko , Kevin Laatz , Chas Williams , "Min Hu (Connor)" , Gaetan Rivet , "Maxime Coquelin" , Chenbo Xia , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Reshma Pattan Subject: Re: [RFC v3 21/26] bus: hide bus object Message-ID: References: <20220628144643.1213026-1-david.marchand@redhat.com> <20220728152640.547725-1-david.marchand@redhat.com> <20220728152640.547725-22-david.marchand@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LNXP265CA0087.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::27) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d499a13-7693-461f-67ea-08da7149662e X-MS-TrafficTypeDiagnostic: BYAPR11MB3559:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nSCuTw+vzX8vYY80TekGFrcYFiT83tHpIymOUY2+QELEo2O3SAQR4tDAVHVSxsFX5NY8jEoYiVBA4jOP9lCURqlqlJxbGntUNed5xEQECauIJHpU3g3fT/3cGduWj09AnMA7dt/2+uXftkFbODW25R1xOabi21QbhY7esvIXsBaRZmhZqnOzU/M3gSClKph0/Tkd5i1+JwWw4lVBZFbS8AbxRYrUGIshwFkOgbIhzKdZxh2eQhsvpxFueIVIzmzYORlzreTLbBJ4gUzI5pdtscEh+W5C19D3rDTP6UexRVLZ4RdEhzrrANmBS/zjM8gVQ5xe/4hzHEZwRY26FnrBwAjQ9v2a+anigi85xXKDsPJTIEzVsiAq2gw9hNUFvoTKV06eMg/GgfdMPmNp7vsGhj5XREW1UfY07jA2gPxRw4pDRdfu+iWHEdeb2Lhu+j4vieE+EEPELHOZg0PdzcclEKXDZM9PPMi8nrR96cMFWDwwNPxWV0J2E9DnEfdc6Ks+pmXEjJrTTuJT0aBtlkEk2UVvKx21DC+tj+w8oqXH+0tA2Tm+xwMmcKywAOgIg4jI1OnKa/MWXW9kCbSDZu++yhqQ/0kY2g/d6AQdMinrwKvDsKjk37bJyuINdBuUShuW9aR+ZmGyxbopSNepahDuKWX0FhZ2ChA6ARHaAtFc2Ne2okbUgnSZv7SC9efjqsTtXOLblxovR5B/zJQ3yc5wUV9ixZRckVFh9gW2BaM1EzFTmXT6sBAb37efzfUSDnSb X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(346002)(136003)(366004)(396003)(376002)(39860400002)(2906002)(5660300002)(66476007)(66946007)(66556008)(4326008)(8676002)(8936002)(7416002)(186003)(44832011)(41300700001)(83380400001)(86362001)(82960400001)(316002)(6486002)(478600001)(38100700002)(6916009)(6512007)(53546011)(26005)(54906003)(107886003)(6666004)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J/PsRzLfzgNkpPRprx6s5D7mX6bcGmBJLty2vKfQN8Qaw6YHiE1QU73gIT5S?= =?us-ascii?Q?rutUS5lS5+4eFASDjVaWOjlKgt/5nXxKxxIU9FonKzhjWY/ph6kPbZWaDR2A?= =?us-ascii?Q?z9ZZqGPAHt32/ZCFxHDKASoHa8O/gVjDxddMrUC9amIpGO/1ERl+gis9RvQk?= =?us-ascii?Q?qRsMPUaRifCYNzOASdI1oaw0mliuNVXIF2phq4z8FHOThUzmYkW3lvn9gndD?= =?us-ascii?Q?x95h2fRL4hZDh/T8BEZ1eRqZHsTFuk74CtlrgHEed/YEsH0d06GGrxr+fh9/?= =?us-ascii?Q?T67vO84NfIlqs7iYlhb4yFqyWEy/4M+5FluPbtnV5kp5rSptDL2YHHJfNRaf?= =?us-ascii?Q?KbhBoLww2AmL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2OI+YnY?= =?us-ascii?Q?DBZWW4XZCel23ULKfZnG3V8X6AmcM4zh1y/i1mZH3MHyyRDU1bPT7VMDetbN?= =?us-ascii?Q?8u8/MIKCE5dw0YJlTvdJ9NzFp+RprUsoxLEzrKA6nDuIzFe5vg5Ae6XHLxZB?= =?us-ascii?Q?5d/V+hZJ42zuEARhhgG5cqPN8A7ATCxQ2GlEzUn0G3X61GshSMpeTLf47lmf?= =?us-ascii?Q?/9GCwsgdyTpowqHhowaPyD9O39m5DOhTB8Spoce+4NyyKBDsoUheOMd/v72p?= =?us-ascii?Q?2DNxdeTzmv9K64twZjupSdpYXBUIPm9j6BhucdfQLxfleAwBIE2X9/Rpmkkw?= =?us-ascii?Q?xQPVtSqV2UFz0ouyqIuA1VsshLR2xODaNA82p8klJ/3fMjud5ZcF5y1a6fvU?= =?us-ascii?Q?tA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3d499a13-7693-461f-67ea-08da7149662e X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2022 10:02:09.0808 (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: bkk5fS9ExViefwvNvSxrJZ/RRxS7Zw1S5BOt5x4vaPkHsEqZU1sC2TDyTQzaUWo7FKQzs6yHPeDJJw9WPzd3DMuMnvu4Cf2sFvd+ShGqW/s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3559 X-OriginatorOrg: intel.com 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 On Thu, Jul 28, 2022 at 09:26:16PM +0200, David Marchand wrote: > On Thu, Jul 28, 2022 at 6:57 PM Bruce Richardson > wrote: > > > > On Thu, Jul 28, 2022 at 05:26:35PM +0200, David Marchand wrote: > > > Make rte_bus opaque for non internal users. > > > This will make extending this object possible without breaking the ABI. > > > > > > Introduce a new driver header and move rte_bus definition and helpers. > > > Update drivers and library to use the internal header. > > > > > > Some applications may have been dereferencing rte_bus objects, mark > > > this object's accessors as stable. > > > > > > Signed-off-by: David Marchand > > > --- > > > Changes since RFC v2: > > > - updated release notes, > > > - marked accessors as stable, > > > > > > Changes since RFC v1: > > > - update all existing users of the public header to use the internal one, > > > > > > > Acked-by: Bruce Richardson > > > > One small comment below... > > > > > --- > > > app/test/test_devargs.c | 2 +- > > > > > lib/pcapng/rte_pcapng.c | 2 +- > > > 38 files changed, 343 insertions(+), 319 deletions(-) > > > create mode 100644 lib/eal/include/bus_driver.h > > > > > > diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c > > > index ac5bc34c18..0a4c34a1ad 100644 > > > --- a/app/test/test_devargs.c > > > +++ b/app/test/test_devargs.c > > > @@ -9,7 +9,7 @@ > > > #include > > > #include > > > #include > > > -#include > > > +#include > > > #include > > > > > > > This seems a strange file to need to access bus internals. Maybe something > > to investigate in future. > > Yeah... I am not sure it is worth fixing. > > This code dereferences a bus object to check the ring driver > registered (by calling vdev_bus->parse()). > We could make it possible to list the drivers (maybe per bus, or even globally). > Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name(). > > But I did not find applications needing this so I let the code as is. > Agree it may not be worth fixing. However, if we do look to fix, how about just dropping the runtime check completely and just using a build-time one for the RTE_NET_RING macro. I don't consider it valid for the tests to run with some of the built drivers deleted. If it was enabled in the build, I think the tests are ok to assume it is present at runtime. /Bruce