From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix VLAN ID matching on switch flow rules
Date: Thu, 2 Aug 2018 11:25:08 +0200 [thread overview]
Message-ID: <20180802092432.19635-1-adrien.mazarguil@6wind.com> (raw)
VLAN ID is not properly translated to TC due to swapped byte order.
Fixes: fdc4d0f4c7e1 ("net/mlx5: add VLAN item and actions to switch flow rules")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx5/mlx5_nl_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_nl_flow.c b/drivers/net/mlx5/mlx5_nl_flow.c
index 9bad1a418..8803ffc32 100644
--- a/drivers/net/mlx5/mlx5_nl_flow.c
+++ b/drivers/net/mlx5/mlx5_nl_flow.c
@@ -662,7 +662,7 @@ mlx5_nl_flow_transpose(void *buf,
(mask.vlan->tci & RTE_BE16(0x0fff) &&
!mnl_attr_put_u16_check
(buf, size, TCA_FLOWER_KEY_VLAN_ID,
- spec.vlan->tci & RTE_BE16(0x0fff))))
+ rte_be_to_cpu_16(spec.vlan->tci & RTE_BE16(0x0fff)))))
goto error_nobufs;
++item;
break;
--
2.11.0
next reply other threads:[~2018-08-02 9:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 9:25 Adrien Mazarguil [this message]
2018-08-02 12:48 ` Shahaf Shuler
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=20180802092432.19635-1-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@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).