From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W5Kqj-0002rk-3T for mharc-grub-devel@gnu.org; Mon, 20 Jan 2014 14:49:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5KqZ-0002qk-6a for grub-devel@gnu.org; Mon, 20 Jan 2014 14:49:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5KqQ-00024Q-9v for grub-devel@gnu.org; Mon, 20 Jan 2014 14:49:23 -0500 Received: from e24smtp01.br.ibm.com ([32.104.18.85]:54130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5KqP-00024H-T1 for grub-devel@gnu.org; Mon, 20 Jan 2014 14:49:14 -0500 Received: from /spool/local by e24smtp01.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jan 2014 17:49:11 -0200 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp01.br.ibm.com (10.172.0.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 20 Jan 2014 17:49:10 -0200 Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id B025C1DC005D for ; Mon, 20 Jan 2014 14:49:09 -0500 (EST) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay02.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0KJmYC436831302 for ; Mon, 20 Jan 2014 17:48:35 -0200 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0KJn7LZ021564 for ; Mon, 20 Jan 2014 14:49:07 -0500 Received: from beren.lan ([9.78.137.63]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s0KJmJuP019785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 20 Jan 2014 14:48:45 -0500 Date: Mon, 20 Jan 2014 17:48:02 -0200 From: Paulo Flabiano Smorigo To: grub-devel@gnu.org Subject: [PATCH] add a exit condition even for no stop case Message-ID: <20140120194615.GB18265@beren.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/null+5621 (d3096e8796e7) (2012-12-30) X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14012019-1524-0000-0000-000008947E4B X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.104.18.85 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2014 19:49:32 -0000 Hi all, As I said in the my last email, I'm running tests in a network with heavy traffic, like, over 150 arp requests comming every second. Under these condition, I found an issue in the receive_packets function. On line 1456 of net/net.c there is a while (1) that only exits if there is a stop condition and more then 10 packages or if there is no package received. If GRUB is idle and enter in this loop, the only condition to leave is if it doesn't have incoming packages. In a network with heavy traffic (like mine) this never happens. The result is that GRUB becomes muted and freeze. I made a small fix that exits this loop if the incoming packages rearch a maximum level. I used 100 packages and it seems fine. --- 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 683ab28..f2e723b 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -1453,7 +1453,7 @@ receive_packets (struct grub_net_card *card, int *stop_condition) } card->opened = 1; } - while (1) + while (received < 100) { /* Maybe should be better have a fixed number of packets for each card and just mark them as used and not used. */ -- 1.8.2.1 -- Paulo Flabiano Smorigo IBM Linux Technology Center