patch 'net/mlx5: add flex item query for tunnel mode' has been queued to stable release 23.11.3
Xueming Li
xuemingl at nvidia.com
Mon Nov 11 07:28:32 CET 2024
Hi,
FYI, your patch has been queued to stable release 23.11.3
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/30/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=cb33b62e095707f9ad4c014f83e60359f06af2ec
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From cb33b62e095707f9ad4c014f83e60359f06af2ec Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Date: Wed, 18 Sep 2024 16:46:16 +0300
Subject: [PATCH] net/mlx5: add flex item query for tunnel mode
Cc: Xueming Li <xuemingl at nvidia.com>
[upstream commit 850233aca685ed1142ae2003ec6d4eefe82df4bd]
Once parsing the RTE item array the PMD needs to know
whether the flex item represents the tunnel header.
The appropriate tunnel mode query API is added.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5.h | 2 ++
drivers/net/mlx5/mlx5_flow_flex.c | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 0c81bcab9f..f48b58dcf4 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -2498,6 +2498,8 @@ int mlx5_flex_get_sample_id(const struct mlx5_flex_item *tp,
int mlx5_flex_get_parser_value_per_byte_off(const struct rte_flow_item_flex *item,
void *flex, uint32_t byte_off,
bool is_mask, bool tunnel, uint32_t *value);
+int mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item,
+ enum rte_flow_item_flex_tunnel_mode *tunnel_mode);
int mlx5_flex_acquire_index(struct rte_eth_dev *dev,
struct rte_flow_item_flex_handle *handle,
bool acquire);
diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c
index 4ae03a23f1..e7e6358144 100644
--- a/drivers/net/mlx5/mlx5_flow_flex.c
+++ b/drivers/net/mlx5/mlx5_flow_flex.c
@@ -291,6 +291,33 @@ mlx5_flex_get_parser_value_per_byte_off(const struct rte_flow_item_flex *item,
return 0;
}
+/**
+ * Get the flex parser tunnel mode.
+ *
+ * @param[in] item
+ * RTE Flex item.
+ * @param[in, out] tunnel_mode
+ * Pointer to return tunnel mode.
+ *
+ * @return
+ * 0 on success, otherwise negative error code.
+ */
+int
+mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item,
+ enum rte_flow_item_flex_tunnel_mode *tunnel_mode)
+{
+ if (item && item->spec && tunnel_mode) {
+ const struct rte_flow_item_flex *spec = item->spec;
+ struct mlx5_flex_item *flex = (struct mlx5_flex_item *)spec->handle;
+
+ if (flex) {
+ *tunnel_mode = flex->tunnel_mode;
+ return 0;
+ }
+ }
+ return -EINVAL;
+}
+
/**
* Translate item pattern into matcher fields according to translation
* array.
--
2.34.1
More information about the stable
mailing list