[PATCH v2 035/148] net/ice/base: move lock outside of if-else
Anatoly Burakov
anatoly.burakov at intel.com
Wed Jun 12 17:00:29 CEST 2024
From: Ian Stokes <ian.stokes at intel.com>
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 <jesse.brandeburg at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
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
More information about the dev
mailing list