aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/dpdk.h1
-rw-r--r--src/plugins/dpdk/device/format.c16
-rw-r--r--src/plugins/dpdk/device/init.c12
3 files changed, 23 insertions, 6 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index c39f1f950c6..f75cd99e5d3 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -515,6 +515,7 @@ format_function_t format_dpdk_rx_trace;
format_function_t format_dpdk_rte_mbuf;
format_function_t format_dpdk_rx_rte_mbuf;
format_function_t format_dpdk_flow;
+format_function_t format_dpdk_rss_hf_name;
unformat_function_t unformat_dpdk_log_level;
vnet_flow_dev_ops_function_t dpdk_flow_ops_fn;
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 2c9a7d30513..be828932c80 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -45,22 +45,28 @@
_ (rx_errors, q_errors)
#define foreach_dpdk_rss_hf \
+ _(ETH_RSS_IPV4, "ipv4") \
_(ETH_RSS_FRAG_IPV4, "ipv4-frag") \
_(ETH_RSS_NONFRAG_IPV4_TCP, "ipv4-tcp") \
_(ETH_RSS_NONFRAG_IPV4_UDP, "ipv4-udp") \
_(ETH_RSS_NONFRAG_IPV4_SCTP, "ipv4-sctp") \
_(ETH_RSS_NONFRAG_IPV4_OTHER, "ipv4-other") \
- _(ETH_RSS_IPV4, "ipv4") \
- _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \
- _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \
+ _(ETH_RSS_IPV6, "ipv6") \
_(ETH_RSS_FRAG_IPV6, "ipv6-frag") \
_(ETH_RSS_NONFRAG_IPV6_TCP, "ipv6-tcp") \
_(ETH_RSS_NONFRAG_IPV6_UDP, "ipv6-udp") \
_(ETH_RSS_NONFRAG_IPV6_SCTP, "ipv6-sctp") \
_(ETH_RSS_NONFRAG_IPV6_OTHER, "ipv6-other") \
+ _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \
+ _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \
_(ETH_RSS_L2_PAYLOAD, "l2-payload") \
_(ETH_RSS_IPV6_EX, "ipv6-ex") \
- _(ETH_RSS_IPV6, "ipv6")
+ _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \
+ _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \
+ _(ETH_RSS_PORT, "port") \
+ _(ETH_RSS_VXLAN, "vxlan") \
+ _(ETH_RSS_GENEVE, "geneve") \
+ _(ETH_RSS_NVGRE, "nvgre")
#define foreach_dpdk_rx_offload_caps \
@@ -426,7 +432,7 @@ if (bitmap & v) { \
s = format(s, "%s ", str); \
}
-static u8 *
+u8 *
format_dpdk_rss_hf_name (u8 * s, va_list * args)
{
u64 bitmap = va_arg (*args, u64);
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;