X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fice_fdir_filter.c;h=c4b7265ce044fa6647adbea3c467c2f0f19ff274;hb=da598edd06c95bd55b466aa5013e88faf37ed667;hp=745d7291ae0d2c7663cee8c57e710d8baf7f4cb7;hpb=a9bafa9f700c41500cc2ddc1568a10370336f2de;p=dpdk.git diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 745d7291ae..c4b7265ce0 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -778,30 +778,15 @@ ice_fdir_cross_prof_conflict(struct ice_pf *pf, 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; @@ -1025,30 +1010,26 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow, 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); @@ -2007,13 +1988,18 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, } } - 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;