0x00, 0x00, 0x00, 0x00,
};
+static const
+struct ice_dummy_pkt_offsets dummy_ipv4_gtpu_ipv4_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_GTP, 42 },
+ { ICE_IPV4_IL, 62 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_ipv4_gtpu_ipv4_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00,
+
+ 0x45, 0x00, 0x00, 0x44, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x00, 0x40, 0x00,
+ 0x40, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x68, 0x08, 0x68, /* ICE_UDP_OF 34 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x34, 0xff, 0x00, 0x28, /* ICE_GTP 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x85,
+
+ 0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_IL 62 */
+ 0x00, 0x00, 0x40, 0x00,
+ 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_ipv4_gtpu_ipv6_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_GTP, 42 },
+ { ICE_IPV6_IL, 62 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_ipv4_gtpu_ipv6_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00,
+
+ 0x45, 0x00, 0x00, 0x58, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x00, 0x40, 0x00,
+ 0x40, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x68, 0x08, 0x68, /* ICE_UDP_OF 34 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x34, 0xff, 0x00, 0x28, /* ICE_GTP 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x85,
+
+ 0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_IL 62 */
+ 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,
+};
+
+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 },
+ { ICE_GTP, 62 },
+ { ICE_IPV4_IL, 82 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_ipv6_gtpu_ipv4_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, 0x58, 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,
+
+ 0x34, 0xff, 0x00, 0x28, /* ICE_GTP 62 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x85,
+
+ 0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_IL 82 */
+ 0x00, 0x00, 0x40, 0x00,
+ 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00,
+};
+
+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 },
+ { ICE_GTP, 62 },
+ { ICE_IPV6_IL, 82 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_ipv6_gtpu_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, 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,
+
+ 0x34, 0xff, 0x00, 0x28, /* ICE_GTP 62 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x85,
+
+ 0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFIL 82 */
+ 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,
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_ipv4_gtp_no_pay_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_GTP_NO_PAY, 42 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const
+struct ice_dummy_pkt_offsets dummy_ipv6_gtp_no_pay_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_IPV6_OFOS, 14 },
+ { ICE_UDP_OF, 54 },
+ { ICE_GTP_NO_PAY, 62 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
}
if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER &&
- j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER)
+ j <= ICE_PROFID_IPV6_GTPU_IPV6_TCP)
gtp_valid = true;
- if (j >= ICE_PROFID_IPV4_ESP &&
- j <= ICE_PROFID_IPV6_PFCP_SESSION)
+ if ((j >= ICE_PROFID_IPV4_ESP &&
+ j <= ICE_PROFID_IPV6_PFCP_SESSION) ||
+ (j >= ICE_PROFID_IPV4_GTPC_TEID &&
+ j <= ICE_PROFID_IPV6_GTPU_TEID))
flag_valid = true;
}
else if (non_tun_valid && !vxlan_valid && !gre_valid && !gtp_valid &&
!pppoe_valid)
tun_type = ICE_NON_TUN;
+ else
+ tun_type = ICE_NON_TUN;
if (profile_num > 1 && tun_type == ICE_SW_TUN_PPPOE) {
i = ice_is_bit_set(recipe_to_profile[rid],
tun_type = ICE_SW_TUN_PPPOE_IPV6;
}
+ 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;
+ }
+
if (profile_num == 1 && (flag_valid || non_tun_valid || pppoe_valid)) {
for (j = 0; j < ICE_MAX_NUM_PROFILES; j++) {
if (ice_is_bit_set(recipe_to_profile[rid], j)) {
case ICE_PROFID_MAC_IPV6_L2TPV3:
tun_type = ICE_SW_TUN_IPV6_L2TPV3;
break;
+ case ICE_PROFID_IPV4_GTPU_TEID:
+ tun_type = ICE_SW_TUN_IPV4_GTPU_NO_PAY;
+ break;
+ case ICE_PROFID_IPV6_GTPU_TEID:
+ tun_type = ICE_SW_TUN_IPV6_GTPU_NO_PAY;
+ break;
default:
break;
}
{ ICE_ESP, { 0, 2, 4, 6 } },
{ ICE_AH, { 0, 2, 4, 6, 8, 10 } },
{ ICE_NAT_T, { 8, 10, 12, 14 } },
+ { ICE_GTP_NO_PAY, { 8, 10, 12, 14 } },
};
/* The following table describes preferred grouping of recipes.
{ ICE_ESP, ICE_ESP_HW },
{ ICE_AH, ICE_AH_HW },
{ ICE_NAT_T, ICE_UDP_ILOS_HW },
+ { ICE_GTP_NO_PAY, ICE_UDP_ILOS_HW },
};
/**
case ICE_SW_IPV6_UDP:
ice_set_bit(ICE_PROFID_IPV6_UDP, 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_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_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_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_AND_NON_TUN:
default:
prof_type = ICE_PROF_ALL;
tcp = true;
}
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_NO_PAY) {
+ *pkt = dummy_ipv4_gtpu_ipv4_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
+ *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);
+ *offsets = dummy_ipv6_gtp_no_pay_packet_offsets;
+ return;
+ } else 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;
+ } else 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;
+ } else 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;
+ } else 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_SW_TUN_IPV4_ESP) {
*pkt = dummy_ipv4_esp_pkt;
*pkt_len = sizeof(dummy_ipv4_esp_pkt);
break;
case ICE_GTP:
+ case ICE_GTP_NO_PAY:
len = sizeof(struct ice_udp_gtp_hdr);
break;
case ICE_PPPOE: