patch 'net/mlx5: fix ESP item validation to match on seqnum' has been queued to stable release 24.11.4
Kevin Traynor
ktraynor at redhat.com
Fri Oct 31 15:33:26 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/25. 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/aa27f7c19ccf8ed674aa82ccb2b2cba530118c40
Thanks.
Kevin
---
>From aa27f7c19ccf8ed674aa82ccb2b2cba530118c40 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Date: Tue, 9 Sep 2025 09:28:52 +0300
Subject: [PATCH] net/mlx5: fix ESP item validation to match on seqnum
[ upstream commit 96d73a947331cc146e09b06a6913cdf604ae52a7 ]
The match on ESP sequence number is supported by hardware
steering implementation but was rejected in validation
routine shared by all steering engines.
This patch allows validation to pass with requested match on
ESP sequence number for hardware steering engine.
Fixes: fb96caa56aab ("net/mlx5: support ESP item on Windows")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_flow_os.c | 10 +++++++++-
drivers/net/mlx5/linux/mlx5_flow_os.h | 3 +++
drivers/net/mlx5/mlx5_flow_dv.c | 6 ++----
drivers/net/mlx5/mlx5_flow_hw.c | 5 ++---
drivers/net/mlx5/mlx5_flow_verbs.c | 6 ++----
drivers/net/mlx5/windows/mlx5_flow_os.c | 10 +++++++++-
drivers/net/mlx5/windows/mlx5_flow_os.h | 3 +++
7 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.c b/drivers/net/mlx5/linux/mlx5_flow_os.c
index af8c02c38b..777125e9a8 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.c
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.c
@@ -19,4 +19,5 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
uint64_t item_flags,
uint8_t target_protocol,
+ bool allow_seq,
struct rte_flow_error *error)
{
@@ -27,4 +28,10 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
const uint64_t l4m = tunnel ? MLX5_FLOW_LAYER_INNER_L4 :
MLX5_FLOW_LAYER_OUTER_L4;
+ static const struct rte_flow_item_esp mlx5_flow_item_esp_mask = {
+ .hdr = {
+ .spi = RTE_BE32(0xffffffff),
+ .seq = RTE_BE32(0xffffffff),
+ },
+ };
int ret;
@@ -48,5 +55,6 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
ret = mlx5_flow_item_acceptable
(dev, item, (const uint8_t *)mask,
- (const uint8_t *)&rte_flow_item_esp_mask,
+ allow_seq ? (const uint8_t *)&mlx5_flow_item_esp_mask :
+ (const uint8_t *)&rte_flow_item_esp_mask,
sizeof(struct rte_flow_item_esp), MLX5_ITEM_RANGE_NOT_ACCEPTED,
error);
diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h
index 35b5871ab9..21a2ed5bec 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.h
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.h
@@ -515,4 +515,6 @@ mlx5_os_flow_dr_sync_domain(void *domain, uint32_t flags)
* @param[in] target_protocol
* The next protocol in the previous item.
+ * @param[in] allow_seq
+ * The match on sequence number is supported.
* @param[out] error
* Pointer to error structure.
@@ -526,4 +528,5 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
uint64_t item_flags,
uint8_t target_protocol,
+ bool allow_seq,
struct rte_flow_error *error);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b9b1a34dab..c1ff6a2dae 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7860,8 +7860,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
break;
case RTE_FLOW_ITEM_TYPE_ESP:
- ret = mlx5_flow_os_validate_item_esp(dev, items,
- item_flags,
- next_protocol,
- error);
+ ret = mlx5_flow_os_validate_item_esp(dev, items, item_flags,
+ next_protocol, false, error);
if (ret < 0)
return ret;
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index e8a3473241..74ee3c665f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8681,7 +8681,6 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ITEM_TYPE_ESP:
- ret = mlx5_flow_os_validate_item_esp(dev, item,
- *item_flags, 0xff,
- error);
+ ret = mlx5_flow_os_validate_item_esp(dev, item, *item_flags,
+ 0xff, true, error);
if (ret < 0)
return ret;
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 5b4a4eda3b..67d199ce15 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1333,8 +1333,6 @@ flow_verbs_validate(struct rte_eth_dev *dev,
#ifdef HAVE_IBV_FLOW_SPEC_ESP
case RTE_FLOW_ITEM_TYPE_ESP:
- ret = mlx5_flow_os_validate_item_esp(dev, items,
- item_flags,
- next_protocol,
- error);
+ ret = mlx5_flow_os_validate_item_esp(dev, items, item_flags,
+ next_protocol, false, error);
if (ret < 0)
return ret;
diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.c b/drivers/net/mlx5/windows/mlx5_flow_os.c
index bf93da9f1e..7a625fb880 100644
--- a/drivers/net/mlx5/windows/mlx5_flow_os.c
+++ b/drivers/net/mlx5/windows/mlx5_flow_os.c
@@ -429,4 +429,5 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
uint64_t item_flags,
uint8_t target_protocol,
+ bool allow_seq,
struct rte_flow_error *error)
{
@@ -438,4 +439,10 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
const uint64_t l4m = tunnel ? MLX5_FLOW_LAYER_INNER_L4 :
MLX5_FLOW_LAYER_OUTER_L4;
+ static const struct rte_flow_item_esp mlx5_flow_item_esp_mask = {
+ .hdr = {
+ .spi = RTE_BE32(0xffffffff),
+ .seq = RTE_BE32(0xffffffff),
+ },
+ };
int ret;
@@ -462,5 +469,6 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
ret = mlx5_flow_item_acceptable
(dev, item, (const uint8_t *)mask,
- (const uint8_t *)&rte_flow_item_esp_mask,
+ allow_seq ? (const uint8_t *)&mlx5_flow_item_esp_mask :
+ (const uint8_t *)&rte_flow_item_esp_mask,
sizeof(struct rte_flow_item_esp), MLX5_ITEM_RANGE_NOT_ACCEPTED,
error);
diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.h b/drivers/net/mlx5/windows/mlx5_flow_os.h
index 36edc3d532..2cd4e95325 100644
--- a/drivers/net/mlx5/windows/mlx5_flow_os.h
+++ b/drivers/net/mlx5/windows/mlx5_flow_os.h
@@ -462,4 +462,6 @@ int mlx5_flow_os_destroy_flow(void *drv_flow_ptr);
* @param[in] target_protocol
* The next protocol in the previous item.
+ * @param[in] allow_seq
+ * The match on sequence number is supported.
* @param[out] error
* Pointer to error structure.
@@ -473,4 +475,5 @@ mlx5_flow_os_validate_item_esp(const struct rte_eth_dev *dev,
uint64_t item_flags,
uint8_t target_protocol,
+ bool allow_seq,
struct rte_flow_error *error);
--
2.51.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-10-31 13:53:54.788052655 +0000
+++ 0084-net-mlx5-fix-ESP-item-validation-to-match-on-seqnum.patch 2025-10-31 13:53:52.205523896 +0000
@@ -1 +1 @@
-From 96d73a947331cc146e09b06a6913cdf604ae52a7 Mon Sep 17 00:00:00 2001
+From aa27f7c19ccf8ed674aa82ccb2b2cba530118c40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96d73a947331cc146e09b06a6913cdf604ae52a7 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -75 +76 @@
-index abfd54da1a..18d0d29377 100644
+index b9b1a34dab..c1ff6a2dae 100644
@@ -90 +91 @@
-index c84ae726a7..2ca40b4146 100644
+index e8a3473241..74ee3c665f 100644
@@ -93 +94 @@
-@@ -8819,7 +8819,6 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -8681,7 +8681,6 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
More information about the stable
mailing list