From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <thomas@monjalon.net>,
<matan@nvidia.com>, <rasland@nvidia.com>
Subject: [PATCH] net/mlx5: fix modify field MAC address offset
Date: Fri, 26 Nov 2021 13:51:13 +0200 [thread overview]
Message-ID: <20211126115113.11684-1-viacheslavo@nvidia.com> (raw)
The MAC addresses fields are 48 bit wide and are processed
by mlx5 PMD as two words. There the bug was introduced for
the offset, causing wrong action translation if action
field offset was not zero.
Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3da122cbb9..4834c752d9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1503,7 +1503,7 @@ mlx5_flow_field_id_to_modify_info
if (data->offset < 16)
info[idx++] = (struct field_modify_info){2, 0,
MLX5_MODI_OUT_DMAC_15_0};
- info[idx] = (struct field_modify_info){4, 0,
+ info[idx] = (struct field_modify_info){4, off,
MLX5_MODI_OUT_DMAC_47_16};
}
break;
@@ -1533,7 +1533,7 @@ mlx5_flow_field_id_to_modify_info
if (data->offset < 16)
info[idx++] = (struct field_modify_info){2, 0,
MLX5_MODI_OUT_SMAC_15_0};
- info[idx] = (struct field_modify_info){4, 0,
+ info[idx] = (struct field_modify_info){4, off,
MLX5_MODI_OUT_SMAC_47_16};
}
break;
--
2.18.1
next reply other threads:[~2021-11-26 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 11:51 Viacheslav Ovsiienko [this message]
2021-11-26 13:09 ` [PATCH v2] " Viacheslav Ovsiienko
2021-12-06 8:56 ` 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=20211126115113.11684-1-viacheslavo@nvidia.com \
--to=viacheslavo@nvidia.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=thomas@monjalon.net \
/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).