[dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
Raslan Darawsheh
rasland at nvidia.com
Tue Oct 6 17:24:26 CEST 2020
Hi,
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Xueming Li
> Sent: Thursday, September 10, 2020 7:25 AM
> To: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>
> Cc: dev at dpdk.org; Asaf Penso <asafp at nvidia.com>; stable at dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
>
> There was a segment fault when dump flows with device argument of
> dv_flow_en=0. In such case, Verbs flow engine was enabled and fdb
> resources were not initialized. It's suggested to use mlx_fs_dump
> for Verbs flow dump.
>
> This patch adds verbs engine check, prints warning message and return
> gracefully.
>
> Cc: stable at dpdk.org
> Signed-off-by: Xueming Li <xuemingl at nvidia.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 4c29898203..5a28b80ee4 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -6268,6 +6268,11 @@ mlx5_flow_dev_dump(struct rte_eth_dev *dev,
> struct mlx5_priv *priv = dev->data->dev_private;
> struct mlx5_dev_ctx_shared *sh = priv->sh;
>
> + if (!priv->config.dv_flow_en) {
> + if (fputs("device dv flow disabled\n", file) <= 0)
> + return -errno;
> + return -ENOTSUP;
> + }
> return mlx5_devx_cmd_flow_dump(sh->fdb_domain, sh-
> >rx_domain,
> sh->tx_domain, file);
> }
> --
> 2.25.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list