DPDK patches and discussions
 help / color / mirror / Atom feed
From: Elena Agostini <eagostini@nvidia.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	Bing Zhao <bingz@nvidia.com>
Subject: Re: [PATCH v1] bus/pci: get PCI address from rte_device
Date: Wed, 31 May 2023 08:51:46 +0000	[thread overview]
Message-ID: <DM6PR12MB4107E9F20F7ED78DF0FA3997CD489@DM6PR12MB4107.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8yPNHhijjL7D2JQHb3NCug1JQgnn6M-MQsoBvutt2t-dA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2073 bytes --]

> On Wed, May 31, 2023 at 10:44 AM Elena Agostini eagostini@nvidia.com<mailto:eagostini@nvidia.com> wrote:
> >
> > > On Tue, May 30, 2023 at 1:48 PM eagostini@nvidia.com<mailto:eagostini@nvidia.com> wrote:
> >
> > > >
> >
> > > > From: Elena Agostini eagostini@nvidia.com<mailto:eagostini@nvidia.com>
> >
> > > >
> >
> > > > In DPDK 22.11 pci bus related structure have been hidden internally
> >
> > > > so the application doesn't have a direct access to those info anymore.
> >
> > > >
> >
> > > > This patch introduces a get function to retrieve a PCI address
> >
> > > > from an rte_device handler.
> >
> > > >
> >
> > > > Signed-off-by: Elena Agostini eagostini@nvidia.com<mailto:eagostini@nvidia.com>
> >
> > >
> >
> > > (no need to Cc: stable, I removed it)
> >
> > >
> >
> > > I would prefer we don't add specific bus API when there is an alternative.
> >
> > >
> >
> > > The PCI address is already reported as a string in the generic device
> >
> > > object name.
> >
> > > I checked the different ways this name is set and afaics, it is consistent:
> >
> > > - devarg case https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n112
> >
> > > + https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_params.c#n117
> >
> > > - no devarg case
> >
> > > https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n115 +
> >
> > > https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n100
> >
> > >
> >
> > > Would that be enough for your usecase?
> >
> >
> >
> > No as I need to parse anyway the PCI address string in the form of domain/bus/devid/function.>

> I am curious. Can you explain why you would need such information?>

Use-case is the Aerial 5G where two processes have to exchange info
about PCI devices sending messages according to some specific format.

> >
> > Also, the device name can be changed as it’s exposed to application level.>

> ?
> If you mean the application can bust the device name, well, it's the
> application problem.>
>

> --
> David Marchand

[-- Attachment #2: Type: text/html, Size: 9653 bytes --]

  reply	other threads:[~2023-05-31  8:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 11:42 eagostini
2023-05-30 13:47 ` Thomas Monjalon
2023-05-31  8:03 ` David Marchand
2023-05-31  8:44   ` Elena Agostini
2023-05-31  8:47     ` David Marchand
2023-05-31  8:51       ` Elena Agostini [this message]
2023-05-31  9:52         ` David Marchand
2023-10-18 11:00           ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB4107E9F20F7ED78DF0FA3997CD489@DM6PR12MB4107.namprd12.prod.outlook.com \
    --to=eagostini@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).