31/07/2017 14:58, Gaetan Rivet: > Checking against error values returned by rte_eal_hotplug_add is > inelegant and prone to mistakes. Additionally, the failed PCI probe > prints a useless error that would throw off unsuspecting users: > > ERROR: failed to parse device "pci:net_ring0" > > This error is printed when attempting to probe a virtual device first > with the PCI bus (here, a net_ring0 device), which will inevitably fail. > > Use the relevant functions to infer the intended bus. The limitation to > PCI or vdev device is kept for strict API compatibility. Thus the PCI > probe attempt is avoided and the right function is directly called. > > Fixes: 1c35f666df07 ("dev: fix attach proceeding with vdev on PCI > success") > > Signed-off-by: Gaetan Rivet <gaetan.ri...@6wind.com>
Applied with additional explanation from v1, thanks: dev: fix vdev attach after PCI mismatch If the device is a vdev, the parsing for PCI will fail with -EFAULT, and will not try to check for a vdev.