From: Michael Baum <michaelba@nvidia.com>
To: <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Raslan Darawsheh <rasland@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>
Subject: [PATCH v2 1/7] common/mlx5: remove enum value duplication
Date: Wed, 7 Feb 2024 17:55:27 +0200 [thread overview]
Message-ID: <20240207155533.1582031-2-michaelba@nvidia.com> (raw)
In-Reply-To: <20240207155533.1582031-1-michaelba@nvidia.com>
The "mlx5_modification_field" enumeration has 2 different fields
representing the same value 0x4A.
1. "MLX5_MODI_OUT_IPV6_NEXT_HDR" - specific for IPv6.
2. "MLX5_MODI_OUT_IP_PROTOCOL" - for both IPv4 and IPv6.
This patch removes "MLX5_MODI_OUT_IPV6_NEXT_HDR" and replaces all its
usages with "MLX5_MODI_OUT_IP_PROTOCOL".
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
drivers/common/mlx5/mlx5_prm.h | 1 -
drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++--
drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 0035a1e616..af16bf4cf6 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -840,7 +840,6 @@ enum mlx5_modification_field {
MLX5_MODI_IN_MPLS_LABEL_3,
MLX5_MODI_IN_MPLS_LABEL_4,
MLX5_MODI_OUT_IP_PROTOCOL = 0x4A,
- MLX5_MODI_OUT_IPV6_NEXT_HDR = 0x4A,
MLX5_MODI_META_REG_C_8 = 0x8F,
MLX5_MODI_META_REG_C_9 = 0x90,
MLX5_MODI_META_REG_C_10 = 0x91,
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 862ee3e332..2828a82d5b 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -2287,7 +2287,7 @@ mlx5dr_action_create_pop_ipv6_route_ext_mhdr3(struct mlx5dr_action *action)
MLX5_SET(copy_action_in, cmd, length, 8);
MLX5_SET(copy_action_in, cmd, src_offset, 24);
MLX5_SET(copy_action_in, cmd, src_field, mod_id);
- MLX5_SET(copy_action_in, cmd, dst_field, MLX5_MODI_OUT_IPV6_NEXT_HDR);
+ MLX5_SET(copy_action_in, cmd, dst_field, MLX5_MODI_OUT_IP_PROTOCOL);
pattern.data = (__be64 *)cmd;
pattern.sz = sizeof(cmd);
@@ -2348,7 +2348,7 @@ mlx5dr_action_create_push_ipv6_route_ext_mhdr1(struct mlx5dr_action *action)
/* Set ipv6.protocol to IPPROTO_ROUTING */
MLX5_SET(set_action_in, cmd, action_type, MLX5_MODIFICATION_TYPE_SET);
MLX5_SET(set_action_in, cmd, length, 8);
- MLX5_SET(set_action_in, cmd, field, MLX5_MODI_OUT_IPV6_NEXT_HDR);
+ MLX5_SET(set_action_in, cmd, field, MLX5_MODI_OUT_IP_PROTOCOL);
MLX5_SET(set_action_in, cmd, data, IPPROTO_ROUTING);
pattern.data = (__be64 *)cmd;
diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
index a949844d24..513549ff3c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c
@@ -67,7 +67,7 @@ bool mlx5dr_pat_require_reparse(__be64 *actions, uint16_t num_of_actions)
/* Below fields can change packet structure require a reparse */
if (field == MLX5_MODI_OUT_ETHERTYPE ||
- field == MLX5_MODI_OUT_IPV6_NEXT_HDR)
+ field == MLX5_MODI_OUT_IP_PROTOCOL)
return true;
}
--
2.25.1
next prev parent reply other threads:[~2024-02-07 15:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 14:39 [PATCH v1 0/7] net/mlx5: support copy from inner fields Michael Baum
2024-02-06 14:39 ` [PATCH v1 1/7] common/mlx5: remove enum value duplication Michael Baum
2024-02-06 14:39 ` [PATCH v1 2/7] common/mlx5: reorder modification field PRM list Michael Baum
2024-02-06 14:39 ` [PATCH v1 3/7] common/mlx5: add inner PRM fields Michael Baum
2024-02-06 14:39 ` [PATCH v1 4/7] common/mlx5: add IPv6 flow label PRM field Michael Baum
2024-02-06 14:39 ` [PATCH v1 5/7] net/mlx5: add support for modify inner fields Michael Baum
2024-02-06 14:39 ` [PATCH v1 6/7] net/mlx5: support modify IPv6 traffic class field Michael Baum
2024-02-06 14:39 ` [PATCH v1 7/7] net/mlx5: support modify IPv6 flow label field Michael Baum
2024-02-07 15:55 ` [PATCH v2 0/7] net/mlx5: support copy from inner fields Michael Baum
2024-02-07 15:55 ` Michael Baum [this message]
2024-02-07 15:55 ` [PATCH v2 2/7] common/mlx5: reorder modification field PRM list Michael Baum
2024-02-07 15:55 ` [PATCH v2 3/7] common/mlx5: add inner PRM fields Michael Baum
2024-02-07 15:55 ` [PATCH v2 4/7] common/mlx5: add IPv6 flow label PRM field Michael Baum
2024-02-07 15:55 ` [PATCH v2 5/7] net/mlx5: add support for modify inner fields Michael Baum
2024-02-07 15:55 ` [PATCH v2 6/7] net/mlx5: support modify IPv6 traffic class field Michael Baum
2024-02-07 15:55 ` [PATCH v2 7/7] net/mlx5: support modify IPv6 flow label field Michael Baum
2024-02-14 8:28 ` [PATCH v2 0/7] net/mlx5: support copy from inner fields Dariusz Sosnowski
2024-02-26 13:45 ` [PATCH v3 " Michael Baum
2024-02-26 13:45 ` [PATCH v3 1/7] common/mlx5: remove enum value duplication Michael Baum
2024-02-26 13:45 ` [PATCH v3 2/7] common/mlx5: reorder modification field PRM list Michael Baum
2024-02-26 13:45 ` [PATCH v3 3/7] common/mlx5: add inner PRM fields Michael Baum
2024-02-26 13:45 ` [PATCH v3 4/7] common/mlx5: add IPv6 flow label PRM field Michael Baum
2024-02-26 13:45 ` [PATCH v3 5/7] net/mlx5: add support for modify inner fields Michael Baum
2024-02-26 13:45 ` [PATCH v3 6/7] net/mlx5: support modify IPv6 traffic class field Michael Baum
2024-02-26 13:45 ` [PATCH v3 7/7] net/mlx5: support modify IPv6 flow label field Michael Baum
2024-02-27 13:24 ` [PATCH v3 0/7] net/mlx5: support copy from inner fields Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240207155533.1582031-2-michaelba@nvidia.com \
--to=michaelba@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).