Skip to contentSkip to conversation

net/mlx5: disable flow dump for Verbs flow

PATCH In review Xueming Li 4 participants 5 messages Sep 10, 2020 – Oct 8, 2020 Network drivers

lore
Share & tools
lore

Xueming Li

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/mlx5/mlx5_flow.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
index 4c29898203..5a28b80ee4 100644
@@ -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);
 }
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 net/mlx5: disable flow dump for Verbs flow

From: Slava Ovsiienko <[email protected]>

-----Original Message-----
From: Slava Ovsiienko
Sent: Sunday, October 4, 2020 19:56
To: Xueming Li <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; Xueming(Steven) Li <[email protected]>; [email protected]
Subject: RE: [PATCH] net/mlx5: disable flow dump for Verbs flow

Quoted 14 lines

-----Original Message-----
From: Xueming Li <[email protected]>
Sent: Thursday, September 10, 2020 7:26
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; Xueming(Steven) Li <[email protected]>; [email protected]
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.

Quoted 5 lines

This patch adds verbs engine check, prints warning message and return gracefully.

#2 lore raw
In reply to Xueming Li

Hi,

Quoted 38 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xueming Li
Sent: Thursday, September 10, 2020 7:25 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; [email protected]
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.

---
 drivers/net/mlx5/mlx5_flow.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
index 4c29898203..5a28b80ee4 100644
@@ -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);
Quoted 3 lines

}
--
2.25.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

#3 lore raw
Quoted 20 lines · Raslan Darawsheh

Hi,

Quoted 18 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xueming Li
Sent: Thursday, September 10, 2020 7:25 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; [email protected]
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.

Can you please provide the fixed commit information? That is required to figure out which stable tress to backport.

Quoted 30 lines
Quoted 20 lines
---
  drivers/net/mlx5/mlx5_flow.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/net/mlx5/mlx5_flow.c +5 -0
index 4c29898203..5a28b80ee4 100644
@@ -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);
Quoted 3 lines

}
--
2.25.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

#4 lore raw

Hi,

Quoted 26 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Wednesday, October 7, 2020 12:56 PM
To: Raslan Darawsheh <[email protected]>; Xueming(Steven) Li <[email protected]>; Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: disable flow dump for Verbs flow

Quoted 15 lines · Raslan Darawsheh

Hi,

Quoted 13 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Xueming Li
Sent: Thursday, September 10, 2020 7:25 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Asaf Penso <[email protected]>; [email protected]
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.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

This patch adds verbs engine check, prints warning message and return gracefully.

Can you please provide the fixed commit information? That is required to figure out which stable tress to backport.

Fixes f6d7202402c9 ("net/mlx5: support flow dump API")

Just added to next-net-mlx tree and pushed

Kindest regards
Raslan Darawsheh