DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()
@ 2024-10-22 14:42 lew
  2024-10-22 15:34 ` Stephen Hemminger
  2024-10-22 16:16 ` Stephen Hemminger
  0 siblings, 2 replies; 5+ messages in thread
From: lew @ 2024-10-22 14:42 UTC (permalink / raw)
  To: dev; +Cc: Lewis Donzis

From: Lewis Donzis <lew@perftech.com>

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

Signed-off-by: Lewis Donzis <lew@perftech.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ab37c37469..008760e315 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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
-- 
2.46.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()
  2024-10-22 14:42 [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share() lew
@ 2024-10-22 15:34 ` Stephen Hemminger
  2024-10-22 15:58   ` Lewis Donzis
  2024-10-22 16:16 ` Stephen Hemminger
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2024-10-22 15:34 UTC (permalink / raw)
  To: lew; +Cc: dev

On Tue, 22 Oct 2024 09:42:05 -0500
lew@perftech.com wrote:

> From: Lewis Donzis <lew@perftech.com>
> 
> Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.
> 
> Signed-off-by: Lewis Donzis <lew@perftech.com>

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()
  2024-10-22 15:34 ` Stephen Hemminger
@ 2024-10-22 15:58   ` Lewis Donzis
  0 siblings, 0 replies; 5+ messages in thread
From: Lewis Donzis @ 2024-10-22 15:58 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev



----- On Oct 22, 2024, at 10:34 AM, Stephen Hemminger stephen@networkplumber.org wrote:

> On Tue, 22 Oct 2024 09:42:05 -0500
> lew@perftech.com wrote:
> 
>> From: Lewis Donzis <lew@perftech.com>
>> 
>> Forcing wait true prevents checking link status without delay, because the
>> function will wait more than 10 seconds for link status to be true.
>> 
>> Signed-off-by: Lewis Donzis <lew@perftech.com>
> 
> 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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()
  2024-10-22 14:42 [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share() lew
  2024-10-22 15:34 ` Stephen Hemminger
@ 2024-10-22 16:16 ` Stephen Hemminger
  2024-10-24 17:00   ` Bruce Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2024-10-22 16:16 UTC (permalink / raw)
  To: lew; +Cc: dev

On Tue, 22 Oct 2024 09:42:05 -0500
lew@perftech.com wrote:

> From: Lewis Donzis <lew@perftech.com>
> 
> Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.
> 
> Signed-off-by: Lewis Donzis <lew@perftech.com>

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

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share()
  2024-10-22 16:16 ` Stephen Hemminger
@ 2024-10-24 17:00   ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2024-10-24 17:00 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: lew, dev

On Tue, Oct 22, 2024 at 09:16:55AM -0700, Stephen Hemminger wrote:
> On Tue, 22 Oct 2024 09:42:05 -0500
> lew@perftech.com wrote:
> 
> > From: Lewis Donzis <lew@perftech.com>
> > 
> > Forcing wait true prevents checking link status without delay, because the function will wait more than 10 seconds for link status to be true.
> > 
> > Signed-off-by: Lewis Donzis <lew@perftech.com>
> 
> Looks correct, driver seems to be trying to work around slow SFP link detection.
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied to dpdk-next-net-intel

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-24 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22 14:42 [PATCH] ixgbe: Removed FreeBSD forcing wait in ixgbe_dev_link_update_share() lew
2024-10-22 15:34 ` Stephen Hemminger
2024-10-22 15:58   ` Lewis Donzis
2024-10-22 16:16 ` Stephen Hemminger
2024-10-24 17:00   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).