From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W5WUd-0000Ef-M3 for mharc-grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5WUT-0008WL-Es for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5WUK-0006yD-AC for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:21 -0500 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]:55279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5WUJ-0006xz-Sy for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:12 -0500 Received: by mail-ea0-f172.google.com with SMTP id g15so2987596eak.17 for ; Tue, 21 Jan 2014 00:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=wjfqIa/cF8iD+zYU97PtnxcvcPm3IOvq3sdiSGntIUk=; b=STE1Q1Uij6LKS4C0dde9aZ8iTv4bGx5SftFWgvcn30TZYLz2BQylSrfIonQS1VxOej tT2AhCV5ZqlARpMhRr9osIeKamzYVufcp7CQFAicR3n1lWz597GPyzR7EZQn12xVwjXE 21nxWf+HFj9fANER5CLolxhvieYVSneVT7akmMBg4eUJdCiP9o4axGm9w+bL6oynhpLj r5N45c3G66AKGTO9VrExH2feXeLmY1PK834d86BLaRWQjFx+/njFpotGq+IzpU+KmXap JSBuuyVC9mp0eY3FTcZx6GYfVJ0GzHbnFR2Wn9DbPmUQMb5f0rWxbssDSKrjjUtLQ0vc WxYw== X-Received: by 10.14.87.195 with SMTP id y43mr22026192eee.32.1390292111197; Tue, 21 Jan 2014 00:15:11 -0800 (PST) Received: from [192.168.42.236] (83-224.197-178.cust.bluewin.ch. [178.197.224.83]) by mx.google.com with ESMTPSA id n7sm11954436eef.5.2014.01.21.00.15.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 00:15:10 -0800 (PST) Message-ID: <52DE2084.6090405@gmail.com> Date: Tue, 21 Jan 2014 08:23:48 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.2.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH] increase network try interval gradually References: <20140120192907.GA18265@beren.lan> In-Reply-To: <20140120192907.GA18265@beren.lan> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W7tT0ugTihOiQsKfo19K3vUTSAuMxHemd" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22c 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: Tue, 21 Jan 2014 08:15:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --W7tT0ugTihOiQsKfo19K3vUTSAuMxHemd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Go ahead for trunk. On 20.01.2014 20:29, Paulo Flabiano Smorigo wrote: > Hi all, >=20 > This patch changes GRUB net interval gradually over time to avoid timeo= ut > problems. I'm currently doing tests in a network with heavy traffic. In= this > network GRUB fails with the original timeout value. >=20 > --- > grub-core/net/arp.c | 3 ++- > grub-core/net/icmp6.c | 3 ++- > grub-core/net/net.c | 5 +++-- > grub-core/net/tftp.c | 3 ++- > include/grub/net.h | 1 + > 5 files changed, 10 insertions(+), 5 deletions(-) >=20 > diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c > index 3076b18..248bd4b 100644 > --- a/grub-core/net/arp.c > +++ b/grub-core/net/arp.c > @@ -110,7 +110,8 @@ grub_net_arp_send_request (struct grub_net_network_= level_interface *inf, > return GRUB_ERR_NONE; > pending_req =3D proto_addr->ipv4; > have_pending =3D 0; > - grub_net_poll_cards (GRUB_NET_INTERVAL, &have_pending); > + grub_net_poll_cards (GRUB_NET_INTERVAL + (i * GRUB_NET_INTERVAL_= ADDITION), > + &have_pending); > if (grub_net_link_layer_resolve_check (inf, proto_addr)) > return GRUB_ERR_NONE; > nb.data =3D nbd; > diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c > index 2741e6f..bbc9020 100644 > --- a/grub-core/net/icmp6.c > +++ b/grub-core/net/icmp6.c > @@ -518,7 +518,8 @@ grub_net_icmp6_send_request (struct grub_net_networ= k_level_interface *inf, > { > if (grub_net_link_layer_resolve_check (inf, proto_addr)) > break; > - grub_net_poll_cards (GRUB_NET_INTERVAL, 0); > + grub_net_poll_cards (GRUB_NET_INTERVAL + (i * GRUB_NET_INTERVAL_= ADDITION), > + 0); > if (grub_net_link_layer_resolve_check (inf, proto_addr)) > break; > nb->data =3D nbd; > diff --git a/grub-core/net/net.c b/grub-core/net/net.c > index 8f9d183..683ab28 100644 > --- a/grub-core/net/net.c > +++ b/grub-core/net/net.c > @@ -1596,8 +1596,9 @@ grub_net_fs_read_real (grub_file_t file, char *bu= f, grub_size_t len) > if (!net->eof) > { > try++; > - grub_net_poll_cards (GRUB_NET_INTERVAL, &net->stall); > - } > + grub_net_poll_cards (GRUB_NET_INTERVAL + > + (try * GRUB_NET_INTERVAL_ADDITION), &ne= t->stall); > + } > else > return total; > } > diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c > index 9c489f1..5173614 100644 > --- a/grub-core/net/tftp.c > +++ b/grub-core/net/tftp.c > @@ -398,7 +398,8 @@ tftp_open (struct grub_file *file, const char *file= name) > destroy_pq (data); > return err; > } > - grub_net_poll_cards (GRUB_NET_INTERVAL, &data->have_oack); > + grub_net_poll_cards (GRUB_NET_INTERVAL + (i * GRUB_NET_INTERVAL_= ADDITION), > + &data->have_oack); > if (data->have_oack) > break; > } > diff --git a/include/grub/net.h b/include/grub/net.h > index 843f74f..538baa3 100644 > --- a/include/grub/net.h > +++ b/include/grub/net.h > @@ -536,5 +536,6 @@ extern char *grub_net_default_server; > =20 > #define GRUB_NET_TRIES 40 > #define GRUB_NET_INTERVAL 400 > +#define GRUB_NET_INTERVAL_ADDITION 20 > =20 > #endif /* ! GRUB_NET_HEADER */ >=20 --W7tT0ugTihOiQsKfo19K3vUTSAuMxHemd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlLeIIQACgkQmBXlbbo5nOvi5QD+P04KXflSu74gKaklFhiL2mCP KpTpp/S9WOH51uYXwT8BAITLHkN56LFrD2XhwBH3lTKslZoM6k5yTCLp+Xvh8mez =KXx7 -----END PGP SIGNATURE----- --W7tT0ugTihOiQsKfo19K3vUTSAuMxHemd--