From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 137E8A057B; Mon, 30 Mar 2020 13:43:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 93CCE1C0D4; Mon, 30 Mar 2020 13:42:33 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5E2AD1C0C5 for ; Mon, 30 Mar 2020 13:42:30 +0200 (CEST) IronPort-SDR: U1K4O3pCmbFKS02OWeBOh/bKKHP40rtBEmX4N5aAnRw2pNNoQzg0q8HwwPo1HodmAALTR/tWnH nTaivD1dSgNw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 04:42:30 -0700 IronPort-SDR: yOtR01pWbTMgvGc4eGZ50iQgveHmwxfAaqVIX1pPqJdDzYgT/q7bU7hBoiuFWE9gMMajtOjLij nTSKiWX4skbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,324,1580803200"; d="scan'208";a="449769898" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by fmsmga006.fm.intel.com with ESMTP; 30 Mar 2020 04:42:28 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang , Tony Nguyen , Paul M Stillwell Jr Date: Mon, 30 Mar 2020 19:45:33 +0800 Message-Id: <20200330114538.43275-12-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200330114538.43275-1-qi.z.zhang@intel.com> References: <20200330114538.43275-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 11/16] net/ice/base: group case statements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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: -- 2.13.6