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 9ECCE454EF; Tue, 25 Jun 2024 13:19:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0211342E12; Tue, 25 Jun 2024 13:16:32 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 623C042DCD for ; Tue, 25 Jun 2024 13:15:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314149; x=1750850149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y6oZyyujMq4aut8BML4L0DuC3euMUazfzoqHlMbcfXI=; b=kOy7xgawrBaHXJytA5IF/X54Zf0T+fZwJGRDgpy4vy9ClxN+XWzad1/l AsT2P0o/+IljzFZZW5VLPR8MtQf+LWTXFOemHC71gpvf5L9guENEb5/Gu f31iFwP8PHNO6rkCklNuzCBLxWEhetRit/94eX6ANtCIs+tb4mXBeH1OM eGciF1GPjhbpyQbmHwMh31cTIoJ7F+JqPBVWhldsU3GwzO7SYm8Gvlz+d azWXpb7csh5KK92RjcJaIjU2VQ5Z9D8ggGMrPPU+FJGNG9ExZIAWqzP+V iUhAAFp2xHGK+nQpEue7JjlycmK822m6kLnbdMt6SCMVBdyUaedHG1cHS Q==; X-CSE-ConnectionGUID: 2ghu1/O6QDujhocXy4KKrQ== X-CSE-MsgGUID: mFnkTXDhRiqjEEGiOAqW0g== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080138" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080138" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:15:49 -0700 X-CSE-ConnectionGUID: qVaomELvQZyYr5RQr9ZLQw== X-CSE-MsgGUID: KNFdPoawRViaHPH7lI87rw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719072" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:15:48 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Jesse Brandeburg , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 030/129] net/ice/base: move lock outside of if-else Date: Tue, 25 Jun 2024 12:12:35 +0100 Message-ID: <312ff6cae315fbe4af08205bfbba7a9c77557380.1719313663.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