git: e4b9ac53e3ae - stable/13 - ixgbe: improve Atom C3000 SWFW semaphore acq
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Sep 2024 03:41:43 UTC
The branch stable/13 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=e4b9ac53e3ae3d8c36d8a19e5ed826bcac90faa4
commit e4b9ac53e3ae3d8c36d8a19e5ed826bcac90faa4
Author: Barbara Skobiej <barbara.skobiej@intel.com>
AuthorDate: 2024-09-20 03:29:36 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-27 03:40:32 +0000
ixgbe: improve Atom C3000 SWFW semaphore acq
DPDK commit message
net/ixgbe/base: improve SWFW semaphore acquisition
HWSW semaphore acquisition in Atom C3000 NIC is a two stage process.
Each time two semaphore acquisitions are required. Each second semaphore
failure requires re-acquisition of first semaphore. This patch decouples
the two acquisitions preventing potentially hundreds of thousands
of unnecessary loop iterations.
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Obtained from: DPDK (99f960c)
(cherry picked from commit cc9944183187308a71489651b11342d293aac7d1)
---
sys/dev/ixgbe/ixgbe_x550.c | 41 ++++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c
index 275a3ff8c808..2c9ead8fd247 100644
--- a/sys/dev/ixgbe/ixgbe_x550.c
+++ b/sys/dev/ixgbe/ixgbe_x550.c
@@ -4242,36 +4242,39 @@ static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask)
DEBUGFUNC("ixgbe_acquire_swfw_sync_X550a");
- while (--retries) {
- status = IXGBE_SUCCESS;
- if (hmask)
- status = ixgbe_acquire_swfw_sync_X540(hw, hmask);
- if (status) {
- DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n",
- status);
- return status;
- }
- if (!(mask & IXGBE_GSSR_TOKEN_SM))
- return IXGBE_SUCCESS;
+ status = IXGBE_SUCCESS;
+ if (hmask)
+ status = ixgbe_acquire_swfw_sync_X540(hw, hmask);
+
+ if (status) {
+ DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n", status);
+ return status;
+ }
+
+ if (!(mask & IXGBE_GSSR_TOKEN_SM))
+ return IXGBE_SUCCESS;
+ while (--retries) {
status = ixgbe_get_phy_token(hw);
- if (status == IXGBE_ERR_TOKEN_RETRY)
- DEBUGOUT1("Could not acquire PHY token, Status = %d\n",
- status);
if (status == IXGBE_SUCCESS)
return IXGBE_SUCCESS;
- if (hmask)
- ixgbe_release_swfw_sync_X540(hw, hmask);
-
if (status != IXGBE_ERR_TOKEN_RETRY) {
- DEBUGOUT1("Unable to retry acquiring the PHY token, Status = %d\n",
- status);
+ DEBUGOUT1("Retry acquiring the PHY token failed, Status = %d\n", status);
+ if (hmask)
+ ixgbe_release_swfw_sync_X540(hw, hmask);
return status;
}
+
+ if (status == IXGBE_ERR_TOKEN_RETRY)
+ DEBUGOUT1("Could not acquire PHY token, Status = %d\n",
+ status);
}
+ if (hmask)
+ ixgbe_release_swfw_sync_X540(hw, hmask);
+
DEBUGOUT1("Semaphore acquisition retries failed!: PHY ID = 0x%08X\n",
hw->phy.id);
return status;