net/vdev_netvsc: fix routed devices probing
authorMatan Azrad <matan@mellanox.com>
Tue, 27 Feb 2018 14:22:03 +0000 (14:22 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
commitb0c0efb4fdea0807ed43e59ca4f07b1fd2a807da
treebfa693fc9ca206357f405282b16c1d11b37e09fa
parent653e038efc9bba32420db094219368fdaffc11b0
net/vdev_netvsc: fix routed devices probing

NetVSC netdevices which are already routed should not be probed because
they are used for management purposes by the HyperV.

The corrupted code got the routed devices from the system file
/proc/net/route and wrongly parsed only the odd lines, so devices which
their routes were in even lines, were considered as unrouted devices
and were probed.

Use linux netlink lib to detect the routed NetVSC devices instead of
file parsing.

Fixes: 31182fadfb21 ("net/vdev_netvsc: skip routed netvsc probing")
Cc: stable@dpdk.org
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Matan Azrad <matan@mellanox.com>
drivers/net/vdev_netvsc/vdev_netvsc.c