dpdk: fix pmd device type when using netvsc or failsafe 29/15729/2
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 5 Nov 2018 19:32:31 +0000 (11:32 -0800)
committerDamjan Marion <dmarion@me.com>
Tue, 6 Nov 2018 11:51:39 +0000 (11:51 +0000)
The pmd device type show with 'show hardware' is wrong if using failsafe
(or netvsc pmd) because the pmd device type should be based of the VPP device
instance, not the DPDK port id.

Fixes: a059a000f81a ("dpdk: Decoupling the meaning of xd->device_index in dpdk_plugin")
Change-Id: I3880fe674731880c5706a21d8ef3ccf8d569d46d
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
src/plugins/dpdk/device/format.c

index d7685eb..579de9c 100644 (file)
@@ -568,7 +568,7 @@ format_dpdk_device (u8 * s, va_list * args)
   rte_eth_dev_info_get (xd->port_id, &di);
 
   s = format (s, "%U\n%Ucarrier %U",
-             format_dpdk_device_type, xd->port_id,
+             format_dpdk_device_type, dev_instance,
              format_white_space, indent + 2, format_dpdk_link_status, xd);
   s = format (s, "%Uflags: %U\n",
              format_white_space, indent + 2, format_dpdk_device_flags, xd);