summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/format.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2019-01-11 08:29:41 -0800
committerDamjan Marion <dmarion@me.com>2019-01-13 13:35:55 +0000
commite589b38f98e9d8f88a3bae56549ea49d9d802989 (patch)
treeee0b3daf511d7eb4d04063e313305db98af90169 /src/plugins/dpdk/device/format.c
parentb5e55a27a46f166f466c7996675542de645eff66 (diff)
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 <sluong@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/format.c')
-rw-r--r--src/plugins/dpdk/device/format.c1
1 files changed, 1 insertions, 0 deletions
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);