All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] examples/ip_pipeline: fix RSS
@ 2018-08-06 15:24 Cristian Dumitrescu
  2018-08-07 21:18 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Cristian Dumitrescu @ 2018-08-06 15:24 UTC (permalink / raw)
  To: dev; +Cc: thomas

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: Peng, Yuan <yuan.peng@intel.com>
---
 examples/ip_pipeline/link.c | 9 +++------
 1 file 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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] examples/ip_pipeline: fix RSS
  2018-08-06 15:24 [PATCH v2] examples/ip_pipeline: fix RSS Cristian Dumitrescu
@ 2018-08-07 21:18 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-08-07 21:18 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: dev

06/08/2018 17:24, Cristian Dumitrescu:
> 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: Peng, Yuan <yuan.peng@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-07 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-06 15:24 [PATCH v2] examples/ip_pipeline: fix RSS Cristian Dumitrescu
2018-08-07 21:18 ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.