summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-08-06 16:24:16 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-08-07 23:19:02 +0200
commit2e1141b6f16fbe41ed2da812e3a03810c5724ae7 (patch)
treec4bacae096a4f4098f65078382da46c51e139684 /examples
parent4278f8df470fa76259ed8d1fd52d4995d9fb6557 (diff)
downloaddpdk-2e1141b6f16fbe41ed2da812e3a03810c5724ae7.zip
dpdk-2e1141b6f16fbe41ed2da812e3a03810c5724ae7.tar.gz
dpdk-2e1141b6f16fbe41ed2da812e3a03810c5724ae7.tar.xz
examples/ip_pipeline: fix RSS
After adding RSS hash offload checks, flags that are not supported by the current device result in RSS configuration failing as opposed to unsupported flags being silently discarded. This fix is making sure that only device supported flags are passed to RSS configuration. Fixes: aa1a6d87f15d ("ethdev: force RSS offload rules again") Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Tested-by: Yuan Peng <yuan.peng@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ip_pipeline/link.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 2ccfea4..392a890 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -158,12 +158,9 @@ link_create(const char *name, struct link_params *params)
memcpy(&port_conf, &port_conf_default, sizeof(port_conf));
if (rss) {
port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
- if (port_info.flow_type_rss_offloads & ETH_RSS_IPV4)
- port_conf.rx_adv_conf.rss_conf.rss_hf |=
- ETH_RSS_IPV4;
- if (port_info.flow_type_rss_offloads & ETH_RSS_IPV6)
- port_conf.rx_adv_conf.rss_conf.rss_hf |=
- ETH_RSS_IPV6;
+ port_conf.rx_adv_conf.rss_conf.rss_hf =
+ (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP) &
+ port_info.flow_type_rss_offloads;
}
cpu_id = (uint32_t) rte_eth_dev_socket_id(port_id);