From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 415D242AF1; Thu, 18 May 2023 17:36:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99D1F42DA9; Thu, 18 May 2023 17:34:46 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5DD9242D88 for ; Thu, 18 May 2023 17:34:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684424084; x=1715960084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jFULjqhPqwdGRx+31NdQzWwIG9/wnMemQCl30O4O0MI=; b=djpUlar2Gzhmz7pJbiPFO0CsYULaJ7+5Cip3m1GVXSMG4M26O5pmR14n sIJSk1fTymgegxeXm/hPB+blRLvXXg7lMfpw3sjFxFKtCkny5aBkxTE7I kLF50CiCUymnDHUVvmo67NCk1BkkxA/tuT377FiCBUHgr4E6sBVm5vUoL PIMB19WaYuUpAiPMGLcJ3HsbO0gw8d9H8Z7j1lb+7gIZEoY5cSQEC5MG3 PXnw5I8ajTIFGFhOxnjEv3fQI9PS2gDgVGWodDlSNQTFzYgybuRmBx2I6 ZEWv0nJ59ALY7+nZAMpqlQdLlGirNcGi09hYCNKoZdSYu4qL6muKOuqr3 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="341527769" X-IronPort-AV: E=Sophos;i="5.99,285,1677571200"; d="scan'208";a="341527769" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2023 08:34:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705235214" X-IronPort-AV: E=Sophos;i="5.99,285,1677571200"; d="scan'208";a="705235214" Received: from dpdk-qiming3.sh.intel.com ([10.67.111.4]) by fmsmga007.fm.intel.com with ESMTP; 18 May 2023 08:34:42 -0700 From: Qiming Yang To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Qiming Yang , Marcin Szycik Subject: [PATCH v2 16/20] net/ice/base: delete get field vector function Date: Thu, 18 May 2023 15:16:34 +0000 Message-Id: <20230518151638.1207021-17-qiming.yang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230518151638.1207021-1-qiming.yang@intel.com> References: <20230427062001.478032-1-qiming.yang@intel.com> <20230518151638.1207021-1-qiming.yang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently ice_get_fv() is only used inside ice_get_sw_fv_list(). Remove ice_get_fv() and call ice_get_sw_fv_list() directly. Signed-off-by: Marcin Szycik Signed-off-by: Qiming Yang --- drivers/net/ice/base/ice_ddp.c | 3 +++ drivers/net/ice/base/ice_switch.c | 23 ++--------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index 3e18f2bc70..d88c417faf 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -1579,6 +1579,9 @@ ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, struct ice_fv *fv; u32 offset; + if (!lkups->n_val_words) + return ICE_SUCCESS; + ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM); if (!lkups->n_val_words || !hw->seg) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 06665a29db..1f391002b8 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7733,25 +7733,6 @@ ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm, return status; } -/** - * ice_get_fv - get field vectors/extraction sequences for spec. lookup types - * @hw: pointer to hardware structure - * @lkups: lookup elements or match criteria for the advanced recipe, one - * structure per protocol header - * @bm: bitmap of field vectors to consider - * @fv_list: pointer to a list that holds the returned field vectors - */ -static enum ice_status -ice_get_fv(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, - ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list) -{ - if (!lkups->n_val_words) - return ICE_SUCCESS; - - /* Find field vectors that include all specified protocol types */ - return ice_get_sw_fv_list(hw, lkups, bm, fv_list); -} - /** * ice_tun_type_match_word - determine if tun type needs a match mask * @rinfo: other information regarding the rule e.g. priority and action info @@ -8159,11 +8140,11 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, /* Get bitmap of field vectors (profiles) that are compatible with the * rule request; only these will be searched in the subsequent call to - * ice_get_fv. + * ice_get_sw_fv_list. */ ice_get_compat_fv_bitmap(hw, rinfo, fv_bitmap); - status = ice_get_fv(hw, lkup_exts, fv_bitmap, &rm->fv_list); + status = ice_get_sw_fv_list(hw, lkup_exts, fv_bitmap, &rm->fv_list); if (status) goto err_unroll; -- 2.25.1