DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
@ 2020-09-10  4:25 Xueming Li
  2020-09-21  9:03 ` Slava Ovsiienko
  2020-10-04 16:55 ` Slava Ovsiienko
  0 siblings, 2 replies; 7+ messages in thread
From: Xueming Li @ 2020-09-10  4:25 UTC (permalink / raw)
  To: Matan Azrad, Viacheslav Ovsiienko; +Cc: dev, Asaf Penso, xuemingl, stable

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@dpdk.org
Signed-off-by: Xueming Li <xuemingl@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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
  2020-09-10  4:25 [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow Xueming Li
@ 2020-09-21  9:03 ` Slava Ovsiienko
  2020-10-04 16:55 ` Slava Ovsiienko
  1 sibling, 0 replies; 7+ messages in thread
From: Slava Ovsiienko @ 2020-09-21  9:03 UTC (permalink / raw)
  To: Xueming(Steven) Li, Matan Azrad
  Cc: dev, Asaf Penso, Xueming(Steven) Li, stable

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Thursday, September 10, 2020 7:26
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li
> <xuemingl@nvidia.com>; stable@dpdk.org
> Subject: [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@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>

Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
  2020-09-10  4:25 [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow Xueming Li
  2020-09-21  9:03 ` Slava Ovsiienko
@ 2020-10-04 16:55 ` Slava Ovsiienko
  2020-10-05  6:45   ` Slava Ovsiienko
  1 sibling, 1 reply; 7+ messages in thread
From: Slava Ovsiienko @ 2020-10-04 16:55 UTC (permalink / raw)
  To: Xueming(Steven) Li, Matan Azrad
  Cc: dev, Asaf Penso, Xueming(Steven) Li, stable

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Thursday, September 10, 2020 7:26
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li
> <xuemingl@nvidia.com>; stable@dpdk.org
> Subject: [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@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
  2020-10-04 16:55 ` Slava Ovsiienko
@ 2020-10-05  6:45   ` Slava Ovsiienko
  0 siblings, 0 replies; 7+ messages in thread
From: Slava Ovsiienko @ 2020-10-05  6:45 UTC (permalink / raw)
  To: dev



-----Original Message-----
From: Slava Ovsiienko 
Sent: Sunday, October 4, 2020 19:56
To: Xueming Li <xuemingl@nvidia.com>; Matan Azrad <matan@nvidia.com>
Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li <xuemingl@nvidia.com>; stable@dpdk.org
Subject: RE: [PATCH] net/mlx5: disable flow dump for Verbs flow

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Thursday, September 10, 2020 7:26
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko 
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li 
> <xuemingl@nvidia.com>; stable@dpdk.org
> Subject: [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@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
  2020-09-10  4:24 Xueming Li
  2020-10-06  8:46 ` Viacheslav Ovsiienko
@ 2020-10-06 15:24 ` Raslan Darawsheh
  1 sibling, 0 replies; 7+ messages in thread
From: Raslan Darawsheh @ 2020-10-06 15:24 UTC (permalink / raw)
  To: Xueming(Steven) Li, Matan Azrad, Slava Ovsiienko; +Cc: dev, Asaf Penso, stable

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xueming Li
> Sent: Thursday, September 10, 2020 7:25 AM
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; stable@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@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev]  [PATCH] net/mlx5: disable flow dump for Verbs flow
  2020-09-10  4:24 Xueming Li
@ 2020-10-06  8:46 ` Viacheslav Ovsiienko
  2020-10-06 15:24 ` Raslan Darawsheh
  1 sibling, 0 replies; 7+ messages in thread
From: Viacheslav Ovsiienko @ 2020-10-06  8:46 UTC (permalink / raw)
  To: xuemingl, dev
  Cc: asafp, matan, stable, viacheslavo,
	\"dev@dpdk.org; Asaf Penso\" <asafp@nvidia.com>;
	Xueming(Steven) Li

From: Slava Ovsiienko <viacheslavo@nvidia.com>

-----Original Message-----
From: Slava Ovsiienko 
Sent: Sunday, October 4, 2020 19:56
To: Xueming Li <xuemingl@nvidia.com>; Matan Azrad <matan@nvidia.com>
Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li <xuemingl@nvidia.com>; stable@dpdk.org
Subject: RE: [PATCH] net/mlx5: disable flow dump for Verbs flow

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Thursday, September 10, 2020 7:26
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko 
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@nvidia.com>; Xueming(Steven) Li 
> <xuemingl@nvidia.com>; stable@dpdk.org
> Subject: [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@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow
@ 2020-09-10  4:24 Xueming Li
  2020-10-06  8:46 ` Viacheslav Ovsiienko
  2020-10-06 15:24 ` Raslan Darawsheh
  0 siblings, 2 replies; 7+ messages in thread
From: Xueming Li @ 2020-09-10  4:24 UTC (permalink / raw)
  To: Matan Azrad, Viacheslav Ovsiienko; +Cc: dev, Asaf Penso, stable

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@dpdk.org
Signed-off-by: Xueming Li <xuemingl@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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-06 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  4:25 [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow Xueming Li
2020-09-21  9:03 ` Slava Ovsiienko
2020-10-04 16:55 ` Slava Ovsiienko
2020-10-05  6:45   ` Slava Ovsiienko
  -- strict thread matches above, loose matches on Subject: below --
2020-09-10  4:24 Xueming Li
2020-10-06  8:46 ` Viacheslav Ovsiienko
2020-10-06 15:24 ` Raslan Darawsheh

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git