i40e: fix VLAN bitmasks for input set
authorAndrey Chilikin <andrey.chilikin@intel.com>
Wed, 23 Mar 2016 13:07:10 +0000 (21:07 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 18:01:38 +0000 (19:01 +0100)
This patch adds missing VLAN bitmask for inner frame in case of
tunneling and fixes VLAN tags bitmasks for single or outer frame
in case of tunneling.

Fixes: 98f055707685 ("i40e: configure input fields for RSS or flow director")

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.c

index 6034d58..ebf5a3e 100644 (file)
 #define I40E_REG_INSET_L2_DMAC                   0xE000000000000000ULL
 /* Source MAC address */
 #define I40E_REG_INSET_L2_SMAC                   0x1C00000000000000ULL
-/* VLAN tag in the outer L2 header */
-#define I40E_REG_INSET_L2_OUTER_VLAN             0x0080000000000000ULL
-/* VLAN tag in the inner L2 header */
-#define I40E_REG_INSET_L2_INNER_VLAN             0x0100000000000000ULL
+/* Outer (S-Tag) VLAN tag in the outer L2 header */
+#define I40E_REG_INSET_L2_OUTER_VLAN             0x0200000000000000ULL
+/* Inner (C-Tag) or single VLAN tag in the outer L2 header */
+#define I40E_REG_INSET_L2_INNER_VLAN             0x0080000000000000ULL
+/* Single VLAN tag in the inner L2 header */
+#define I40E_REG_INSET_TUNNEL_VLAN               0x0100000000000000ULL
 /* Source IPv4 address */
 #define I40E_REG_INSET_L3_SRC_IP4                0x0001800000000000ULL
 /* Destination IPv4 address */
@@ -7019,7 +7021,7 @@ i40e_translate_input_set_reg(uint64_t input)
                        I40E_REG_INSET_TUNNEL_L4_UDP_SRC_PORT},
                {I40E_INSET_TUNNEL_DST_PORT,
                        I40E_REG_INSET_TUNNEL_L4_UDP_DST_PORT},
-               {I40E_INSET_TUNNEL_ID, I40E_REG_INSET_TUNNEL_ID},
+               {I40E_INSET_VLAN_TUNNEL, I40E_REG_INSET_TUNNEL_VLAN},
                {I40E_INSET_FLEX_PAYLOAD_W1, I40E_REG_INSET_FLEX_PAYLOAD_WORD1},
                {I40E_INSET_FLEX_PAYLOAD_W2, I40E_REG_INSET_FLEX_PAYLOAD_WORD2},
                {I40E_INSET_FLEX_PAYLOAD_W3, I40E_REG_INSET_FLEX_PAYLOAD_WORD3},