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 E52D8A2EDB for ; Sat, 7 Sep 2019 05:15:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D9431F4ED; Sat, 7 Sep 2019 05:14:26 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A6E951F48E for ; Sat, 7 Sep 2019 05:14:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2019 20:14:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,474,1559545200"; d="scan'208";a="191006859" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by FMSMGA003.fm.intel.com with ESMTP; 06 Sep 2019 20:14:05 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, xiaolong.ye@intel.com, Qi Zhang , Dan Nowlin , Paul M Stillwell Jr Date: Sat, 7 Sep 2019 11:16:18 +0800 Message-Id: <20190907031629.34666-12-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190907031629.34666-1-qi.z.zhang@intel.com> References: <20190902035551.16852-1-qi.z.zhang@intel.com> <20190907031629.34666-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 11/22] net/ice/base: associate switch recipe to profiles 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" Properly associate switch recipes to profiles. Previous code was using the wrong bitfield for updating the associations, which was causing other PFs to not properly identify and use existing recipes. This sometimes resulted in rules not being added when it should have been possible. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index aab0ff07f..9e7e93af5 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5581,14 +5581,14 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, if (status) goto err_unroll; - ice_or_bitmap(rm->r_bitmap, r_bitmap, rm->r_bitmap, + ice_or_bitmap(r_bitmap, r_bitmap, rm->r_bitmap, ICE_MAX_NUM_RECIPES); status = ice_acquire_change_lock(hw, ICE_RES_WRITE); if (status) goto err_unroll; status = ice_aq_map_recipe_to_profile(hw, fvit->profile_id, - (u8 *)rm->r_bitmap, + (u8 *)r_bitmap, NULL); ice_release_change_lock(hw); @@ -5596,12 +5596,12 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, goto err_unroll; /* Update profile to recipe bitmap array */ - ice_memcpy(profile_to_recipe[fvit->profile_id], rm->r_bitmap, - sizeof(rm->r_bitmap), ICE_NONDMA_TO_NONDMA); + ice_memcpy(profile_to_recipe[fvit->profile_id], r_bitmap, + sizeof(r_bitmap), ICE_NONDMA_TO_NONDMA); /* Update recipe to profile bitmap array */ for (j = 0; j < ICE_MAX_NUM_RECIPES; j++) - if (ice_is_bit_set(rm->r_bitmap, j)) + if (ice_is_bit_set(r_bitmap, j)) ice_set_bit((u16)fvit->profile_id, recipe_to_profile[j]); } -- 2.13.6