Adding a pattern targeting a single queues wrongly behaves as it is an RSS
request, ending by creating several Verbs flows rules to match the RSS
configuration.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: sta...@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranje...@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 26002c4b9..42381c578 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -912,6 +912,15 @@ priv_flow_convert_finalise(struct priv *priv, struct 
mlx5_flow_parse *parser)
        unsigned int i;
 
        (void)priv;
+       /* Remove any other flow not matching the pattern. */
+       if (parser->queues_n == 1) {
+               for (i = 0; i != hash_rxq_init_n; ++i) {
+                       if (i == parser->layer || !parser->queue[i].ibv_attr)
+                               continue;
+                       rte_free(parser->queue[i].ibv_attr);
+                       parser->queue[i].ibv_attr = NULL;
+               }
+       }
        if (parser->layer == HASH_RXQ_ETH) {
                goto fill;
        } else {
-- 
2.11.0

Reply via email to