From: Stephen Hemminger Date: Mon, 5 Nov 2018 19:32:31 +0000 (-0800) Subject: dpdk: fix pmd device type when using netvsc or failsafe X-Git-Tag: v19.04-rc0~459 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=ef101310f4068abc61d43c1b08165c7a2018132d;p=vpp.git dpdk: fix pmd device type when using netvsc or failsafe 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 --- diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index d7685ebe627..579de9c5601 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -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);