net/bonding: support bifurcated driver in eal
authorGowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Wed, 20 Sep 2017 18:04:58 +0000 (23:34 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:50 +0000 (02:49 +0200)
commitc848b518bbc7c1c22205fb0260cdfff1fa1f0595
tree02e8d09ae7b1fb0361268322692d18d38d762642
parentb21ed3e2a16d9bae48301e7e7ddfd329fce3f379
net/bonding: support bifurcated driver in eal

At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr(), as below.

testpmd <EAL args> --vdev 'net_bonding0,mode=1,slave=<PCI>,socket_id=0'

PMD: bond_ethdev_parse_slave_port_kvarg(150) - Invalid slave port value
 (<PCI ID>) specified
EAL: Failed to parse slave ports for bonded device net_bonding0

This patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.

Fixes: eac901ce29be ("ethdev: decouple from PCI device")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/bonding/rte_eth_bond_args.c