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 09001A034C; Thu, 28 Jul 2022 21:26:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DDA340151; Thu, 28 Jul 2022 21:26:32 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 13C034014F for ; Thu, 28 Jul 2022 21:26:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659036390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dezfHmq1Xj0kaf5Xqo4tsGkvMD9cUwu6C4fyJ3471oY=; b=EWb/GyiRTSqlPX7JgI3yQuqqat1v6tuvGu5NQV6z6sFiuj/9PLuf+2/lhfSOOzPvp0pZtM Bg2JC2H/NBdaN/RKt/qUJo6M0hYpbhEnUZ6pcmflrDmwBcfdvSlcwpK9ShglI6OGwiegdO Kfw5BT99oa/L1o8b/cECY/im6oKGvcg= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-ZY3zCUBqOaiKGzUNWZ_KiQ-1; Thu, 28 Jul 2022 15:26:29 -0400 X-MC-Unique: ZY3zCUBqOaiKGzUNWZ_KiQ-1 Received: by mail-lf1-f70.google.com with SMTP id w8-20020a197b08000000b00489e72a3025so934868lfc.4 for ; Thu, 28 Jul 2022 12:26:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dezfHmq1Xj0kaf5Xqo4tsGkvMD9cUwu6C4fyJ3471oY=; b=OJUsDkKjJoQ60RSCgZgjuSl3FaxLRKuN70m67SKO4kTu6gxtqH5GgnB8aWJNTVwz2O W5iKtLKX/ZQXH+VEaZr79/0M+nI8X7JpsSQpi4NEpOflTDz9ekvP6+M33cU558VLYKiG UYTZ6N4HGODzdYJptPmh8vpdfNMSHlzft9s3PfHK/3nT7ZGHpFscAZEEs5+zVHctxThp lrgZiAZ3SDUpR4kZOqx1MPQy7J8Oo4OO8rGr7UzMCPDa7etqhryeiUsfkfJoBeeiYt/I d2lJxh/pM9NRtoDc5JIiRDYUr5dNpVnD0Il8LlgAYt9zU8jKBItIZfCNvSIIVT8cy8j8 98wA== X-Gm-Message-State: ACgBeo3DZRm0AcCkXHUx/COiCSR9wr9wShz24ZrYD68YPzzl1Jb6UfZZ AcvIbNGFNpS2FRTox9QkwRIoLvPpUEy8LTPzsaBKDkD4O2BvkmtZzwG+dVlDbRFGYHiThfYKQNC CnlAma1OL1Y1iAg946QU= X-Received: by 2002:a19:ad08:0:b0:48a:d333:c736 with SMTP id t8-20020a19ad08000000b0048ad333c736mr71293lfc.575.1659036387586; Thu, 28 Jul 2022 12:26:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s5VcNGVAlyAqBp75yyaHu3br8EdUN+cWm+8o5xiEdDwsO17NyvCaerkKmDaESmeeg9bMEQkgWdKNB1g2WXej4= X-Received: by 2002:a19:ad08:0:b0:48a:d333:c736 with SMTP id t8-20020a19ad08000000b0048ad333c736mr71272lfc.575.1659036387333; Thu, 28 Jul 2022 12:26:27 -0700 (PDT) MIME-Version: 1.0 References: <20220628144643.1213026-1-david.marchand@redhat.com> <20220728152640.547725-1-david.marchand@redhat.com> <20220728152640.547725-22-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Thu, 28 Jul 2022 21:26:16 +0200 Message-ID: Subject: Re: [RFC v3 21/26] bus: hide bus object To: Bruce Richardson 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 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. -- David Marchand