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 97F0745500; Wed, 26 Jun 2024 13:55:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4108843281; Wed, 26 Jun 2024 13:55:07 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 09C2D42E95 for ; Wed, 26 Jun 2024 13:43:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402197; x=1750938197; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y6oZyyujMq4aut8BML4L0DuC3euMUazfzoqHlMbcfXI=; b=jeSgFavWbgibfZhdILrBFxI7wfIIygTFLDm+ESGs37gMCBWCGOuCR5iA /4Aq/NZipV27FSHOu6bdgmwH/Ood7lgpzyU0ODO/un+Gr8ona7vbHLxEj U3ahR6r4Vy92n6fJI5QGMVLxjHcV1djvVVhsiSclXUDCH/DvKiNLZ1Jp3 K90yjRE1uYSsXAzai0AOlJO0Ly74bm/uAFYP2iEq0958PuTTTT1X4PhS/ 3Gox/HHs9m3wrk7gdsSnumbliTyIofAhRfJor8YaUqN0SfLvne4HGCora IDeADTPqPcRtYedJH5ODWXkArwvLpkfCw54zqWrg6m2MLJFOvvo4+yePY Q==; X-CSE-ConnectionGUID: 5VUqfYyXT9uSZQIdJjk3Cg== X-CSE-MsgGUID: e29My8ZNTkyiYH8gUSHVGg== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979299" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979299" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:43:16 -0700 X-CSE-ConnectionGUID: hjZrhBAHTgibYad764p/vw== X-CSE-MsgGUID: FUCrkyEIQ+e0fY6A3IfRCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873467" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:43:15 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Jesse Brandeburg , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 010/103] net/ice/base: move lock outside of if-else Date: Wed, 26 Jun 2024 12:40:58 +0100 Message-ID: <7f86aef3b28de2c5beaa809cf2d6a6df63b3dc23.1719401847.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 From: Jesse Brandeburg When previous version of driver snapshot was generated, there was a "fix" applied to it that moved the lock inside the if-else block. This change was made in error and was later reverted in the base driver, so adjust accordingly. Signed-off-by: Jesse Brandeburg Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_flow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 3a34771f21..8473c2b964 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -4387,13 +4387,11 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, cfg->hash_flds == ICE_HASH_INVALID) return ICE_ERR_PARAM; + ice_acquire_lock(&hw->rss_locks); local_cfg = *cfg; if (cfg->hdr_type < ICE_RSS_ANY_HEADERS) { - ice_acquire_lock(&hw->rss_locks); status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); - ice_release_lock(&hw->rss_locks); } else { - ice_acquire_lock(&hw->rss_locks); local_cfg.hdr_type = ICE_RSS_OUTER_HEADERS; status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); if (!status) { @@ -4401,8 +4399,8 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, status = ice_add_rss_cfg_sync(hw, vsi_handle, &local_cfg); } - ice_release_lock(&hw->rss_locks); } + ice_release_lock(&hw->rss_locks); return status; } -- 2.43.0