All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit()
@ 2022-05-12  2:44 Glenn Washburn
  2022-05-17 14:51 ` Daniel Kiper
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2022-05-12  2:44 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn

The commit 848724273e4 (net/net: Avoid unnecessary calls to
grub_net_tcp_retransmit()) needs to have its condition inverted to avoid
unnecessary calls to grub_net_tcp_retransmit(). As it is, it creates many
unnecessary calls and does not call grub_net_tcp_retransmit() when needed.
The call to grub_net_tcp_retransmit() should only be made when
grub_net_cards does _not_ equal NULL, meaning that there are potentially
network cards that need tcp retransmission.

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 grub-core/net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 88ea49fee..2b6771523 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1634,7 +1634,7 @@ grub_net_poll_cards_idle_real (void)
 	|| ctime >= card->last_poll + card->idle_poll_delay_ms)
       receive_packets (card, 0);
   }
-  if (grub_net_cards == NULL)
+  if (grub_net_cards != NULL)
     grub_net_tcp_retransmit ();
 }
 
-- 
2.34.1



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

* Re: [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit()
  2022-05-12  2:44 [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit() Glenn Washburn
@ 2022-05-17 14:51 ` Daniel Kiper
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2022-05-17 14:51 UTC (permalink / raw)
  To: Glenn Washburn; +Cc: grub-devel

On Wed, May 11, 2022 at 09:44:01PM -0500, Glenn Washburn wrote:
> The commit 848724273e4 (net/net: Avoid unnecessary calls to
> grub_net_tcp_retransmit()) needs to have its condition inverted to avoid
> unnecessary calls to grub_net_tcp_retransmit(). As it is, it creates many
> unnecessary calls and does not call grub_net_tcp_retransmit() when needed.
> The call to grub_net_tcp_retransmit() should only be made when
> grub_net_cards does _not_ equal NULL, meaning that there are potentially
> network cards that need tcp retransmission.
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel


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

end of thread, other threads:[~2022-05-17 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12  2:44 [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit() Glenn Washburn
2022-05-17 14:51 ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.