net/ice: clean GTPU flow type for flow director
authorZhirun Yan <zhirun.yan@intel.com>
Tue, 2 Mar 2021 02:54:07 +0000 (10:54 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 5 Mar 2021 08:48:11 +0000 (09:48 +0100)
Currently, FDIR only support GTPU outer fields in PF. Clean the
redundant GTPU inner info in flow type definition and align with
shared code.

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_fdir_filter.c

index 72836fc..3af5812 100644 (file)
@@ -954,26 +954,23 @@ ice_fdir_input_set_hdrs(enum ice_fltr_ptype flow, struct ice_flow_seg_info *seg)
                ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV6 |
                                  ICE_FLOW_SEG_HDR_IPV_OTHER);
                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:
                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:
+       case ICE_FLTR_PTYPE_NONF_IPV4_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);
                break;
-       case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+       case ICE_FLTR_PTYPE_NONF_IPV6_GTPU:
                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:
+       case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH:
                ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
                                  ICE_FLOW_SEG_HDR_GTPU_IP |
                                  ICE_FLOW_SEG_HDR_IPV6 |
@@ -1958,16 +1955,16 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 
        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;
+               flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU;
        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;
+               flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH;
        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;
+               flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU;
        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;
+               flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH;
 
        filter->tunnel_type = tunnel_type;
        filter->input.flow_type = flow_type;