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 AA1C74404F; Wed, 12 Jun 2024 17:10:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60A92427CB; Wed, 12 Jun 2024 17:04:24 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 227F740E39 for ; Wed, 12 Jun 2024 17:04:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204661; x=1749740661; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hn2X7duprCfqteOwlhZbY1u9dLKafB52Ab9KDOcS0UY=; b=iPAxZs3WYp8itoQ3F89mALRFjXUW63/ugnCZ4KVa4PDT+39aNAOlw9PC kl18yV6dcv5+4w3pegOG6vLyc9dq6Fr9K565TyC7cJl6ZUAUMD0SIE4iL yIenKQOcGRGSn6mKs7U/o2ZLfqikyKlGFtFCWPUqF0DKakZ7jKFI5WnqW FPdCxQ5FhnpX/lg/eVHS1Xpa29MK6F8JTrwSnEiD96/Kk/pV86Ie26yys 1fxsR5k3gxiTNK77/+jVynRYmO6L9+KlfUB6d/57FoLbdvqgE/K5aX9JF e+QUsK0YgRkSHt5iNV3myZN634WJTfURxACbS/EvFZ813nM+brpge38mi w==; X-CSE-ConnectionGUID: qXcYU5ZjRfasRUEgDgEtcQ== X-CSE-MsgGUID: wQmyMoPmS0CFrgfnz+UpOg== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459347" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459347" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:04:15 -0700 X-CSE-ConnectionGUID: OkLZPBMGSQOr9nJrHduN7g== X-CSE-MsgGUID: sqyhV9ePTJOdyItCJpN02Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925087" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:04:14 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Jesse Brandeburg Subject: [PATCH v2 035/148] net/ice/base: move lock outside of if-else Date: Wed, 12 Jun 2024 16:00:29 +0100 Message-ID: <2a30dbf1e04982fa6b55d32b686f647ab3fa3d2f.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@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 From: Ian Stokes When current 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 upstream driver, so adjust DPDK driver 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