};
static const u8 ice_fdir_ipv4_gtpu4_pkt[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00,
+ 0x00, 0x44, 0x00, 0x00, 0x40, 0x00, 0x40, 0x11,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x00,
+ 0x00, 0x00, 0x33, 0xff, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x45, 0x00,
+ 0x00, 0x14, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+};
+
+static const u8 ice_fdir_ipv6_gtpu6_pkt[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x86, 0xdd, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x44, 0x11, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x68,
+ 0x08, 0x68, 0x00, 0x44, 0x7f, 0xed, 0x33, 0xff,
+ 0x00, 0x34, 0x12, 0x34, 0x56, 0x78, 0x00, 0x00,
+ 0x00, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3b, 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,
+};
+
+static const u8 ice_fdir_ipv4_gtpu4_eh_pkt[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00,
0x00, 0x44, 0x00, 0x00, 0x40, 0x00, 0x40, 0x11,
0x00, 0x00,
};
-static const u8 ice_fdir_ipv6_gtpu6_pkt[] = {
+static const u8 ice_fdir_ipv6_gtpu6_eh_pkt[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x86, 0xdd, 0x60, 0x00,
0x00, 0x00, 0x00, 0x44, 0x11, 0x40, 0x00, 0x00,
sizeof(ice_fdir_ipv6_gtpu6_pkt),
ice_fdir_ipv6_gtpu6_pkt,
},
+ {
+ ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_OTHER,
+ sizeof(ice_fdir_ipv4_gtpu4_eh_pkt),
+ ice_fdir_ipv4_gtpu4_eh_pkt,
+ sizeof(ice_fdir_ipv4_gtpu4_eh_pkt),
+ ice_fdir_ipv4_gtpu4_eh_pkt,
+ },
+ {
+ ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_IPV6_OTHER,
+ sizeof(ice_fdir_ipv6_gtpu6_eh_pkt),
+ ice_fdir_ipv6_gtpu6_eh_pkt,
+ sizeof(ice_fdir_ipv6_gtpu6_eh_pkt),
+ ice_fdir_ipv6_gtpu6_eh_pkt,
+ },
{
ICE_FLTR_PTYPE_NONF_IPV4_L2TPV3,
sizeof(ice_fdir_ipv4_l2tpv3_pkt), ice_fdir_ipv4_l2tpv3_pkt,
input->ip.v4.proto);
ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
break;
+ case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
+ ice_pkt_insert_u32(loc, ICE_IPV4_DST_ADDR_OFFSET,
+ input->ip.v4.src_ip);
+ ice_pkt_insert_u32(loc, ICE_IPV4_SRC_ADDR_OFFSET,
+ input->ip.v4.dst_ip);
+ ice_pkt_insert_u32(loc, ICE_IPV4_GTPU_TEID_OFFSET,
+ input->gtpu_data.teid);
+ break;
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_UDP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
- case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
+ case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_OTHER:
ice_pkt_insert_u32(loc, ICE_IPV4_DST_ADDR_OFFSET,
input->ip.v4.src_ip);
ice_pkt_insert_u32(loc, ICE_IPV4_SRC_ADDR_OFFSET,
input->gtpu_data.qfi);
break;
case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+ ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
+ input->ip.v6.src_ip);
+ ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
+ input->ip.v6.dst_ip);
+ ice_pkt_insert_u32(loc, ICE_IPV6_GTPU_TEID_OFFSET,
+ input->gtpu_data.teid);
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_IPV6_OTHER:
ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
input->ip.v6.src_ip);
ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
goto err;
break;
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+ cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_UDP;
if (!ice_fdir_prof_resolve_conflict
(pf, cflct_ptype, is_tunnel))
goto err;
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+ cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP;
if (!ice_fdir_prof_resolve_conflict
(pf, cflct_ptype, is_tunnel))
goto err;
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
- if (!ice_fdir_prof_resolve_conflict
- (pf, cflct_ptype, is_tunnel))
- goto err;
- break;
- /* IPv6 GTPU */
- case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
- if (!ice_fdir_prof_resolve_conflict
- (pf, cflct_ptype, is_tunnel))
- goto err;
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
- if (!ice_fdir_prof_resolve_conflict
- (pf, cflct_ptype, is_tunnel))
- goto err;
- cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+ cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP;
if (!ice_fdir_prof_resolve_conflict
(pf, cflct_ptype, is_tunnel))
goto err;
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
- if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
- ICE_FLOW_SEG_HDR_IPV4 |
- ICE_FLOW_SEG_HDR_IPV_OTHER);
- else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
- ICE_FLOW_SEG_HDR_GTPU_IP |
- ICE_FLOW_SEG_HDR_IPV4 |
- ICE_FLOW_SEG_HDR_IPV_OTHER);
- else
- PMD_DRV_LOG(ERR, "not supported tunnel type.");
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV4 |
+ ICE_FLOW_SEG_HDR_IPV_OTHER);
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_OTHER:
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+ ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV4 |
+ ICE_FLOW_SEG_HDR_IPV_OTHER);
break;
case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
- if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
- ICE_FLOW_SEG_HDR_IPV6 |
- ICE_FLOW_SEG_HDR_IPV_OTHER);
- else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
- ICE_FLOW_SEG_HDR_GTPU_IP |
- ICE_FLOW_SEG_HDR_IPV6 |
- ICE_FLOW_SEG_HDR_IPV_OTHER);
- else
- PMD_DRV_LOG(ERR, "not supported tunnel type.");
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV6 |
+ ICE_FLOW_SEG_HDR_IPV_OTHER);
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_IPV6_OTHER:
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+ ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV6 |
+ ICE_FLOW_SEG_HDR_IPV_OTHER);
break;
case ICE_FLTR_PTYPE_NON_IP_L2:
ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_ETH_NON_IP);
}
}
- if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
- tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH) {
- if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
- flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
- else
- flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
- }
+ if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU &&
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+ else if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH &&
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_OTHER;
+ else if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU &&
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV6_UDP)
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+ else if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH &&
+ flow_type == ICE_FLTR_PTYPE_NONF_IPV6_UDP)
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_IPV6_OTHER;
filter->tunnel_type = tunnel_type;
filter->input.flow_type = flow_type;