0x00, 0x00, /* 2 bytes for 4 byte alignment */
};
-static const struct ice_dummy_pkt_offsets dummy_udp_gtp_packet_offsets[] = {
- { ICE_MAC_OFOS, 0 },
- { ICE_IPV4_OFOS, 14 },
- { ICE_UDP_OF, 34 },
- { ICE_GTP, 42 },
- { ICE_PROTOCOL_LAST, 0 },
-};
-
-static const u8 dummy_udp_gtp_packet[] = {
- 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x08, 0x00,
-
- 0x45, 0x00, 0x00, 0x30, /* ICE_IPV4_OFOS 14 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x11, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x08, 0x68, /* ICE_UDP_OF 34 */
- 0x00, 0x1c, 0x00, 0x00,
-
- 0x34, 0xff, 0x00, 0x0c, /* ICE_GTP 42 */
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x85,
-
- 0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
- 0x00, 0x00, 0x00, 0x00,
-};
-
-static const
-struct ice_dummy_pkt_offsets dummy_ipv4_gtpu_ipv4_packet_offsets[] = {
+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 },
0x00, 0x00,
};
-static const
-struct ice_dummy_pkt_offsets dummy_ipv4_gtp_no_pay_packet_offsets[] = {
+static const struct ice_dummy_pkt_offsets dummy_udp_gtp_packet_offsets[] = {
+ { ICE_MAC_OFOS, 0 },
+ { ICE_IPV4_OFOS, 14 },
+ { ICE_UDP_OF, 34 },
+ { ICE_GTP, 42 },
+ { ICE_PROTOCOL_LAST, 0 },
+};
+
+static const u8 dummy_udp_gtp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00,
+
+ 0x45, 0x00, 0x00, 0x30, /* ICE_IPV4_OFOS 14 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x08, 0x68, /* ICE_UDP_OF 34 */
+ 0x00, 0x1c, 0x00, 0x00,
+
+ 0x34, 0xff, 0x00, 0x0c, /* ICE_GTP 42 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x85,
+
+ 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_MAC_OFOS, 0 },
{ ICE_IPV4_OFOS, 14 },
{ ICE_UDP_OF, 34 },
*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) {
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);