dpdk: show hardware may display the wrong information for rss active 66/16766/2
authorSteven <sluong@cisco.com>
Fri, 11 Jan 2019 16:29:41 +0000 (08:29 -0800)
committerDamjan Marion <dmarion@me.com>
Sun, 13 Jan 2019 13:35:55 +0000 (13:35 +0000)
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 <sluong@cisco.com>
src/plugins/dpdk/device/format.c

index bbc61e3..3b18387 100644 (file)
@@ -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);