[dpdk-dev] net/mlx5: fix flow creation with a single target queue
Checks
Commit Message
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: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
On Wed, Feb 14, 2018 at 04:04:45PM +0100, Nelio Laranjeiro wrote:
> 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: stable@dpdk.org
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Wednesday, February 14, 2018 5:40 PM, Adrien Mazarguil
> On Wed, Feb 14, 2018 at 04:04:45PM +0100, Nelio Laranjeiro wrote:
> > 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: stable@dpdk.org
> >
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Applied to next-net-mlx, thanks.
>
> --
> Adrien Mazarguil
> 6WIND
@@ -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 {