patch 'net/mlx5/hws: skip item when inserting rules by index' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:48:45 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.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 04/15/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b80ca5960e391dc055f9571beaf0a2927929d6d3

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From b80ca5960e391dc055f9571beaf0a2927929d6d3 Mon Sep 17 00:00:00 2001
From: Itamar Gozlan <igozlan at nvidia.com>
Date: Sun, 18 Feb 2024 07:11:15 +0200
Subject: [PATCH] net/mlx5/hws: skip item when inserting rules by index
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit e23edbc509f68b67b55ee6c06920402c9ac5db2b ]

The location of indexed rules is determined by the index, not the item
hash. A matcher test is added to prevent access to non-existent items.
This avoids unnecessary processing and potential segmentation faults.

Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object")

Signed-off-by: Itamar Gozlan <igozlan at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index fa19303b91..e39137a6ee 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -23,6 +23,9 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher,
 	*skip_rx = false;
 	*skip_tx = false;
 
+	if (unlikely(mlx5dr_matcher_is_insert_by_idx(matcher)))
+		return;
+
 	if (mt->item_flags & MLX5_FLOW_ITEM_REPRESENTED_PORT) {
 		v = items[mt->vport_item_id].spec;
 		vport = flow_hw_conv_port_id(v->port_id);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:06.439454649 +0800
+++ 0045-net-mlx5-hws-skip-item-when-inserting-rules-by-index.patch	2024-04-13 20:43:04.957753984 +0800
@@ -1 +1 @@
-From e23edbc509f68b67b55ee6c06920402c9ac5db2b Mon Sep 17 00:00:00 2001
+From b80ca5960e391dc055f9571beaf0a2927929d6d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e23edbc509f68b67b55ee6c06920402c9ac5db2b ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list