From: Steven Date: Fri, 11 Jan 2019 16:29:41 +0000 (-0800) Subject: dpdk: show hardware may display the wrong information for rss active X-Git-Tag: v19.04-rc0~11 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=e589b38f98e9d8f88a3bae56549ea49d9d802989;p=vpp.git dpdk: show hardware may display the wrong information for rss active Some dpdk driver does not support rte_eth_dev_rss_hash_conf_get. When that happens, we display whatever that was in the stack variable for rss_hf which is confusing. The fix is to clear rss_hf prior to the call. Before the fix -------------- DBGvpp# sh hard Name Idx Link Hardware format_dpdk_device:599: rte_eth_dev_rss_hash_conf_get returned -95 GigabitEthernet13/0/0 2 up GigabitEthernet13/0/0 Link speed: 10 Gbps Ethernet address 00:0c:29:c4:8c:eb VMware VMXNET3 ... rss avail: ipv4 ipv4-tcp ipv6 ipv6-tcp rss active: ipv4 ipv4-frag ipv4-tcp ipv4-udp ipv4-other After the fix ------------- DBGvpp# sh hard Name Idx Link Hardware format_dpdk_device:600: rte_eth_dev_rss_hash_conf_get returned -95 GigabitEthernet13/0/0 2 up GigabitEthernet13/0/0 Link speed: 10 Gbps Ethernet address 00:0c:29:c4:8c:eb VMware VMXNET3 .. rss avail: ipv4 ipv4-tcp ipv6 ipv6-tcp rss active: none Change-Id: If8f8327f0012eecc8d23cd7f3f9cc581ca025654 Signed-off-by: Steven --- diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index bbc61e38fc9..3b183871993 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -594,6 +594,7 @@ format_dpdk_device (u8 * s, va_list * args) int retval; rss_conf.rss_key = 0; + rss_conf.rss_hf = 0; retval = rte_eth_dev_rss_hash_conf_get (xd->port_id, &rss_conf); if (retval < 0) clib_warning ("rte_eth_dev_rss_hash_conf_get returned %d", retval);