From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Qiming Yang <qiming.yang@intel.com>,
Wojciech Drewek <wojciech.drewek@intel.com>
Subject: [PATCH 20/30] net/ice/base: add L2TPv3 support for adv rules
Date: Thu, 27 Apr 2023 06:19:51 +0000 [thread overview]
Message-ID: <20230427062001.478032-21-qiming.yang@intel.com> (raw)
In-Reply-To: <20230427062001.478032-1-qiming.yang@intel.com>
This patch unwraps L2TPv3 dummy packet, date structures and defines
from DPDK_SUPPORT.
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ice/base/ice_nvm.h | 1 -
drivers/net/ice/base/ice_protocol_type.h | 5 +-
drivers/net/ice/base/ice_switch.c | 740 +++++++++++++++--------
3 files changed, 495 insertions(+), 251 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.h b/drivers/net/ice/base/ice_nvm.h
index c3e61a301f..824526e8f8 100644
--- a/drivers/net/ice/base/ice_nvm.h
+++ b/drivers/net/ice/base/ice_nvm.h
@@ -34,7 +34,6 @@ struct ice_orom_civd_info {
u8 combo_name_len; /* Length of the unicode combo image version string, max of 32 */
__le16 combo_name[32]; /* Unicode string representing the Combo Image version */
};
-
#pragma pack()
#define ICE_NVM_ACCESS_MAJOR_VER 0
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 7f5f5069b6..1ef23c5a50 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -31,6 +31,7 @@ enum ice_protocol_type {
ICE_MAC_OFOS = 0,
ICE_MAC_IL,
ICE_ETYPE_OL,
+ ICE_ETYPE_IL,
ICE_VLAN_OFOS,
ICE_IPV4_OFOS,
ICE_IPV4_IL,
@@ -195,6 +196,7 @@ enum ice_prot_id {
#define ICE_MAC_OFOS_HW 1
#define ICE_MAC_IL_HW 4
#define ICE_ETYPE_OL_HW 9
+#define ICE_ETYPE_IL_HW 10
#define ICE_VLAN_OF_HW 16
#define ICE_VLAN_OL_HW 17
#define ICE_IPV4_OFOS_HW 32
@@ -219,7 +221,8 @@ enum ice_prot_id {
#define ICE_MDID_SIZE 2
#define ICE_TUN_FLAG_MDID 20
-#define ICE_TUN_FLAG_MDID_OFF(word) (ICE_MDID_SIZE * (ICE_TUN_FLAG_MDID + (word)))
+#define ICE_TUN_FLAG_MDID_OFF(word) \
+ (ICE_MDID_SIZE * (ICE_TUN_FLAG_MDID + (word)))
#define ICE_TUN_FLAG_MASK 0xFF
#define ICE_DIR_FLAG_MASK 0x10
#define ICE_TUN_FLAG_IN_VLAN_MASK 0x80 /* VLAN inside tunneled header */
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 7b3c367e94..c78ec448ae 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -139,6 +139,7 @@ static const struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {
{ ICE_GENEVE, 42 },
{ ICE_VXLAN_GPE, 42 },
{ ICE_MAC_IL, 50 },
+ { ICE_ETYPE_IL, 62 },
{ ICE_IPV4_IL, 64 },
{ ICE_TCP_IL, 84 },
{ ICE_PROTOCOL_LAST, 0 },
@@ -229,6 +230,224 @@ static const u8 dummy_udp_tun_udp_packet[] = {
0x00, 0x08, 0x00, 0x00,
};
+static const struct ice_dummy_pkt_offsets
+dummy_gre_ipv6_tcp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_NVGRE, 34 },
+ { ICE_MAC_IL, 42 },
+ { ICE_ETYPE_IL, 54 },
+ { ICE_IPV6_IL, 56 },
+ { ICE_TCP_IL, 96 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_gre_ipv6_tcp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x00, /* ICE_ETYPE_OL 12 */
+
+ 0x45, 0x00, 0x00, 0x66, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2F, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x80, 0x00, 0x65, 0x58, /* ICE_NVGRE 34 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x86, 0xdd, /* ICE_ETYPE_IL 54 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 56 */
+ 0x00, 0x08, 0x06, 0x40,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 96 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x02, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+static const struct ice_dummy_pkt_offsets
+dummy_gre_ipv6_udp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_NVGRE, 34 },
+ { ICE_MAC_IL, 42 },
+ { ICE_ETYPE_IL, 54 },
+ { ICE_IPV6_IL, 56 },
+ { ICE_UDP_ILOS, 96 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_gre_ipv6_udp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x00, /* ICE_ETYPE_OL 12 */
+
+ 0x45, 0x00, 0x00, 0x5a, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2F, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x80, 0x00, 0x65, 0x58, /* ICE_NVGRE 34 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x86, 0xdd, /* ICE_ETYPE_IL 54 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 56 */
+ 0x00, 0x08, 0x11, 0x40,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 96 */
+ 0x00, 0x08, 0x00, 0x00,
+};
+
+static const struct ice_dummy_pkt_offsets
+dummy_udp_tun_ipv6_tcp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_VXLAN, 42 },
+ { ICE_GENEVE, 42 },
+ { ICE_VXLAN_GPE, 42 },
+ { ICE_MAC_IL, 50 },
+ { ICE_ETYPE_IL, 62 },
+ { ICE_IPV6_IL, 64 },
+ { ICE_TCP_IL, 104 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_udp_tun_ipv6_tcp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x00, /* ICE_ETYPE_OL 12 */
+
+ 0x45, 0x00, 0x00, 0x6e, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x40, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x12, 0xb5, /* ICE_UDP_OF 34 */
+ 0x00, 0x5a, 0x00, 0x00,
+
+ 0x00, 0x00, 0x65, 0x58, /* ICE_VXLAN 42 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 50 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x86, 0xdd, /* ICE_ETYPE_IL 62 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 64 */
+ 0x00, 0x08, 0x06, 0x40,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 104 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x02, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+static const struct ice_dummy_pkt_offsets
+dummy_udp_tun_ipv6_udp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_VXLAN, 42 },
+ { ICE_GENEVE, 42 },
+ { ICE_VXLAN_GPE, 42 },
+ { ICE_MAC_IL, 50 },
+ { ICE_ETYPE_IL, 62 },
+ { ICE_IPV6_IL, 64 },
+ { ICE_UDP_ILOS, 104 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_udp_tun_ipv6_udp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x00, /* ICE_ETYPE_OL 12 */
+
+ 0x45, 0x00, 0x00, 0x62, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x12, 0xb5, /* ICE_UDP_OF 34 */
+ 0x00, 0x4e, 0x00, 0x00,
+
+ 0x00, 0x00, 0x65, 0x58, /* ICE_VXLAN 42 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 50 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x86, 0xdd, /* ICE_ETYPE_IL 62 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 64 */
+ 0x00, 0x08, 0x11, 0x40,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 104 */
+ 0x00, 0x08, 0x00, 0x00,
+};
+
/* offset info for MAC + IPv4 + UDP dummy packet */
static const struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
@@ -1000,8 +1219,7 @@ static const u8 dummy_ipv4_gtpu_ipv6_packet[] = {
0x00, 0x00,
};
-static const
-struct ice_dummy_pkt_offsets dummy_ipv6_gtpu_ipv4_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv6_gtpu_ipv4_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV6_OFOS, 14 },
{ ICE_UDP_OF, 54 },
@@ -1046,8 +1264,7 @@ static const u8 dummy_ipv6_gtpu_ipv4_packet[] = {
0x00, 0x00,
};
-static const
-struct ice_dummy_pkt_offsets dummy_ipv6_gtpu_ipv6_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv6_gtpu_ipv6_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV6_OFOS, 14 },
{ ICE_UDP_OF, 54 },
@@ -1434,83 +1651,6 @@ static const u8 dummy_pppoe_ipv4_packet[] = {
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const
-struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_tcp_packet_offsets[] = {
- { ICE_MAC_OFOS, 0 },
- { ICE_VLAN_OFOS, 12 },
- { ICE_ETYPE_OL, 16 },
- { ICE_PPPOE, 18 },
- { ICE_IPV4_OFOS, 26 },
- { ICE_TCP_IL, 46 },
- { ICE_PROTOCOL_LAST, 0 },
-};
-
-static const u8 dummy_pppoe_ipv4_tcp_packet[] = {
- 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
-
- 0x88, 0x64, /* ICE_ETYPE_OL 16 */
-
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
- 0x00, 0x16,
-
- 0x00, 0x21, /* PPP Link Layer 24 */
-
- 0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 26 */
- 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x06, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 46 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x50, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
-};
-
-static const
-struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_udp_packet_offsets[] = {
- { ICE_MAC_OFOS, 0 },
- { ICE_VLAN_OFOS, 12 },
- { ICE_ETYPE_OL, 16 },
- { ICE_PPPOE, 18 },
- { ICE_IPV4_OFOS, 26 },
- { ICE_UDP_ILOS, 46 },
- { ICE_PROTOCOL_LAST, 0 },
-};
-
-static const u8 dummy_pppoe_ipv4_udp_packet[] = {
- 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
-
- 0x88, 0x64, /* ICE_ETYPE_OL 16 */
-
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
- 0x00, 0x16,
-
- 0x00, 0x21, /* PPP Link Layer 24 */
-
- 0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 26 */
- 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x11, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 46 */
- 0x00, 0x08, 0x00, 0x00,
-
- 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
-};
-
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_VLAN_OFOS, 12 },
@@ -1548,78 +1688,45 @@ static const u8 dummy_pppoe_ipv6_packet[] = {
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const
-struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_tcp_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv4_esp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_VLAN_OFOS, 12 },
- { ICE_ETYPE_OL, 16 },
- { ICE_PPPOE, 18 },
- { ICE_IPV6_OFOS, 26 },
- { ICE_TCP_IL, 66 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_ESP, 34 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_pppoe_ipv6_tcp_packet[] = {
+static const u8 dummy_ipv4_esp_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00,
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
-
- 0x88, 0x64, /* ICE_ETYPE_OL 16 */
-
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
- 0x00, 0x2a,
-
- 0x00, 0x57, /* PPP Link Layer 24 */
-
- 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 26 */
- 0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_IL 14 */
+ 0x00, 0x00, 0x40, 0x00,
+ 0x40, 0x32, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 66 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, /* ICE_ESP 34 */
0x00, 0x00, 0x00, 0x00,
-
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const
-struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_udp_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv6_esp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_VLAN_OFOS, 12 },
- { ICE_ETYPE_OL, 16 },
- { ICE_PPPOE, 18 },
- { ICE_IPV6_OFOS, 26 },
- { ICE_UDP_ILOS, 66 },
+ { ICE_IPV6_OFOS, 14 },
+ { ICE_ESP, 54 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_pppoe_ipv6_udp_packet[] = {
+static const u8 dummy_ipv6_esp_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x86, 0xDD,
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
-
- 0x88, 0x64, /* ICE_ETYPE_OL 16 */
-
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
- 0x00, 0x2a,
-
- 0x00, 0x57, /* PPP Link Layer 24 */
-
- 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 26 */
- 0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 14 */
+ 0x00, 0x08, 0x32, 0x00, /* Next header ESP */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -1629,51 +1736,51 @@ static const u8 dummy_pppoe_ipv6_udp_packet[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 66 */
- 0x00, 0x08, 0x00, 0x00,
-
+ 0x00, 0x00, 0x00, 0x00, /* ICE_ESP 54 */
+ 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_ipv4_esp_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv4_ah_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV4_OFOS, 14 },
- { ICE_ESP, 34 },
+ { ICE_AH, 34 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv4_esp_pkt[] = {
+static const u8 dummy_ipv4_ah_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x08, 0x00,
- 0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_IL 14 */
+ 0x45, 0x00, 0x00, 0x20, /* ICE_IPV4_IL 14 */
0x00, 0x00, 0x40, 0x00,
- 0x40, 0x32, 0x00, 0x00,
+ 0x40, 0x33, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_ESP 34 */
+ 0x00, 0x00, 0x00, 0x00, /* ICE_AH 34 */
+ 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_ipv6_esp_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv6_ah_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV6_OFOS, 14 },
- { ICE_ESP, 54 },
+ { ICE_AH, 54 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv6_esp_pkt[] = {
+static const u8 dummy_ipv6_ah_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x86, 0xDD,
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 14 */
- 0x00, 0x08, 0x32, 0x00, /* Next header ESP */
+ 0x00, 0x0c, 0x33, 0x00, /* Next header AH */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -1683,51 +1790,56 @@ static const u8 dummy_ipv6_esp_pkt[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_ESP 54 */
+ 0x00, 0x00, 0x00, 0x00, /* ICE_AH 54 */
+ 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_ipv4_ah_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv4_nat_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV4_OFOS, 14 },
- { ICE_AH, 34 },
+ { ICE_UDP_ILOS, 34 },
+ { ICE_NAT_T, 42 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv4_ah_pkt[] = {
+static const u8 dummy_ipv4_nat_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x08, 0x00,
- 0x45, 0x00, 0x00, 0x20, /* ICE_IPV4_IL 14 */
+ 0x45, 0x00, 0x00, 0x24, /* ICE_IPV4_IL 14 */
0x00, 0x00, 0x40, 0x00,
- 0x40, 0x33, 0x00, 0x00,
+ 0x40, 0x11, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_AH 34 */
+ 0x00, 0x00, 0x11, 0x94, /* ICE_NAT_T 34 */
+ 0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_ipv6_ah_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_ipv6_nat_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_IPV6_OFOS, 14 },
- { ICE_AH, 54 },
+ { ICE_UDP_ILOS, 54 },
+ { ICE_NAT_T, 62 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv6_ah_pkt[] = {
+static const u8 dummy_ipv6_nat_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x86, 0xDD,
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 14 */
- 0x00, 0x0c, 0x33, 0x00, /* Next header AH */
+ 0x00, 0x10, 0x11, 0x00, /* Next header NAT_T */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -1737,57 +1849,85 @@ static const u8 dummy_ipv6_ah_pkt[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* ICE_AH 54 */
+ 0x00, 0x00, 0x11, 0x94, /* ICE_NAT_T 54 */
+ 0x00, 0x00, 0x00, 0x00,
+
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
+
};
-static const struct ice_dummy_pkt_offsets dummy_ipv4_nat_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_IPV4_OFOS, 14 },
- { ICE_UDP_ILOS, 34 },
- { ICE_NAT_T, 42 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_PPPOE, 22 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_pppoe_ipv4_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_PPPOE, 22 },
+ { ICE_IPV4_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv4_nat_pkt[] = {
+static const u8 dummy_qinq_pppoe_ipv4_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x08, 0x00,
- 0x45, 0x00, 0x00, 0x24, /* ICE_IPV4_IL 14 */
- 0x00, 0x00, 0x40, 0x00,
- 0x40, 0x11, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+ 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 20 */
- 0x00, 0x00, 0x11, 0x94, /* ICE_NAT_T 34 */
- 0x00, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
+ 0x00, 0x16,
+
+ 0x00, 0x21, /* PPP Link Layer 28 */
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_OFOS 30 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 byte alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_ipv6_nat_packet_offsets[] = {
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_ipv6_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_IPV6_OFOS, 14 },
- { ICE_UDP_ILOS, 54 },
- { ICE_NAT_T, 62 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_PPPOE, 22 },
+ { ICE_IPV6_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_ipv6_nat_pkt[] = {
+static const u8 dummy_qinq_pppoe_ipv6_packet[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x86, 0xDD,
- 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 14 */
- 0x00, 0x10, 0x11, 0x00, /* Next header NAT_T */
- 0x00, 0x00, 0x00, 0x00,
+ 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 20 */
+
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
+ 0x00, 0x2a,
+
+ 0x00, 0x57, /* PPP Link Layer 28*/
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 30 */
+ 0x00, 0x00, 0x3b, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -1795,18 +1935,14 @@ static const u8 dummy_ipv6_nat_pkt[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x11, 0x94, /* ICE_NAT_T 54 */
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
-
};
static const struct ice_dummy_pkt_offsets dummy_ipv4_l2tpv3_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
{ ICE_IPV4_OFOS, 14 },
{ ICE_L2TPV3, 34 },
{ ICE_PROTOCOL_LAST, 0 },
@@ -1816,7 +1952,8 @@ static const u8 dummy_ipv4_l2tpv3_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x08, 0x00,
+
+ 0x08, 0x00, /* ICE_ETYPE_OL 12 */
0x45, 0x00, 0x00, 0x20, /* ICE_IPV4_IL 14 */
0x00, 0x00, 0x40, 0x00,
@@ -1832,6 +1969,7 @@ static const u8 dummy_ipv4_l2tpv3_pkt[] = {
static const struct ice_dummy_pkt_offsets dummy_ipv6_l2tpv3_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
{ ICE_IPV6_OFOS, 14 },
{ ICE_L2TPV3, 54 },
{ ICE_PROTOCOL_LAST, 0 },
@@ -1841,7 +1979,8 @@ static const u8 dummy_ipv6_l2tpv3_pkt[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x86, 0xDD,
+
+ 0x86, 0xDD, /* ICE_ETYPE_OL 12 */
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 14 */
0x00, 0x0c, 0x73, 0x40,
@@ -1860,76 +1999,155 @@ static const u8 dummy_ipv6_l2tpv3_pkt[] = {
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_offsets[] = {
+static const
+struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_tcp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_VLAN_EX, 12 },
- { ICE_VLAN_IN, 16 },
- { ICE_ETYPE_OL, 20 },
- { ICE_PPPOE, 22 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
+ { ICE_PPPOE, 18 },
+ { ICE_IPV4_OFOS, 26 },
+ { ICE_TCP_IL, 46 },
{ ICE_PROTOCOL_LAST, 0 },
};
+static const u8 dummy_pppoe_ipv4_tcp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
+
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
+
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
+ 0x00, 0x16,
+
+ 0x00, 0x21, /* PPP Link Layer 24 */
+
+ 0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 26 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 46 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
+};
+
static const
-struct ice_dummy_pkt_offsets dummy_qinq_pppoe_ipv4_packet_offsets[] = {
+struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_udp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_VLAN_EX, 12 },
- { ICE_VLAN_IN, 16 },
- { ICE_ETYPE_OL, 20 },
- { ICE_PPPOE, 22 },
- { ICE_IPV4_OFOS, 30 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
+ { ICE_PPPOE, 18 },
+ { ICE_IPV4_OFOS, 26 },
+ { ICE_UDP_ILOS, 46 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_qinq_pppoe_ipv4_pkt[] = {
+static const u8 dummy_pppoe_ipv4_udp_packet[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
- 0x88, 0x64, /* ICE_ETYPE_OL 20 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
+
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x16,
- 0x00, 0x21, /* PPP Link Layer 28 */
+ 0x00, 0x21, /* PPP Link Layer 24 */
- 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_OFOS 30 */
+ 0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 26 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 46 */
+ 0x00, 0x08, 0x00, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_pppoe_ipv6_tcp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
+ { ICE_PPPOE, 18 },
+ { ICE_IPV6_OFOS, 26 },
+ { ICE_TCP_IL, 66 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_pppoe_ipv6_tcp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, /* 2 bytes for 4 byte alignment */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
+
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
+
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
+ 0x00, 0x2a,
+
+ 0x00, 0x57, /* PPP Link Layer 24 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 26 */
+ 0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 66 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
static const
-struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_ipv6_offsets[] = {
+struct ice_dummy_pkt_offsets dummy_pppoe_ipv6_udp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_VLAN_EX, 12 },
- { ICE_VLAN_IN, 16 },
- { ICE_ETYPE_OL, 20 },
- { ICE_PPPOE, 22 },
- { ICE_IPV6_OFOS, 30 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
+ { ICE_PPPOE, 18 },
+ { ICE_IPV6_OFOS, 26 },
+ { ICE_UDP_ILOS, 66 },
{ ICE_PROTOCOL_LAST, 0 },
};
-static const u8 dummy_qinq_pppoe_ipv6_packet[] = {
+static const u8 dummy_pppoe_ipv6_udp_packet[] = {
0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
- 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
- 0x88, 0x64, /* ICE_ETYPE_OL 20 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
+
+ 0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x2a,
- 0x00, 0x57, /* PPP Link Layer 28*/
+ 0x00, 0x57, /* PPP Link Layer 24 */
- 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 30 */
- 0x00, 0x00, 0x3b, 0x00,
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 26 */
+ 0x00, 0x08, 0x11, 0x00, /* Next header UDP*/
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -1939,6 +2157,9 @@ static const u8 dummy_qinq_pppoe_ipv6_packet[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 66 */
+ 0x00, 0x08, 0x00, 0x00,
+
0x00, 0x00, /* 2 bytes for 4 bytes alignment */
};
@@ -8060,6 +8281,7 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
const struct ice_dummy_pkt_offsets **offsets)
{
bool tcp = false, udp = false, outer_ipv6 = false, vlan = false;
+ bool inner_ipv6 = false, pppoe = false;
bool cvlan = false;
bool gre = false, mpls = false;
u16 i;
@@ -8389,42 +8611,14 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
if (tun_type == ICE_SW_TUN_PPPOE_IPV6_TCP) {
*pkt = dummy_pppoe_ipv6_tcp_packet;
*pkt_len = sizeof(dummy_pppoe_ipv6_tcp_packet);
- *offsets = dummy_pppoe_packet_ipv6_tcp_offsets;
+ *offsets = dummy_pppoe_ipv6_tcp_packet_offsets;
return;
}
if (tun_type == ICE_SW_TUN_PPPOE_IPV6_UDP) {
*pkt = dummy_pppoe_ipv6_udp_packet;
*pkt_len = sizeof(dummy_pppoe_ipv6_udp_packet);
- *offsets = dummy_pppoe_packet_ipv6_udp_offsets;
- return;
- }
-
- if (tun_type == ICE_SW_IPV4_TCP) {
- *pkt = dummy_tcp_packet;
- *pkt_len = sizeof(dummy_tcp_packet);
- *offsets = dummy_tcp_packet_offsets;
- return;
- }
-
- if (tun_type == ICE_SW_IPV4_UDP) {
- *pkt = dummy_udp_packet;
- *pkt_len = sizeof(dummy_udp_packet);
- *offsets = dummy_udp_packet_offsets;
- return;
- }
-
- if (tun_type == ICE_SW_IPV6_TCP) {
- *pkt = dummy_tcp_ipv6_packet;
- *pkt_len = sizeof(dummy_tcp_ipv6_packet);
- *offsets = dummy_tcp_ipv6_packet_offsets;
- return;
- }
-
- if (tun_type == ICE_SW_IPV6_UDP) {
- *pkt = dummy_udp_ipv6_packet;
- *pkt_len = sizeof(dummy_udp_ipv6_packet);
- *offsets = dummy_udp_ipv6_packet_offsets;
+ *offsets = dummy_pppoe_ipv6_udp_packet_offsets;
return;
}
@@ -8436,6 +8630,13 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
}
if (tun_type == ICE_SW_TUN_NVGRE || gre) {
+ if (tcp && inner_ipv6) {
+ *pkt = dummy_gre_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_gre_ipv6_tcp_packet);
+ *offsets = dummy_gre_ipv6_tcp_packet_offsets;
+ return;
+ }
+
if (tcp) {
*pkt = dummy_gre_tcp_packet;
*pkt_len = sizeof(dummy_gre_tcp_packet);
@@ -8443,6 +8644,13 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
return;
}
+ if (inner_ipv6) {
+ *pkt = dummy_gre_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_gre_ipv6_udp_packet);
+ *offsets = dummy_gre_ipv6_udp_packet_offsets;
+ return;
+ }
+
*pkt = dummy_gre_udp_packet;
*pkt_len = sizeof(dummy_gre_udp_packet);
*offsets = dummy_gre_udp_packet_offsets;
@@ -8453,6 +8661,13 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
tun_type == ICE_SW_TUN_VXLAN_GPE || tun_type == ICE_SW_TUN_UDP ||
tun_type == ICE_SW_TUN_GENEVE_VLAN ||
tun_type == ICE_SW_TUN_VXLAN_VLAN) {
+ if (tcp && inner_ipv6) {
+ *pkt = dummy_udp_tun_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_udp_tun_ipv6_tcp_packet);
+ *offsets = dummy_udp_tun_ipv6_tcp_packet_offsets;
+ return;
+ }
+
if (tcp) {
*pkt = dummy_udp_tun_tcp_packet;
*pkt_len = sizeof(dummy_udp_tun_tcp_packet);
@@ -8460,6 +8675,13 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
return;
}
+ if (inner_ipv6) {
+ *pkt = dummy_udp_tun_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_udp_tun_ipv6_udp_packet);
+ *offsets = dummy_udp_tun_ipv6_udp_packet_offsets;
+ return;
+ }
+
*pkt = dummy_udp_tun_udp_packet;
*pkt_len = sizeof(dummy_udp_tun_udp_packet);
*offsets = dummy_udp_tun_udp_packet_offsets;
@@ -8472,6 +8694,11 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
*pkt_len = sizeof(dummy_vlan_udp_packet);
*offsets = dummy_vlan_udp_packet_offsets;
return;
+ } else if (pppoe) {
+ *pkt = dummy_pppoe_ipv4_udp_packet;
+ *pkt_len = sizeof(dummy_pppoe_ipv4_udp_packet);
+ *offsets = dummy_pppoe_ipv4_udp_packet_offsets;
+ return;
}
*pkt = dummy_udp_packet;
*pkt_len = sizeof(dummy_udp_packet);
@@ -8483,6 +8710,11 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
*pkt_len = sizeof(dummy_vlan_udp_ipv6_packet);
*offsets = dummy_vlan_udp_ipv6_packet_offsets;
return;
+ } else if (pppoe) {
+ *pkt = dummy_pppoe_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_pppoe_ipv6_udp_packet);
+ *offsets = dummy_pppoe_ipv6_udp_packet_offsets;
+ return;
}
*pkt = dummy_udp_ipv6_packet;
*pkt_len = sizeof(dummy_udp_ipv6_packet);
@@ -8494,6 +8726,11 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
*pkt_len = sizeof(dummy_vlan_tcp_ipv6_packet);
*offsets = dummy_vlan_tcp_ipv6_packet_offsets;
return;
+ } else if (pppoe) {
+ *pkt = dummy_pppoe_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_pppoe_ipv6_tcp_packet);
+ *offsets = dummy_pppoe_ipv6_tcp_packet_offsets;
+ return;
}
*pkt = dummy_tcp_ipv6_packet;
*pkt_len = sizeof(dummy_tcp_ipv6_packet);
@@ -8505,7 +8742,12 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
*pkt = dummy_vlan_tcp_packet;
*pkt_len = sizeof(dummy_vlan_tcp_packet);
*offsets = dummy_vlan_tcp_packet_offsets;
- } else if (mpls) {
+ } else if (pppoe) {
+ *pkt = dummy_pppoe_ipv4_tcp_packet;
+ *pkt_len = sizeof(dummy_pppoe_ipv4_tcp_packet);
+ *offsets = dummy_pppoe_ipv4_tcp_packet_offsets;
+ return;
+ } else if (mpls) {
*pkt = dummy_mpls_packet;
*pkt_len = sizeof(dummy_mpls_packet);
*offsets = dummy_mpls_packet_offsets;
--
2.25.1
next prev parent reply other threads:[~2023-04-27 6:40 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 6:19 [PATCH 00/30] net/ice/base: share code update Qiming Yang
2023-04-27 6:19 ` [PATCH 01/30] net/ice/base: updated copyright Qiming Yang
2023-04-27 6:19 ` [PATCH 02/30] net/ice/base: add flex array safe allocations Qiming Yang
2023-04-27 6:19 ` [PATCH 03/30] net/ice/base: remove unnecessary control queue array Qiming Yang
2024-03-05 18:05 ` [**EXTERNAL**] " Gudimetla, Leela Sankar
2023-04-27 6:19 ` [PATCH 04/30] net/ice/base: update flow seg fields to declared bitmaps Qiming Yang
2023-04-27 6:19 ` [PATCH 05/30] net/ice/base: clean up RSS LUT and fix media type Qiming Yang
2023-04-27 6:19 ` [PATCH 06/30] net/ice/base: add ability to set markid via switch filter Qiming Yang
2023-04-27 6:19 ` [PATCH 07/30] net/ice/base: add reading cap and ropo cap Qiming Yang
2023-04-27 6:19 ` [PATCH 08/30] net/ice/base: add function to read HW sensors Qiming Yang
2023-04-27 6:19 ` [PATCH 09/30] net/ice/base: add pre-allocate memory argument Qiming Yang
2023-04-27 6:19 ` [PATCH 10/30] net/ice/base: use coccinelle to instead macro Qiming Yang
2023-04-27 6:19 ` [PATCH 11/30] net/ice/base: add new fls function Qiming Yang
2023-04-27 6:19 ` [PATCH 12/30] net/ice/base: add E830 device ids Qiming Yang
2023-04-27 6:19 ` [PATCH 13/30] net/ice/base: add function to get rxq context Qiming Yang
2023-04-27 6:19 ` [PATCH 14/30] net/ice/base: removed no need 56G releated code Qiming Yang
2023-04-27 6:19 ` [PATCH 15/30] net/ice/base: allow skip main timer Qiming Yang
2023-04-27 6:19 ` [PATCH 16/30] net/ice/base: add E830 PTP init Qiming Yang
2023-04-27 6:19 ` [PATCH 17/30] net/ice/base: add C825X device support Qiming Yang
2023-04-27 6:19 ` [PATCH 18/30] net/ice/base: add VLAN TPID in switchdev Qiming Yang
2023-04-27 6:19 ` [PATCH 19/30] net/ice/base: reduce time to read Option ROM CIVD Qiming Yang
2023-04-27 6:19 ` Qiming Yang [this message]
2023-04-27 6:19 ` [PATCH 21/30] net/ice/base: add PHY OFFSET READY register clear Qiming Yang
2023-04-27 6:19 ` [PATCH 22/30] net/ice/base: return CGU PLL config function params Qiming Yang
2023-04-27 6:19 ` [PATCH 23/30] net/ice/base: change method to get pca9575 handle Qiming Yang
2023-04-27 6:19 ` [PATCH 24/30] net/ice/base: cleanup timestamp registers correct Qiming Yang
2023-04-27 6:19 ` [PATCH 25/30] net/ice/base: add PPPoE hardware offload Qiming Yang
2023-04-27 6:19 ` [PATCH 26/30] net/ice/base: remove bypass mode Qiming Yang
2023-04-27 6:19 ` [PATCH 27/30] net/ice/base: support inner etype in switchdev Qiming Yang
2023-04-27 6:19 ` [PATCH 28/30] net/ice/base: use const array to store link modes Qiming Yang
2023-04-27 6:20 ` [PATCH 29/30] net/ice/base: introduce a new ID for E810 NIC Qiming Yang
2023-04-27 6:20 ` [PATCH 30/30] net/ice/base: fix Generic Checksum acronym Qiming Yang
2023-04-27 21:18 ` Greenwalt, Paul
2023-05-18 15:16 ` [PATCH v2 00/20] net/ice/base: code update Qiming Yang
2023-05-18 15:16 ` [PATCH v2 01/20] net/ice/base: updated copyright Qiming Yang
2023-05-18 15:16 ` [PATCH v2 02/20] net/ice/base: add NAC Topology device capability parser Qiming Yang
2023-05-18 15:16 ` [PATCH v2 03/20] net/ice/base: add new device for E810 Qiming Yang
2023-05-18 15:16 ` [PATCH v2 04/20] net/ice/base: fix incorrect defines for DCBx Qiming Yang
2023-05-18 15:16 ` [PATCH v2 05/20] net/ice/base: introduce a non-atomic function Qiming Yang
2023-05-18 15:16 ` [PATCH v2 06/20] net/ice/base: add missing AQ flag to AQ command Qiming Yang
2023-05-18 15:16 ` [PATCH v2 07/20] net/ice/base: add support for inner etype in switchdev Qiming Yang
2023-05-18 15:16 ` [PATCH v2 08/20] net/ice/base: add support for PPPoE hardware offload Qiming Yang
2023-05-18 15:16 ` [PATCH v2 09/20] net/ice/base: remove direction metadata for switchdev Qiming Yang
2023-05-18 15:16 ` [PATCH v2 10/20] net/ice/base: reduce time to read Option data Qiming Yang
2023-05-18 17:08 ` Keller, Jacob E
2023-05-18 15:16 ` [PATCH v2 11/20] net/ice/base: add support for VLAN TPID filters Qiming Yang
2023-05-18 15:16 ` [PATCH v2 12/20] net/ice/base: add C825-X device ID Qiming Yang
2023-05-18 15:16 ` [PATCH v2 13/20] net/ice/base: add function to get rxq context Qiming Yang
2023-05-18 15:16 ` [PATCH v2 14/20] net/ice/base: modify tunnel match mask Qiming Yang
2023-05-18 15:16 ` [PATCH v2 15/20] net/ice/base: check VSIG before disassociating VSI Qiming Yang
2023-05-18 15:16 ` [PATCH v2 16/20] net/ice/base: delete get field vector function Qiming Yang
2023-05-18 15:16 ` [PATCH v2 17/20] net/ice/base: update 3k-sign DDP support for E825C Qiming Yang
2023-05-18 15:16 ` [PATCH v2 18/20] net/ice/base: fix static analyzer bug Qiming Yang
2023-05-18 15:16 ` [PATCH v2 19/20] net/ice/base: offer memory config for schedual node Qiming Yang
2023-05-18 15:16 ` [PATCH v2 20/20] net/ice/base: add new AQ ro read HW sensors Qiming Yang
2023-05-23 2:12 ` [PATCH v2 00/20] net/ice/base: code update Zhang, Qi Z
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=20230427062001.478032-21-qiming.yang@intel.com \
--to=qiming.yang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=wojciech.drewek@intel.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).