On Wed, May 31, 2023 at 10:44 AM Elena Agostini <eagost...@nvidia.com> wrote: > > > On Tue, May 30, 2023 at 1:48 PM eagost...@nvidia.com wrote: > > > > > > > > From: Elena Agostini eagost...@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 eagost...@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? > > 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