[dpdk-dev] [PATCH] net/mlx5: fix validation of Rx queue number
shahafs at mellanox.com
Thu Dec 6 12:34:39 CET 2018
Wednesday, November 28, 2018 11:16 AM, Dekel Peled:
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix validation of Rx queue number
> Function mlx5_ctrl_flow_vlan() is used to set the rss rule in
> MLX5 PMD, using priv->reta_idx_n as number of Rx queues.
> This number is passed to mlx5_flow_validate_action_rss(), which attempts
> to access the Rx queues at priv->rxqs.
> In case priv->rxqs_n is 0, priv->rxqs is empty, and
> mlx5_flow_validate_action_rss() will crash with segmentation fault.
> priv->reta_idx_n can never be 0, even if priv->rxqs_n is set to 0.
> But when priv->rxqs_n is set to 0, setting the rss rule is invalid.
> This patch updates mlx5_ctrl_flow_vlan(), if priv->rxqs_n is 0 the function will
> fail with EINVAL errno.
> Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
> Cc: nelio.laranjeiro at 6wind.com
> Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Applied to next-net-mlx, thanks.
More information about the dev