From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1noyoU-0003RK-QP for mharc-grub-devel@gnu.org; Wed, 11 May 2022 22:44:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noyoT-0003RA-7l for grub-devel@gnu.org; Wed, 11 May 2022 22:44:25 -0400 Received: from mail-vk1-xa31.google.com ([2607:f8b0:4864:20::a31]:37640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noyoR-0006UX-8q for grub-devel@gnu.org; Wed, 11 May 2022 22:44:24 -0400 Received: by mail-vk1-xa31.google.com with SMTP id j14so2035108vkp.4 for ; Wed, 11 May 2022 19:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QMOF+QdtKMN2rQT+SwfzBoih7LqOsMunO+n2w+yWbRE=; b=VPofqWqQ1oZiSnoiGaHeXWvDCpPCQ5Al2oBufyuWamISoXM04kDWQS1+uIlIJsiPQV hGmXijUF0Q5MLFRwhUO/hdkWJdRyL0w9B9FcCosHGQV/RlSKlmIciXXEX/7odo21wjGJ CV/TIt8QuIzo0tuwgUuF68R2FuY7b5Y635nosL87qnON4JKXkcJdFW5JRnsjUrr4Sytv 7ypgUoi226s6Zlb0W7Jey89hl4Ouk+A3kJ3w2hyrqspz6Z0tBoYBCu+6stkR9Jdd4us0 su8P0NI68MODt0gn7NLKlEHOZ8r7AwXAcGZEwnG4KkS1xHFmxnxiK3bZwVpqVHvuv/UB jQUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QMOF+QdtKMN2rQT+SwfzBoih7LqOsMunO+n2w+yWbRE=; b=ICJds1elGRzBY0oABKQkSdfy8OCwhcO9atXSBA2SUiZyyvngVQKlTRN3tByRx0bNpH sWVD+tQXNN+wY6v7k8dYY4qeUBJRQS2Pv6tMQanU4ErhC3jCiKm1BD6LL5Ojlf2VMHqs eamTxaWjkIwGQ0DF4akHmpYZ6IlgR24WvFqPjZRABEYOmUXe2fkNiS3oHEHCtYbeGI1A ad13FVhw+h8SRRN3bhamcxyAni76l0dLCGiLP/ZGloqyoheaPn8wFeQtm9aigCBZvbI8 9aBBOxwgIu7DAfw1pzk/L3HXSheJyLgsi8bq4JtVB2xsEujfvgiKIj1vGzxKLtNWU7Ee EeFg== X-Gm-Message-State: AOAM530GEYoctubqMBeG6dDwS0fl2U97jLAGCaQsCx9M6cMO5hkUV426 vH9O9OY7geiKw9XjLy9hBgcuj8eAZffJJYY7 X-Google-Smtp-Source: ABdhPJzf2czCG2CFAZuu7mazwG3h7QmP9ZcXQjE/3Ra+kHSz2uckvSDgr71/oyOKrEsUyx3tuF1+hg== X-Received: by 2002:a1f:dd43:0:b0:352:21e5:782d with SMTP id u64-20020a1fdd43000000b0035221e5782dmr15234673vkg.15.1652323461662; Wed, 11 May 2022 19:44:21 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.249]) by smtp.gmail.com with ESMTPSA id p15-20020ab0548f000000b003626f894dddsm497256uaa.11.2022.05.11.19.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 19:44:21 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH] net: Fix incorrect condition for calling grub_net_tcp_retransmit() Date: Wed, 11 May 2022 21:44:01 -0500 Message-Id: <20220512024401.3206077-1-development@efficientek.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::a31; envelope-from=development@efficientek.com; helo=mail-vk1-xa31.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 02:44:25 -0000 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 --- 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