diff mbox series

[v3,6/6] net/ice: clean GTPU flow_type for FDIR

Message ID 20210302025407.1197434-7-zhirun.yan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series Refactor FDIR pattern parser | expand

Checks

Context Check Description
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/travis-robot fail travis build: failed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhirun Yan March 2, 2021, 2:54 a.m. UTC
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>
---
 drivers/net/ice/ice_fdir_filter.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 72836fca6c..3af5812660 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -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;