patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Wisam Jaddo <wisamm@nvidia.com>
To: <matan@nvidia.com>, <orika@nvidia.com>, <viacheslavo@nvidia.com>,
	<akozyrev@nvidia.com>, <rasland@nvidia.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH] net/mlx5: fix the size of tcp flags for modify actions
Date: Wed, 28 Apr 2021 13:29:07 +0300	[thread overview]
Message-ID: <20210428102907.114035-1-wisamm@nvidia.com> (raw)

From RFC the size of the TCP flags is 9, while the defined
current size is 6.

Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action")
Cc: akozyrev@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d810466242..43e929b892 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1366,7 +1366,7 @@ mlx5_flow_item_field_width(enum rte_flow_field_id field)
 	case RTE_FLOW_FIELD_TCP_ACK_NUM:
 		return 32;
 	case RTE_FLOW_FIELD_TCP_FLAGS:
-		return 6;
+		return 9;
 	case RTE_FLOW_FIELD_UDP_PORT_SRC:
 	case RTE_FLOW_FIELD_UDP_PORT_DST:
 		return 16;
@@ -1688,10 +1688,10 @@ mlx5_flow_field_id_to_modify_info
 						     (32 - width));
 		break;
 	case RTE_FLOW_FIELD_TCP_FLAGS:
-		info[idx] = (struct field_modify_info){1, 0,
+		info[idx] = (struct field_modify_info){2, 0,
 					MLX5_MODI_OUT_TCP_FLAGS};
 		if (mask)
-			mask[idx] = 0x3f >> (6 - width);
+			mask[idx] = rte_cpu_to_be_16(0x1ff >> (9 - width));
 		break;
 	case RTE_FLOW_FIELD_UDP_PORT_SRC:
 		info[idx] = (struct field_modify_info){2, 0,
-- 
2.17.1


             reply	other threads:[~2021-04-28 10:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 10:29 Wisam Jaddo [this message]
2021-04-28 11:28 ` Slava Ovsiienko
2021-05-03 12:23 ` Raslan Darawsheh
     [not found] <20210428091259.23278-1-wisamm@nvidia.com>
2021-04-28 11:23 ` Slava Ovsiienko

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=20210428102907.114035-1-wisamm@nvidia.com \
    --to=wisamm@nvidia.com \
    --cc=akozyrev@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --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).