All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <dkiper@net-space.pl>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit()
Date: Wed, 11 May 2022 21:44:01 -0500	[thread overview]
Message-ID: <20220512024401.3206077-1-development@efficientek.com> (raw)

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



             reply	other threads:[~2022-05-12  2:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  2:44 Glenn Washburn [this message]
2022-05-17 14:51 ` [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit() Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512024401.3206077-1-development@efficientek.com \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.