From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: BOOTP retry timeout improvements
Date: Mon, 18 Aug 2014 12:15:33 -0400 [thread overview]
Message-ID: <20140818161533.GL19374@bill-the-cat> (raw)
In-Reply-To: <53F2242A.8060904@wwwdotorg.org>
On Mon, Aug 18, 2014 at 10:04:58AM -0600, Stephen Warren wrote:
> On 08/15/2014 03:39 PM, Thierry Reding wrote:
> >On Fri, Aug 15, 2014 at 10:02:40AM -0600, Stephen Warren wrote:
> ...
> >>Re-transmitting a DHCP request shouldn't prevent a response to the previous
> >>request from being processed - AFAIK each request is idempotent. Can you
> >>debug what is causing the 8s delay? Are earlier responses received and
> >>rejected for some reason, or is your DHCP server getting confused by the
> >>multiple requests and not responding, or ...?
> >
> >I haven't really tested this, but by looking at the code in net/bootp.c
> >(function BootpCheckPkt()) the U-Boot implementation will reject all
> >packets that don't match the BootpID (which is composed of the lower 4
> >bytes of the ethernet address plus the time in milliseconds when the
> >discover packet was sent, see BootpRequest()).
> >
> >So indeed earlier responses will be rejected, which would also explain
> >the 8 second delay since that's about the time it takes for the backoff
> >to reach the timeout that the server requires to reply before the next
> >retransmission.
>
> Ah, that's a problem then, especially given that Thierry mentioned
> that (some) DHCP servers send out an ARP address and wait for any
> responses, to avoid address conflicts.
>
> I suppose we have two options here:
>
> a) Make each of U-Boot's DHCP requests identical, so that responses
> to an earlier request are accepted even if a later request has been
> sent. I don't know what the implications are here; perhaps some dumb
> DHCP server might give out different results for the different
> responses, so we actively don't want to accept the stale data?
>
> b) Revert my patch. Perhaps think about tweaking the initial retry
> time-out later.
>
> (b) seems simplest. Tom, it's f59be6e850b3 "net: BOOTP retry timeout
> improvements". It looks like nothing has touched the same files
> since it was applied, so it should be a simple revert.
I'm leaning this way as well for now and I see some "funny" behavior
sometimes in my setup, but not consistent (but I bet it's this same
thing) and I haven't had time to tcpdump it.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140818/fc44326e/attachment.pgp>
prev parent reply other threads:[~2014-08-18 16:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 23:30 [U-Boot] [PATCH] net: BOOTP retry timeout improvements Stephen Warren
2014-08-06 15:58 ` Stephen Warren
2014-08-06 18:10 ` Tom Rini
2014-08-06 20:03 ` Joe Hershberger
2014-08-10 22:22 ` [U-Boot] " Tom Rini
2014-08-15 12:39 ` [U-Boot] [PATCH] " Thierry Reding
2014-08-15 12:49 ` Thierry Reding
2014-08-15 16:02 ` Stephen Warren
2014-08-15 21:39 ` Thierry Reding
2014-08-15 22:09 ` Thierry Reding
2014-08-18 16:04 ` Stephen Warren
2014-08-18 16:15 ` Tom Rini [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=20140818161533.GL19374@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox