DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@mellanox.com>
To: viacheslavo@mellanox.com, matan@mellanox.com, dekelp@mellanox.com
Cc: dev@dpdk.org, rasland@mellanox.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix incorrect set VLAN ID action offset
Date: Wed, 19 Feb 2020 16:15:17 +0200	[thread overview]
Message-ID: <1582121717-53976-1-git-send-email-suanmingm@mellanox.com> (raw)

Currently, the set VLAN ID header modify action has already got the
action pointer with offset from the header modify action array, but
the configuration saves the detail to the memory of action with the
offset again. It causes double offset to set the VLAN ID action to
the wrong place in the header modify array.

Remove the offset when get the action pointer to fix that issue.

Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 359a037..5950274 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -637,7 +637,7 @@ struct field_modify_info modify_tcp[] = {
 	const struct rte_flow_action_of_set_vlan_vid *conf =
 		(const struct rte_flow_action_of_set_vlan_vid *)(action->conf);
 	int i = resource->actions_num;
-	struct mlx5_modification_cmd *actions = &resource->actions[i];
+	struct mlx5_modification_cmd *actions = resource->actions;
 	struct field_modify_info *field = modify_vlan_out_first_vid;
 
 	if (i >= MLX5_MAX_MODIFY_NUM)
-- 
1.8.3.1


             reply	other threads:[~2020-02-19 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 14:15 Suanming Mou [this message]
2020-02-20  8:57 ` Matan Azrad
2020-02-20 11:25 ` 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=1582121717-53976-1-git-send-email-suanmingm@mellanox.com \
    --to=suanmingm@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.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).