[dpdk-stable] patch 'net/mlx4: fix ignored RSS hash types' has been queued to stable release 18.02.2
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Apr 30 16:53:36 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.02.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From fd5885ebc62c5b5b6d674057773a0d8fd5a64dca Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Date: Thu, 19 Apr 2018 12:07:27 +0200
Subject: [PATCH] net/mlx4: fix ignored RSS hash types
[ upstream commit ef134c8daa0873daa3aa9b02313d6f452c3477a2 ]
When an unsupported hash type is part of a RSS configuration structure, it
is silently ignored instead of triggering an error. This may lead
applications to assume that such types are accepted, while they are in fact
not part of the resulting flow rules.
Fixes: 078b8b452e6b ("net/mlx4: add RSS flow rule action support")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
drivers/net/mlx4/mlx4_flow.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index a3b4480b4..4d26df326 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -706,6 +706,7 @@ fill:
const struct rte_flow_action_queue *queue;
const struct rte_flow_action_rss *rss;
const struct rte_eth_rss_conf *rss_conf;
+ uint64_t fields;
unsigned int i;
case RTE_FLOW_ACTION_TYPE_VOID:
@@ -780,10 +781,15 @@ fill:
" of the context size";
goto exit_action_not_supported;
}
+ rte_errno = 0;
+ fields = mlx4_conv_rss_hf(priv, rss_conf->rss_hf);
+ if (fields == (uint64_t)-1 && rte_errno) {
+ msg = "unsupported RSS hash type requested";
+ goto exit_action_not_supported;
+ }
flow->rss = mlx4_rss_get
- (priv,
- mlx4_conv_rss_hf(priv, rss_conf->rss_hf),
- rss_conf->rss_key, rss->num, rss->queue);
+ (priv, fields, rss_conf->rss_key, rss->num,
+ rss->queue);
if (!flow->rss) {
msg = "either invalid parameters or not enough"
" resources for additional multi-queue"
--
2.14.2
More information about the stable
mailing list