23/06/2017 20:20, Daniel Verkamp: > Some PCI vendor and device IDs have leading zeros. > > Signed-off-by: Daniel Verkamp <daniel.verk...@intel.com> > --- > --- a/lib/librte_eal/common/include/rte_pci.h > +++ b/lib/librte_eal/common/include/rte_pci.h > @@ -68,6 +68,9 @@ const char *pci_get_sysfs_path(void); > /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */ > #define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 > > +/** Formatting string for PCI vendor and device ID: Ex: 1234:5678 */ > +#define PCI_ID_PRI_FMT "%.4" PRIx16 ":%.4" PRIx16
Why not printing the whole PCI infos with domain and function? Note: public macros should be prefixed with RTE_