summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-16 13:24:30 +0200
committerDave Barach <openvpp@barachs.net>2018-08-16 13:55:17 +0000
commit9daf8fb6b36f6e23951d6fe479248c092617c402 (patch)
tree5b5ff2ac53919ef4f0c0b2fdc689f8208e15eb28 /src/plugins/dpdk/device/init.c
parent4657c27b8874b51cf90645ed71150d9400d65832 (diff)
dpdk: fix rss hash function handling
DPDK 18.08 verifies if all set bits are supported and fails if not.... Change-Id: Ia87242fcda11147dff3bebe2e2bef32f0a8891fb Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rw-r--r--src/plugins/dpdk/device/init.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 5dd15ab3c98..9b14c1a9d4f 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -387,7 +387,17 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->port_conf.rx_adv_conf.rss_conf.rss_hf =
ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP;
else
- xd->port_conf.rx_adv_conf.rss_conf.rss_hf = devconf->rss_fn;
+ {
+ u64 unsupported_bits;
+ xd->port_conf.rx_adv_conf.rss_conf.rss_hf = devconf->rss_fn;
+ unsupported_bits = xd->port_conf.rx_adv_conf.rss_conf.rss_hf;
+ unsupported_bits &= ~dev_info.flow_type_rss_offloads;
+ if (unsupported_bits)
+ dpdk_log_warn ("Unsupported RSS hash functions: %U",
+ format_dpdk_rss_hf_name, unsupported_bits);
+ }
+ xd->port_conf.rx_adv_conf.rss_conf.rss_hf &=
+ dev_info.flow_type_rss_offloads;
}
else
xd->rx_q_used = 1;