Skip to contentSkip to conversation

ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()

PATCH Applied [email protected] 3 participants 5 messages Oct 22, 2024 – Oct 24, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()

From: Lewis Donzis <[email protected]>

Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -5
index ab37c37469..008760e315 100644
@@ -4314,11 +4314,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
 		wait = 0;
 
-/* BSD has no interrupt mechanism, so force NIC status synchronization. */
-#ifdef RTE_EXEC_ENV_FREEBSD
-	wait = 1;
-#endif
-
 	if (vf)
 		diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait);
 	else
Signature · 1 line
2.46.2
#1 lore raw
Quoted 5 lines · On Tue, 22 Oct 2024 09:42:05 -0500 [email protected] wrote:

From: Lewis Donzis <[email protected]>

Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.

A little concerned that original patch was trying to address a problem.

Fixes 0012111a3d87 ("net/ixgbe: fix link status synchronization on BSD")
#2 lore raw
Quoted 5 lines · ----- On Oct 22, 2024, at 10:34 AM, Stephen Hemminger…
Quoted 2 lines · On Tue, 22 Oct 2024 09:42:05 -0500 [email protected] wrote:

From: Lewis Donzis <[email protected]>

Quoted 8 lines
Quoted 4 lines

Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.

A little concerned that original patch was trying to address a problem.

Fixes 0012111a3d87 ("net/ixgbe: fix link status synchronization on BSD")

Yeah, I was concerned, too, but the fix causes a call to "give me link status immediately without waiting" to wait, and worse, it waits a really long time for the link to be "up". So it pretty fundamentally breaks operation on FreeBSD.

I was worried it would wouldn't work properly with that change removed, but empirically, it appears to work correctly. It seems like the presumption was that, because FreeBSD doesn't support interrupts, it wouldn't be able to get link status, but it does properly interrogate the hardware and provide the correct link status.

Perhaps Zhihong Peng could comment on why this was done?

Acked-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 5 lines · On Tue, 22 Oct 2024 09:42:05 -0500 [email protected] wrote:

From: Lewis Donzis <[email protected]>

Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.

Looks correct, driver seems to be trying to work around slow SFP link detection.

#4 lore raw
Quoted 5 lines · Stephen Hemminger
Quoted 2 lines · On Tue, 22 Oct 2024 09:42:05 -0500 [email protected] wrote:

From: Lewis Donzis <[email protected]>

Quoted 7 lines
Quoted 3 lines

Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.

Looks correct, driver seems to be trying to work around slow SFP link detection.

Applied to dpdk-next-net-intel

Thanks,
/Bruce