[v1] net/ice: remove the redundant function type

Message ID 20210329045626.461621-1-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/ice: remove the redundant function type |

Checks

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

Commit Message

Wang, Haiyue March 29, 2021, 4:56 a.m. UTC
  The function 'ice_is_profile_rule' is defined as 'ice_is_prof_rule' in
base code, which has the exactly same function body.

So remove the 'ice_is_profile_rule', use the 'ice_is_prof_rule' instead.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)
  

Comments

Qi Zhang March 29, 2021, 9:51 a.m. UTC | #1
> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Monday, March 29, 2021 12:56 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> Subject: [PATCH v1] net/ice: remove the redundant function type
> 
> The function 'ice_is_profile_rule' is defined as 'ice_is_prof_rule' in base code,
> which has the exactly same function body.
> 
> So remove the 'ice_is_profile_rule', use the 'ice_is_prof_rule' instead.
> 
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index bc7771abd5..0bf3660677 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1534,26 +1534,6 @@  ice_switch_check_action(const struct rte_flow_action *actions,
 	return 0;
 }
 
-static bool
-ice_is_profile_rule(enum ice_sw_tunnel_type tun_type)
-{
-	switch (tun_type) {
-	case ICE_SW_TUN_PROFID_IPV6_ESP:
-	case ICE_SW_TUN_PROFID_IPV6_AH:
-	case ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3:
-	case ICE_SW_TUN_PROFID_IPV6_NAT_T:
-	case ICE_SW_TUN_PROFID_IPV4_PFCP_NODE:
-	case ICE_SW_TUN_PROFID_IPV4_PFCP_SESSION:
-	case ICE_SW_TUN_PROFID_IPV6_PFCP_NODE:
-	case ICE_SW_TUN_PROFID_IPV6_PFCP_SESSION:
-		return true;
-	default:
-		break;
-	}
-
-	return false;
-}
-
 static int
 ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		struct ice_pattern_match_item *array,
@@ -1633,7 +1613,7 @@  ice_switch_parse_pattern_action(struct ice_adapter *ad,
 
 	inputset = ice_switch_inset_get
 		(pattern, error, list, &lkups_num, &tun_type);
-	if ((!inputset && !ice_is_profile_rule(tun_type)) ||
+	if ((!inputset && !ice_is_prof_rule(tun_type)) ||
 		(inputset & ~pattern_match_item->input_set_mask_o)) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ITEM_SPEC,