ICE_FDIR_INSET_VXLAN_IPV4 | \
ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
-#define ICE_FDIR_INSET_GTPU (\
+#define ICE_FDIR_INSET_IPV4_GTPU (\
ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
-#define ICE_FDIR_INSET_GTPU_EH (\
+#define ICE_FDIR_INSET_IPV4_GTPU_EH (\
ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+#define ICE_FDIR_INSET_IPV6_GTPU (\
+ ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_IPV6_GTPU_EH (\
+ ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | \
+ ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+
static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
{pattern_eth_ipv4, ICE_FDIR_INSET_ETH_IPV4, ICE_INSET_NONE},
{pattern_eth_ipv4_udp, ICE_FDIR_INSET_ETH_IPV4_UDP, ICE_INSET_NONE},
ICE_FDIR_INSET_VXLAN_IPV4_TCP, ICE_INSET_NONE},
{pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
ICE_FDIR_INSET_VXLAN_IPV4_SCTP, ICE_INSET_NONE},
- {pattern_eth_ipv4_gtpu, ICE_FDIR_INSET_GTPU, ICE_INSET_NONE},
- {pattern_eth_ipv4_gtpu_eh, ICE_FDIR_INSET_GTPU_EH, ICE_INSET_NONE},
+ {pattern_eth_ipv4_gtpu, ICE_FDIR_INSET_IPV4_GTPU, ICE_INSET_NONE},
+ {pattern_eth_ipv4_gtpu_eh, ICE_FDIR_INSET_IPV4_GTPU_EH, ICE_INSET_NONE},
+ {pattern_eth_ipv6_gtpu, ICE_FDIR_INSET_IPV6_GTPU, ICE_INSET_NONE},
+ {pattern_eth_ipv6_gtpu_eh, ICE_FDIR_INSET_IPV6_GTPU_EH, ICE_INSET_NONE},
};
static struct ice_flow_parser ice_fdir_parser_os;
(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;
+ if (!ice_fdir_prof_resolve_conflict
+ (pf, cflct_ptype, is_tunnel))
+ goto err;
+ break;
/* IPv6 */
case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
else
PMD_DRV_LOG(ERR, "not supported tunnel type.");
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.");
+ break;
case ICE_FLTR_PTYPE_NON_IP_L2:
ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_ETH_NON_IP);
break;
}
if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
- tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
- flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+ 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;
+ }
filter->tunnel_type = tunnel_type;
filter->input.flow_type = flow_type;
RTE_FLOW_ITEM_TYPE_END,
};
-/* GTPU */
+/*IPv4 GTPU (EH) */
enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_END,
};
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_GTP_PSC,
RTE_FLOW_ITEM_TYPE_END,
};
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+
+/*IPv6 GTPU (EH) */
+enum rte_flow_item_type pattern_eth_ipv6_gtpu[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_IPV6,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_GTP_PSC,
RTE_FLOW_ITEM_TYPE_END,
};
+
+/*IPv4 GTPU IPv4 */
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_END,
+};
+
+/*IPv4 GTPU EH IPv4 */
enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,