[dpdk-users] Getting pci id using port id with latest DPDK

Mike Shang mshang5 at gmail.com
Thu Mar 23 08:47:18 CET 2017

I have legacy code that needs to get pci id using port id in order to make
different config for different pci device. In the past, we can do that with
a simple call to rte_eth_dev_info_get() and look into the pci_dev file in
rte_eth_dev_info structure. But with latest DPDK, rte_eth_dev_info_get() no
longer fills pci_dev after this commit (
) Looks like the developers wanted to decouple pci device from a general
Under such condition, how can I get the needed pci id from port id ? I scan
all function listed in rte_ethdev.h but didn't find such function. Maybe
there an indirect to do that? as a last resort, I can patch the dpdk source
code to make rte_eth_dev_info_get() fill pci_dev again but that may be the
last thing I would consider.....

More information about the users mailing list