2016-06-17 15:12, Jerin Jacob: > Thunderx nicvf also got the same problem when I rebased to > dpdk-next-net/rel_16_07. > > The root cause for this issue is that, PCI CLASS_ID EAL add > changeset(701c8d80c820461e8255dfb7387a09f0e54399f0) > has taken care only the pci devices where id table is created > with RTE_PCI_DEVICE > > For other devices, class_id comes as 0 instread of RTE_CLASS_ANY_ID and > probe failes. To fix it, > > one option is to add RTE_CLASS_ANY_ID for the devices where pci id table is > not > created with RTE_PCI_DEVICE > > or > > somewhere in common-code in the initaization set if class_id = 0 then make it > as > RTE_CLASS_ANY_ID(Thats would be a hack). > > Seems like first option is correct-way to fix the problem? Any thoughts?
The best fix is to use RTE_PCI_DEVICE. If we want to set the class id, we can add a new macro RTE_PCI_ID(class, vend, dev) or maybe RTE_PCI_NET_ID(vend, dev) and RTE_PCI_CRYPTO_ID(vend, dev) > looks like following devices does not exhibit this issue > > [dpdk-thunderx] $ grep -r "RTE_PCI_DEVICE" drivers/ > drivers/net/szedata2/rte_eth_szedata2.c: > drivers/net/bnx2x/bnx2x_ethdev.c > drivers/net/vmxnet3/vmxnet3_ethdev.c > drivers/net/enic/enic_ethdev.c > drivers/net/e1000/em_ethdev.c > drivers/net/ena/ena_ethdev.c > drivers/net/qede/qede_ethdev.c > drivers/net/ixgbe/ixgbe_ethdev.c:#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, > drivers/net/virtio/virtio_ethdev.c:#define > drivers/net/i40e/i40e_ethdev.c:vend, Going further: pci=$(git grep -l rte_pci drivers | cut -d/ -f3 | sort -u) ok=$(git grep -l RTE_PCI_DEVICE drivers | cut -d/ -f3 | sort -u) printf "$pci\n$ok\n$ok" | sort | uniq -u | sed '/^$/d' bonding mlx4 mlx5 nfp qat It seems we need to fix qat, nfp and mlx.