DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: reject jump to root table
@ 2022-01-18 11:38 Xiaoyu Min
  2022-01-26 15:28 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaoyu Min @ 2022-01-18 11:38 UTC (permalink / raw)
  To: Matan Azrad, Viacheslav Ovsiienko, Dekel Peled; +Cc: dev, stable

Currently root table as destination is not supported.
The jump action which finally be translated to underlying root table in
rdma-core should be rejected.

Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8022d7d11f..ec5d1816bc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4982,7 +4982,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
 			     const struct rte_flow_attr *attributes,
 			     bool external, struct rte_flow_error *error)
 {
-	uint32_t target_group, table;
+	uint32_t target_group, table = 0;
 	int ret = 0;
 	struct flow_grp_info grp_info = {
 		.external = !!external,
@@ -5013,6 +5013,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "target group must be other than"
 					  " the current flow group");
+	if (table == 0)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  NULL, "root table shouldn't be destination");
 	return 0;
 }
 
-- 
2.34.1


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

* RE: [PATCH] net/mlx5: reject jump to root table
  2022-01-18 11:38 [PATCH] net/mlx5: reject jump to root table Xiaoyu Min
@ 2022-01-26 15:28 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2022-01-26 15:28 UTC (permalink / raw)
  To: Jack Min, Matan Azrad, Slava Ovsiienko, Dekel Peled; +Cc: dev, stable

Hi,

> -----Original Message-----
> From: Xiaoyu Min <jackmin@nvidia.com>
> Sent: Tuesday, January 18, 2022 1:39 PM
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Dekel Peled <dekelp@mellanox.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: reject jump to root table
> 
> Currently root table as destination is not supported.
> The jump action which finally be translated to underlying root table in
> rdma-core should be rejected.
> 
> Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


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

end of thread, other threads:[~2022-01-26 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 11:38 [PATCH] net/mlx5: reject jump to root table Xiaoyu Min
2022-01-26 15:28 ` Raslan Darawsheh

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).