From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] add a exit condition even for no stop case
Date: Tue, 21 Jan 2014 08:24:19 +0100 [thread overview]
Message-ID: <52DE20A3.7050909@gmail.com> (raw)
In-Reply-To: <20140120194615.GB18265@beren.lan>
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
Go ahead for trunk
On 20.01.2014 20:48, Paulo Flabiano Smorigo wrote:
> 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. */
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
prev parent reply other threads:[~2014-01-21 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 19:48 [PATCH] add a exit condition even for no stop case Paulo Flabiano Smorigo
2014-01-21 7:24 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
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=52DE20A3.7050909@gmail.com \
--to=phcoder@gmail.com \
--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.