[PATCH v1] bus/pci: get PCI address from rte_device
Elena Agostini
eagostini at nvidia.com
Wed May 31 10:51:46 CEST 2023
> On Wed, May 31, 2023 at 10:44 AM Elena Agostini eagostini at nvidia.com<mailto:eagostini at nvidia.com> wrote:
> >
> > > On Tue, May 30, 2023 at 1:48 PM eagostini at nvidia.com<mailto:eagostini at nvidia.com> wrote:
> >
> > > >
> >
> > > > From: Elena Agostini eagostini at nvidia.com<mailto:eagostini at 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 at nvidia.com<mailto:eagostini at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230531/0c7ace58/attachment-0001.htm>
More information about the dev
mailing list