#define ICE_ETH_ETHTYPE_OFFSET 12
#define ICE_ETH_VLAN_TCI_OFFSET 14
#define ICE_MAX_VLAN_ID 0xFFF
+#define ICE_IPV6_ETHER_ID 0x86DD
#define ICE_IPV4_NVGRE_PROTO_ID 0x002F
#define ICE_PPP_IPV6_PROTO_ID 0x0057
-#define ICE_IPV6_ETHER_ID 0x86DD
#define ICE_TCP_PROTO_ID 0x06
+#define ICE_GTPU_PROFILE 24
#define ICE_ETH_P_8021Q 0x8100
+#define ICE_MPLS_ETHER_ID 0x8847
/* Dummy ethernet header needed in the ice_aqc_sw_rules_elem
* struct to configure any switch filter rules.
/* offset info for MAC + VLAN + IPv4 + UDP dummy packet */
static const struct ice_dummy_pkt_offsets dummy_vlan_udp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_IPV4_OFOS, 18 },
{ ICE_UDP_ILOS, 38 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_OFOS 14 */
+ 0x08, 0x00, /* ICE_ETYPE_OL 16 */
0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 18 */
0x00, 0x01, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 byte alignment */
};
+/* offset info for MAC + MPLS dummy packet */
+static const struct ice_dummy_pkt_offsets dummy_mpls_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_ETYPE_OL, 12 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+/* Dummy packet for MAC + MPLS */
+static const u8 dummy_mpls_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x88, 0x47, /* ICE_ETYPE_OL 12 */
+ 0x00, 0x00, 0x01, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
/* offset info for MAC + VLAN (C-tag, 802.1Q) + IPv4 + TCP dummy packet */
static const struct ice_dummy_pkt_offsets dummy_vlan_tcp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_IPV4_OFOS, 18 },
{ ICE_TCP_IL, 38 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_OFOS 14 */
+ 0x08, 0x00, /* ICE_ETYPE_OL 16 */
0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 18 */
0x00, 0x01, 0x00, 0x00,
static const struct ice_dummy_pkt_offsets
dummy_vlan_tcp_ipv6_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_IPV6_OFOS, 18 },
{ ICE_TCP_IL, 58 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_OFOS 14 */
+ 0x86, 0xDD, /* ICE_ETYPE_OL 16 */
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 18 */
0x00, 0x14, 0x06, 0x00, /* Next header is TCP */
static const struct ice_dummy_pkt_offsets
dummy_vlan_udp_ipv6_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14 },
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_IPV6_OFOS, 18 },
{ ICE_UDP_ILOS, 58 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00,/* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_OFOS 14 */
+ 0x86, 0xDD, /* ICE_ETYPE_OL 16 */
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 18 */
0x00, 0x08, 0x11, 0x00, /* Next header UDP */
{ ICE_UDP_OF, 54 },
{ ICE_GTP, 62 },
{ ICE_IPV6_IL, 82 },
- { ICE_TCP_IL, 102 },
+ { ICE_TCP_IL, 122 },
{ ICE_PROTOCOL_LAST, 0 },
};
{ ICE_UDP_OF, 54 },
{ ICE_GTP, 62 },
{ ICE_IPV6_IL, 82 },
- { ICE_UDP_ILOS, 102 },
+ { ICE_UDP_ILOS, 122 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
0x00, 0x00, 0x00, 0x00,
+
};
static const struct ice_dummy_pkt_offsets dummy_ipv4_gtp_no_pay_packet_offsets[] = {
{ ICE_PROTOCOL_LAST, 0 },
};
+static const u8 dummy_ipv6_gtp_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, 0x6c, 0x11, 0x00, /* Next header UDP*/
+ 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,
+
+ 0x08, 0x68, 0x08, 0x68, /* ICE_UDP_OF 54 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x30, 0x00, 0x00, 0x28, /* ICE_GTP 62 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00,
+};
+
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_PROTOCOL_LAST, 0 },
};
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv4_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV4_OFOS, 26 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x16,
static const
struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_tcp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV4_OFOS, 26 },
{ ICE_TCP_IL, 46 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x16,
static const
struct ice_dummy_pkt_offsets dummy_pppoe_ipv4_udp_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV4_OFOS, 26 },
{ ICE_UDP_ILOS, 46 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x16,
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV6_OFOS, 26 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x2a,
static const
struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_tcp_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV6_OFOS, 26 },
{ ICE_TCP_IL, 66 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x2a,
static const
struct ice_dummy_pkt_offsets dummy_pppoe_packet_ipv6_udp_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_OFOS, 14},
+ { ICE_VLAN_OFOS, 12 },
+ { ICE_ETYPE_OL, 16 },
{ ICE_PPPOE, 18 },
{ ICE_IPV6_OFOS, 26 },
{ ICE_UDP_ILOS, 66 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x81, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_OFOS 12 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 14 */
+ 0x88, 0x64, /* ICE_ETYPE_OL 16 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 18 */
0x00, 0x2a,
static const struct ice_dummy_pkt_offsets dummy_qinq_ipv4_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
{ ICE_IPV4_OFOS, 22 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
+ 0x08, 0x00, /* ICE_ETYPE_OL 20 */
+
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_OFOS 22 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_OFOS 18 */
+ 0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_ipv4_udp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_IPV4_OFOS, 22 },
+ { ICE_UDP_ILOS, 42 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_qinq_ipv4_udp_pkt[] = {
+ 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 */
+ 0x08, 0x00, /* ICE_ETYPE_OL 20 */
0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 22 */
0x00, 0x01, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 byte alignment */
};
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_ipv4_tcp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_IPV4_OFOS, 22 },
+ { ICE_TCP_IL, 42 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_qinq_ipv4_tcp_pkt[] = {
+ 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 */
+ 0x08, 0x00, /* ICE_ETYPE_OL 20 */
+
+ 0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 22 */
+ 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
static const struct ice_dummy_pkt_offsets dummy_qinq_ipv6_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
{ ICE_IPV6_OFOS, 22 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, /* ICE_ETYPE_OL 12 */
+ 0x91, 0x00, 0x00, 0x00, /* ICE_VLAN_EX 12 */
+ 0x81, 0x00, 0x00, 0x00, /* ICE_VLAN_IN 16 */
+ 0x86, 0xDD, /* ICE_ETYPE_OL 20 */
- 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_OFOS 18 */
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 22 */
+ 0x00, 0x00, 0x3b, 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, /* 2 bytes for 4 byte alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_ipv6_udp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_IPV6_OFOS, 22 },
+ { ICE_UDP_ILOS, 62 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_qinq_ipv6_udp_pkt[] = {
+ 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 */
+ 0x86, 0xDD, /* ICE_ETYPE_OL 20 */
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 22 */
- 0x00, 0x10, 0x11, 0x00, /* Next header UDP */
+ 0x00, 0x08, 0x11, 0x00, /* Next header UDP */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 62 */
- 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, /* needed for ESP packets */
+ 0x00, 0x00, /* 2 bytes for 4 byte alignment */
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_qinq_ipv6_tcp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
+ { ICE_IPV6_OFOS, 22 },
+ { ICE_TCP_IL, 62 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_qinq_ipv6_tcp_pkt[] = {
+ 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 */
+ 0x86, 0xDD, /* ICE_ETYPE_OL 20 */
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 22 */
+ 0x00, 0x14, 0x06, 0x00, /* Next header 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 62 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, /* 2 bytes for 4 byte alignment */
static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { 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_ETYPE_OL, 12 },
- { ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
{ ICE_PPPOE, 22 },
{ ICE_IPV4_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, /* ICE_ETYPE_OL 12 */
-
- 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 18 */
+ 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, 0x16,
0x00, 0x21, /* PPP Link Layer 28 */
- 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_IL 30 */
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_OFOS 30 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
static const
struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_ipv6_offsets[] = {
{ ICE_MAC_OFOS, 0 },
- { ICE_ETYPE_OL, 12 },
- { ICE_VLAN_EX, 14},
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_EX, 12 },
+ { ICE_VLAN_IN, 16 },
+ { ICE_ETYPE_OL, 20 },
{ ICE_PPPOE, 22 },
{ ICE_IPV6_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
- 0x91, 0x00, /* ICE_ETYPE_OL 12 */
-
- 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 18 */
+ 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,
~ICE_AQ_RECIPE_RESULT_EN, recp->res_idxs);
}
+static struct ice_prof_type_entry ice_prof_type_tbl[ICE_GTPU_PROFILE] = {
+ { ICE_PROFID_IPV4_GTPU_IPV4_OTHER, ICE_SW_TUN_IPV4_GTPU_IPV4},
+ { ICE_PROFID_IPV4_GTPU_IPV4_UDP, ICE_SW_TUN_IPV4_GTPU_IPV4_UDP},
+ { ICE_PROFID_IPV4_GTPU_IPV4_TCP, ICE_SW_TUN_IPV4_GTPU_IPV4_TCP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, ICE_SW_TUN_IPV4_GTPU_EH_IPV4},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP},
+ { ICE_PROFID_IPV4_GTPU_IPV6_OTHER, ICE_SW_TUN_IPV4_GTPU_IPV6},
+ { ICE_PROFID_IPV4_GTPU_IPV6_UDP, ICE_SW_TUN_IPV4_GTPU_IPV6_UDP},
+ { ICE_PROFID_IPV4_GTPU_IPV6_TCP, ICE_SW_TUN_IPV4_GTPU_IPV6_TCP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, ICE_SW_TUN_IPV4_GTPU_EH_IPV6},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP},
+ { ICE_PROFID_IPV6_GTPU_IPV4_OTHER, ICE_SW_TUN_IPV6_GTPU_IPV4},
+ { ICE_PROFID_IPV6_GTPU_IPV4_UDP, ICE_SW_TUN_IPV6_GTPU_IPV4_UDP},
+ { ICE_PROFID_IPV6_GTPU_IPV4_TCP, ICE_SW_TUN_IPV6_GTPU_IPV4_TCP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, ICE_SW_TUN_IPV6_GTPU_EH_IPV4},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP},
+ { ICE_PROFID_IPV6_GTPU_IPV6_OTHER, ICE_SW_TUN_IPV6_GTPU_IPV6},
+ { ICE_PROFID_IPV6_GTPU_IPV6_UDP, ICE_SW_TUN_IPV6_GTPU_IPV6_UDP},
+ { ICE_PROFID_IPV6_GTPU_IPV6_TCP, ICE_SW_TUN_IPV6_GTPU_IPV6_TCP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, ICE_SW_TUN_IPV6_GTPU_EH_IPV6},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP},
+};
+
/**
* ice_get_tun_type_for_recipe - get tunnel type for the recipe
* @rid: recipe ID that we are populating
u8 pppoe_profile[7] = {34, 35, 36, 37, 38, 39, 40};
u8 non_tun_profile[6] = {4, 5, 6, 7, 8, 9};
enum ice_sw_tunnel_type tun_type;
- u16 i, j, profile_num = 0;
+ u16 i, j, k, profile_num = 0;
bool non_tun_valid = false;
bool pppoe_valid = false;
bool vxlan_valid = false;
}
if (tun_type == ICE_SW_TUN_GTP) {
- if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV4_GTPU_IPV4_OTHER))
- tun_type = ICE_SW_TUN_IPV4_GTPU_IPV4;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV4_GTPU_IPV6_OTHER))
- tun_type = ICE_SW_TUN_IPV4_GTPU_IPV6;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV6_GTPU_IPV4_OTHER))
- tun_type = ICE_SW_TUN_IPV6_GTPU_IPV4;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV6_GTPU_IPV6_OTHER))
- tun_type = ICE_SW_TUN_IPV6_GTPU_IPV6;
+ for (k = 0; k < ARRAY_SIZE(ice_prof_type_tbl); k++)
+ if (ice_is_bit_set(recipe_to_profile[rid],
+ ice_prof_type_tbl[k].prof_id)) {
+ tun_type = ice_prof_type_tbl[k].type;
+ break;
+ }
}
if (profile_num == 1 && (flag_valid || non_tun_valid || pppoe_valid)) {
ICE_AQC_GET_SW_CONF_RESP_TYPE_S);
switch (res_type) {
+ case ICE_AQC_GET_SW_CONF_RESP_VSI:
+ if (hw->dcf_enabled && !is_vf)
+ hw->pf_id = pf_vf_num;
+ break;
case ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT:
case ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT:
if (j == num_total_ports) {
* @sw: pointer to switch info struct for which function add rule
* @lport: logic port number on which function add rule
*
- * IMPORTANT: When the ucast_shared flag is set to false and m_list has
+ * IMPORTANT: When the umac_shared flag is set to false and m_list has
* multiple unicast addresses, the function assumes that all the
* addresses are unique in a given add_mac call. It doesn't
* check for duplicates in this case, removing duplicates from a given
if (m_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_MAC ||
IS_ZERO_ETHER_ADDR(add))
return ICE_ERR_PARAM;
- if (IS_UNICAST_ETHER_ADDR(add) && !hw->ucast_shared) {
+ if (IS_UNICAST_ETHER_ADDR(add) && !hw->umac_shared) {
/* Don't overwrite the unicast address */
ice_acquire_lock(rule_lock);
if (ice_find_rule_entry(rule_head,
&m_list_itr->fltr_info)) {
ice_release_lock(rule_lock);
- return ICE_ERR_ALREADY_EXISTS;
+ continue;
}
ice_release_lock(rule_lock);
num_unicast++;
} else if (IS_MULTICAST_ETHER_ADDR(add) ||
- (IS_UNICAST_ETHER_ADDR(add) && hw->ucast_shared)) {
+ (IS_UNICAST_ETHER_ADDR(add) && hw->umac_shared)) {
m_list_itr->status =
ice_add_rule_internal(hw, recp_list, lport,
m_list_itr);
list_itr->fltr_info.fwd_id.hw_vsi_id =
ice_get_hw_vsi_num(hw, vsi_handle);
- if (IS_UNICAST_ETHER_ADDR(add) && !hw->ucast_shared) {
+ if (IS_UNICAST_ETHER_ADDR(add) && !hw->umac_shared) {
/* Don't remove the unicast address that belongs to
* another VSI on the switch, since it is not being
* shared...
{ ICE_MAC_OFOS, { 0, 2, 4, 6, 8, 10, 12 } },
{ ICE_MAC_IL, { 0, 2, 4, 6, 8, 10, 12 } },
{ ICE_ETYPE_OL, { 0 } },
- { ICE_VLAN_OFOS, { 0, 2 } },
+ { ICE_VLAN_OFOS, { 2, 0 } },
{ ICE_IPV4_OFOS, { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
{ ICE_IPV4_IL, { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },
{ ICE_IPV6_OFOS, { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
{ ICE_GENEVE, { 8, 10, 12, 14 } },
{ ICE_VXLAN_GPE, { 8, 10, 12, 14 } },
{ ICE_NVGRE, { 0, 2, 4, 6 } },
- { ICE_GTP, { 8, 10, 12, 14, 16, 18, 20 } },
+ { ICE_GTP, { 8, 10, 12, 14, 16, 18, 20, 22 } },
{ ICE_PPPOE, { 0, 2, 4, 6 } },
{ ICE_PFCP, { 8, 10, 12, 14, 16, 18, 20, 22 } },
{ ICE_L2TPV3, { 0, 2, 4, 6, 8, 10 } },
{ ICE_AH, { 0, 2, 4, 6, 8, 10 } },
{ ICE_NAT_T, { 8, 10, 12, 14 } },
{ ICE_GTP_NO_PAY, { 8, 10, 12, 14 } },
- { ICE_VLAN_EX, { 0, 2 } },
+ { ICE_VLAN_EX, { 2, 0 } },
+ { ICE_VLAN_IN, { 2, 0 } },
};
/* The following table describes preferred grouping of recipes.
{ ICE_NAT_T, ICE_UDP_ILOS_HW },
{ ICE_GTP_NO_PAY, ICE_UDP_ILOS_HW },
{ ICE_VLAN_EX, ICE_VLAN_OF_HW },
+ { ICE_VLAN_IN, ICE_VLAN_OL_HW },
};
/**
case ICE_SW_IPV6_UDP:
ice_set_bit(ICE_PROFID_IPV6_UDP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_NO_PAY:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_TEID, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_NO_PAY:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_TEID, bm);
+ return;
case ICE_SW_TUN_IPV4_GTPU_IPV4:
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_TCP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
+ return;
case ICE_SW_TUN_IPV6_GTPU_IPV4:
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_TCP, bm);
return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
+ return;
case ICE_SW_TUN_IPV4_GTPU_IPV6:
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_TCP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
+ return;
case ICE_SW_TUN_IPV6_GTPU_IPV6:
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_TCP, bm);
return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
+ return;
case ICE_SW_TUN_AND_NON_TUN:
case ICE_SW_TUN_AND_NON_TUN_QINQ:
default:
bool ice_is_prof_rule(enum ice_sw_tunnel_type type)
{
switch (type) {
+ case ICE_SW_TUN_AND_NON_TUN:
case ICE_SW_TUN_PROFID_IPV6_ESP:
case ICE_SW_TUN_PROFID_IPV6_AH:
case ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3:
const struct ice_dummy_pkt_offsets **offsets)
{
bool tcp = false, udp = false, ipv6 = false, vlan = false;
- bool gre = false;
+ bool gre = false, mpls = false;
u16 i;
for (i = 0; i < lkups_cnt; i++) {
ipv6 = true;
else if (lkups[i].type == ICE_VLAN_OFOS)
vlan = true;
+ else if (lkups[i].type == ICE_ETYPE_OL &&
+ lkups[i].h_u.ethertype.ethtype_id ==
+ CPU_TO_BE16(ICE_IPV6_ETHER_ID) &&
+ lkups[i].m_u.ethertype.ethtype_id ==
+ CPU_TO_BE16(0xFFFF))
+ ipv6 = true;
else if (lkups[i].type == ICE_IPV4_OFOS &&
lkups[i].h_u.ipv4_hdr.protocol ==
ICE_IPV4_NVGRE_PROTO_ID &&
lkups[i].m_u.pppoe_hdr.ppp_prot_id ==
0xFFFF)
ipv6 = true;
- else if (lkups[i].type == ICE_ETYPE_OL &&
- lkups[i].h_u.ethertype.ethtype_id ==
- CPU_TO_BE16(ICE_IPV6_ETHER_ID) &&
- lkups[i].m_u.ethertype.ethtype_id ==
- 0xFFFF)
- ipv6 = true;
else if (lkups[i].type == ICE_IPV4_IL &&
lkups[i].h_u.ipv4_hdr.protocol ==
ICE_TCP_PROTO_ID &&
lkups[i].m_u.ipv4_hdr.protocol ==
0xFF)
tcp = true;
+ else if (lkups[i].type == ICE_ETYPE_OL &&
+ lkups[i].h_u.ethertype.ethtype_id ==
+ CPU_TO_BE16(ICE_MPLS_ETHER_ID) &&
+ lkups[i].m_u.ethertype.ethtype_id == 0xFFFF)
+ mpls = true;
}
if ((tun_type == ICE_SW_TUN_AND_NON_TUN_QINQ ||
tun_type == ICE_NON_TUN_QINQ) && ipv6) {
+ if (tcp) {
+ *pkt = dummy_qinq_ipv6_tcp_pkt;
+ *pkt_len = sizeof(dummy_qinq_ipv6_tcp_pkt);
+ *offsets = dummy_qinq_ipv6_tcp_packet_offsets;
+ return;
+ }
+
+ if (udp) {
+ *pkt = dummy_qinq_ipv6_udp_pkt;
+ *pkt_len = sizeof(dummy_qinq_ipv6_udp_pkt);
+ *offsets = dummy_qinq_ipv6_udp_packet_offsets;
+ return;
+ }
+
*pkt = dummy_qinq_ipv6_pkt;
*pkt_len = sizeof(dummy_qinq_ipv6_pkt);
*offsets = dummy_qinq_ipv6_packet_offsets;
return;
} else if (tun_type == ICE_SW_TUN_AND_NON_TUN_QINQ ||
tun_type == ICE_NON_TUN_QINQ) {
+ if (tcp) {
+ *pkt = dummy_qinq_ipv4_tcp_pkt;
+ *pkt_len = sizeof(dummy_qinq_ipv4_tcp_pkt);
+ *offsets = dummy_qinq_ipv4_tcp_packet_offsets;
+ return;
+ }
+
+ if (udp) {
+ *pkt = dummy_qinq_ipv4_udp_pkt;
+ *pkt_len = sizeof(dummy_qinq_ipv4_udp_pkt);
+ *offsets = dummy_qinq_ipv4_udp_packet_offsets;
+ return;
+ }
+
*pkt = dummy_qinq_ipv4_pkt;
*pkt_len = sizeof(dummy_qinq_ipv4_pkt);
*offsets = dummy_qinq_ipv4_packet_offsets;
*pkt_len = sizeof(dummy_qinq_pppoe_ipv4_pkt);
*offsets = dummy_qinq_pppoe_ipv4_packet_offsets;
return;
+ } else if (tun_type == ICE_SW_TUN_PPPOE_QINQ && ipv6) {
+ *pkt = dummy_qinq_pppoe_ipv6_packet;
+ *pkt_len = sizeof(dummy_qinq_pppoe_ipv6_packet);
+ *offsets = dummy_qinq_pppoe_packet_offsets;
+ return;
} else if (tun_type == ICE_SW_TUN_PPPOE_QINQ ||
tun_type == ICE_SW_TUN_PPPOE_PAY_QINQ) {
*pkt = dummy_qinq_pppoe_ipv4_pkt;
*offsets = dummy_ipv4_gtp_no_pay_packet_offsets;
return;
} else if (tun_type == ICE_SW_TUN_IPV6_GTPU_NO_PAY) {
- *pkt = dummy_ipv6_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
+ *pkt = dummy_ipv6_gtp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtp_packet);
*offsets = dummy_ipv6_gtp_no_pay_packet_offsets;
return;
}
return;
}
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4 ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4) {
+ *pkt = dummy_ipv4_gtpu_ipv4_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4_UDP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP) {
+ *pkt = dummy_ipv4_gtpu_ipv4_udp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_udp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4_TCP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP) {
+ *pkt = dummy_ipv4_gtpu_ipv4_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_tcp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6 ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6) {
+ *pkt = dummy_ipv4_gtpu_ipv6_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6_UDP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP) {
+ *pkt = dummy_ipv4_gtpu_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_udp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6_TCP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP) {
+ *pkt = dummy_ipv4_gtpu_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_tcp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4 ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4) {
+ *pkt = dummy_ipv6_gtpu_ipv4_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4_UDP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP) {
+ *pkt = dummy_ipv6_gtpu_ipv4_udp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_udp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4_TCP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP) {
+ *pkt = dummy_ipv6_gtpu_ipv4_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_tcp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6 ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6) {
+ *pkt = dummy_ipv6_gtpu_ipv6_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6_UDP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP) {
+ *pkt = dummy_ipv6_gtpu_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_udp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6_TCP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP) {
+ *pkt = dummy_ipv6_gtpu_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_tcp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_tcp_packet_offsets;
+ return;
+ }
+
if (tun_type == ICE_SW_TUN_PPPOE && ipv6) {
*pkt = dummy_pppoe_ipv6_packet;
*pkt_len = sizeof(dummy_pppoe_ipv6_packet);
return;
}
- /* Support GTP tunnel + L3 */
- if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4) {
- *pkt = dummy_ipv4_gtpu_ipv4_packet;
- *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
- *offsets = dummy_ipv4_gtpu_ipv4_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6) {
- *pkt = dummy_ipv4_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
- *offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4) {
- *pkt = dummy_ipv6_gtpu_ipv4_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_packet);
- *offsets = dummy_ipv6_gtpu_ipv4_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6) {
- *pkt = dummy_ipv6_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
- *offsets = dummy_ipv6_gtpu_ipv6_packet_offsets;
- return;
- }
-
if (tun_type == ICE_ALL_TUNNELS) {
*pkt = dummy_gre_udp_packet;
*pkt_len = sizeof(dummy_gre_udp_packet);
*pkt = dummy_vlan_tcp_packet;
*pkt_len = sizeof(dummy_vlan_tcp_packet);
*offsets = dummy_vlan_tcp_packet_offsets;
+ } else if (mpls) {
+ *pkt = dummy_mpls_packet;
+ *pkt_len = sizeof(dummy_mpls_packet);
+ *offsets = dummy_mpls_packet_offsets;
} else {
*pkt = dummy_tcp_packet;
*pkt_len = sizeof(dummy_tcp_packet);
break;
case ICE_VLAN_OFOS:
case ICE_VLAN_EX:
+ case ICE_VLAN_IN:
len = sizeof(struct ice_vlan_hdr);
break;
case ICE_IPV4_OFOS:
s_rule = (struct ice_aqc_sw_rules_elem *)ice_malloc(hw, rule_buf_sz);
if (!s_rule)
return ICE_ERR_NO_MEMORY;
- act |= ICE_SINGLE_ACT_LAN_ENABLE;
+ if (!rinfo->flags_info.act_valid)
+ act |= ICE_SINGLE_ACT_LAN_ENABLE;
+ else
+ act |= rinfo->flags_info.act & (ICE_SINGLE_ACT_LAN_ENABLE |
+ ICE_SINGLE_ACT_LB_ENABLE);
+
switch (rinfo->sw_act.fltr_act) {
case ICE_FWD_TO_VSI:
act |= (rinfo->sw_act.fwd_id.hw_vsi_id <<