[11/16] net/ice/base: group case statements

Message ID 20200330114538.43275-12-qi.z.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series ice share code update |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Qi Zhang March 30, 2020, 11:45 a.m. UTC
  ICE_BLK_FD and ICE_BLK_RSS are executing the same code so group the case
statements together instead of duplicating code for each block.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
  

Patch

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 466fa83d6..c369aae84 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1161,10 +1161,8 @@  ice_flow_proc_segs(struct ice_hw *hw, struct ice_flow_prof_params *params)
 		return status;
 
 	switch (params->blk) {
+	case ICE_BLK_FD:
 	case ICE_BLK_RSS:
-		/* Only header information is provided for RSS configuration.
-		 * No further processing is needed.
-		 */
 		status = ICE_SUCCESS;
 		break;
 	case ICE_BLK_ACL:
@@ -1175,9 +1173,6 @@  ice_flow_proc_segs(struct ice_hw *hw, struct ice_flow_prof_params *params)
 		if (status)
 			return status;
 		break;
-	case ICE_BLK_FD:
-		status = ICE_SUCCESS;
-		break;
 	case ICE_BLK_SW:
 	default:
 		return ICE_ERR_NOT_IMPL;
@@ -2696,8 +2691,8 @@  ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
 	e->priority = prio;
 
 	switch (blk) {
+	case ICE_BLK_FD:
 	case ICE_BLK_RSS:
-		/* RSS will add only one entry per VSI per profile */
 		break;
 	case ICE_BLK_ACL:
 		/* ACL will handle the entry management */
@@ -2711,8 +2706,6 @@  ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
 			goto out;
 
 		break;
-	case ICE_BLK_FD:
-		break;
 	case ICE_BLK_SW:
 	case ICE_BLK_PE:
 	default: