From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 289291B10D for ; Wed, 21 Nov 2018 18:44:49 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with ESMTPS (AES256-SHA encrypted); 21 Nov 2018 19:50:31 +0200 Received: from pegasus11.mtr.labs.mlnx. (pegasus11.mtr.labs.mlnx [10.210.16.104]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wALHimIb013252; Wed, 21 Nov 2018 19:44:48 +0200 From: Viacheslav Ovsiienko To: shahafs@mellanox.com Cc: dev@dpdk.org Date: Wed, 21 Nov 2018 17:44:38 +0000 Message-Id: <1542822278-15153-1-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner ethernet type on E-Switch X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 17:44:49 -0000 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 --- 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