patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'net/mlx5: fix VLAN push action validation' has been queued to stable release 21.11.1
@ 2022-03-16 15:15 Kevin Traynor
  2022-03-16 15:15 ` patch 'net/mlx5: fix sample flow action on trusted device' " Kevin Traynor
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Kevin Traynor @ 2022-03-16 15:15 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/21/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0d0b9a3c5b81592d9b2a4153e96016f140638365

Thanks.

Kevin

---
From 0d0b9a3c5b81592d9b2a4153e96016f140638365 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 9 Mar 2022 09:39:20 +0000
Subject: [PATCH] net/mlx5: fix VLAN push action validation

[ upstream commit 7c0c63c9a53964d40b27da618ab94303f28ea92e ]

Flow domain and direction was validated when OF_PUSH_VLAN action
appears in flow actions. Flow was rejected whenever this action:

- was used in NIC domain, in ingress direction;
- was used in FDB domain, in ingress direction, on ConnectX-5.

This validation logic rejected a valid case when the OF_PUSH_VLAN
action was used when directing traffic to the hairpin queue,
configured in TX implicit mode.

This patch moves code responsible for OF_PUSH_VLAN validation of
domain and direction from flow_dv_validate_push_vlan() to
flow_dv_validate(). Domain and direction are now validated when either
non-hairpin queue is used or hairpin queue is configured in Tx explicit
mode.

Fixes: 96f85ec489db ("net/mlx5: check VLAN push/pop support")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 46 ++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 28843fe9e6..b8a4edae65 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2878,6 +2878,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
 	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
 	const struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_dev_ctx_shared *sh = priv->sh;
-	bool direction_error = false;
 
 	if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) &&
@@ -2891,20 +2889,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
 					  "wrong action order, port_id should "
 					  "be after push VLAN");
-	/* Push VLAN is not supported in ingress except for CX6 FDB mode. */
-	if (attr->transfer) {
-		bool fdb_tx = priv->representor_id != UINT16_MAX;
-		bool is_cx5 = sh->steering_format_version ==
-		    MLX5_STEERING_LOGIC_FORMAT_CONNECTX_5;
-
-		if (!fdb_tx && is_cx5)
-			direction_error = true;
-	} else if (attr->ingress) {
-		direction_error = true;
-	}
-	if (direction_error)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
-					  NULL,
-					  "push vlan action not supported for ingress");
 	if (!attr->transfer && priv->representor)
 		return rte_flow_error_set(error, ENOTSUP,
@@ -7999,4 +7981,26 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						  NULL, "encap and decap "
 						  "combination aren't supported");
+		/* Push VLAN is not supported in ingress except for NICs newer than CX5. */
+		if (action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN) {
+			struct mlx5_dev_ctx_shared *sh = priv->sh;
+			bool direction_error = false;
+
+			if (attr->transfer) {
+				bool fdb_tx = priv->representor_id != UINT16_MAX;
+				bool is_cx5 = sh->steering_format_version ==
+				    MLX5_STEERING_LOGIC_FORMAT_CONNECTX_5;
+
+				if (!fdb_tx && is_cx5)
+					direction_error = true;
+			} else if (attr->ingress) {
+				direction_error = true;
+			}
+			if (direction_error)
+				return rte_flow_error_set(error, ENOTSUP,
+							  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
+							  NULL,
+							  "push VLAN action not supported "
+							  "for ingress");
+		}
 		if (!attr->transfer && attr->ingress) {
 			if (action_flags & MLX5_FLOW_ACTION_ENCAP)
@@ -8006,10 +8010,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						 NULL, "encap is not supported"
 						 " for ingress traffic");
-			else if (action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN)
-				return rte_flow_error_set
-						(error, ENOTSUP,
-						 RTE_FLOW_ERROR_TYPE_ACTION,
-						 NULL, "push VLAN action not "
-						 "supported for ingress");
 			else if ((action_flags & MLX5_FLOW_VLAN_ACTIONS) ==
 					MLX5_FLOW_VLAN_ACTIONS)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-16 15:14:12.153294298 +0000
+++ 0001-net-mlx5-fix-VLAN-push-action-validation.patch	2022-03-16 15:14:12.050847415 +0000
@@ -1 +1 @@
-From 7c0c63c9a53964d40b27da618ab94303f28ea92e Mon Sep 17 00:00:00 2001
+From 0d0b9a3c5b81592d9b2a4153e96016f140638365 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c0c63c9a53964d40b27da618ab94303f28ea92e ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 29751e7eda..1746ef37bd 100644
+index 28843fe9e6..b8a4edae65 100644
@@ -35 +36 @@
-@@ -2874,6 +2874,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
+@@ -2878,6 +2878,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
@@ -42 +43 @@
-@@ -2887,20 +2885,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
+@@ -2891,20 +2889,4 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
@@ -63 +64 @@
-@@ -7997,4 +7979,26 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7999,4 +7981,26 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -90 +91 @@
-@@ -8004,10 +8008,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -8006,10 +8010,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,


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

end of thread, other threads:[~2022-03-16 15:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 15:15 patch 'net/mlx5: fix VLAN push action validation' has been queued to stable release 21.11.1 Kevin Traynor
2022-03-16 15:15 ` patch 'net/mlx5: fix sample flow action on trusted device' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/mlx5: forbid multiple ASO actions in a single rule' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/mlx5: fix implicit tag insertion with sample action' " Kevin Traynor
2022-03-16 15:15 ` patch 'doc: fix modify field action description for mlx5' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/qede: fix Tx completion' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/qede: fix Rx bulk' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/qede: fix maximum Rx packet length' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/af_xdp: fix custom program loading with multiple queues' " Kevin Traynor
2022-03-16 15:15 ` patch 'crypto/ipsec_mb: fix GCM requested digest length' " Kevin Traynor
2022-03-16 15:15 ` patch 'bpf: fix build with some libpcap version on FreeBSD' " Kevin Traynor
2022-03-16 15:15 ` patch 'app/regex: fix number of matches' " Kevin Traynor
2022-03-16 15:15 ` patch 'app/testpmd: fix show RSS RETA on Windows' " Kevin Traynor
2022-03-16 15:15 ` patch 'app/testpmd: fix GTP header parsing in checksum engine' " Kevin Traynor
2022-03-16 15:15 ` patch 'app/testpmd: fix flow rule with flex input link' " Kevin Traynor
2022-03-16 15:15 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " Kevin Traynor
2022-03-16 15:15 ` patch 'eal/freebsd: add missing C++ include guards' " Kevin Traynor
2022-03-16 15:15 ` patch 'compressdev: fix missing space in log macro' " Kevin Traynor
2022-03-16 15:15 ` patch 'cryptodev: fix clang C++ include' " Kevin Traynor
2022-03-16 15:15 ` patch 'eventdev: " Kevin Traynor
2022-03-16 15:15 ` patch 'build: suppress rte_crypto_asym_op abi check' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/mlx5: fix port matching in sample flow rule' " Kevin Traynor
2022-03-16 15:15 ` patch 'net/mlx5: fix CPU socket ID for Rx queue creation' " Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).