From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
To: shahafs@mellanox.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner ethernet type on E-Switch
Date: Wed, 21 Nov 2018 17:44:38 +0000 [thread overview]
Message-ID: <1542822278-15153-1-git-send-email-viacheslavo@mellanox.com> (raw)
The TCA_FLOWER_KEY_VLAN_ETH_TYPE should be specified for the E-Switch
Flows with VLAN and L3 pattern items in the Netlink messages. The patch
adds missing flower key to the messages. This patch partially reverts to
the code smashed by http://patches.dpdk.org/patch/47781
Fixes: 251e8d02cf37 ("net/mlx5: add VXLAN to flow translate routine")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_tcf.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index 22a866d..fb284c3 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -3260,7 +3260,8 @@ struct pedit_parser {
assert(mask.ipv4);
spec.ipv4 = items->spec;
if (!decap.vxlan) {
- if (!eth_type_set && !vlan_eth_type_set)
+ if (!eth_type_set ||
+ (!vlan_eth_type_set && vlan_present))
mnl_attr_put_u16
(nlh,
vlan_present ?
@@ -3317,14 +3318,14 @@ struct pedit_parser {
assert(mask.ipv6);
spec.ipv6 = items->spec;
if (!decap.vxlan) {
- if (!eth_type_set || !vlan_eth_type_set) {
+ if (!eth_type_set ||
+ (!vlan_eth_type_set && vlan_present))
mnl_attr_put_u16
(nlh,
vlan_present ?
TCA_FLOWER_KEY_VLAN_ETH_TYPE :
TCA_FLOWER_KEY_ETH_TYPE,
RTE_BE16(ETH_P_IPV6));
- }
eth_type_set = 1;
vlan_eth_type_set = 1;
if (mask.ipv6 == &flow_tcf_mask_empty.ipv6)
--
1.8.3.1
next reply other threads:[~2018-11-21 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 17:44 Viacheslav Ovsiienko [this message]
2018-11-22 11:42 ` 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=1542822278-15153-1-git-send-email-viacheslavo@mellanox.com \
--to=viacheslavo@mellanox.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).