net/vdev_netvsc: fix automatic probing
authorMatan Azrad <matan@mellanox.com>
Mon, 21 May 2018 16:23:30 +0000 (16:23 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
commit83d63f0903b3951c76a4508693e8bade582b28b0
treeefc5672124439e1cb0a668f03648abac893a573d
parent5bfe551d0a6c03d3b4cad5be8ff1305dbee85086
net/vdev_netvsc: fix automatic probing

The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems
unless it was already specified by the EAL command line.

The detection of a specified NetVSC device is wrongly done by comparing
the vdev_netvsc driver name to all the vdev devices names, including
the suffix device index. Thus, if the user specifies the vdev_netvsc
device by adding an index to the device name, the comparison fails.
Consequently, the vdev_netvsc driver may automatically probe NetVSC
devices, despite the NetVSC device that was specified by the EAL command
line.

Compare the vdev_netvsc driver name to the devices names without the
index.

Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
drivers/net/vdev_netvsc/vdev_netvsc.c