Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Edgar Bonet <bonet@grenoble.cnrs.fr>
Cc: Angelo Compagnucci <angelo@amarulasolutions.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/busybox: speed up DHCP lease acquisition
Date: Sun, 14 Aug 2022 19:49:45 +0200	[thread overview]
Message-ID: <20220814174945.GG2854108@scaer> (raw)
In-Reply-To: <a79265c3-bb87-b896-eb44-a8d96392d220@grenoble.cnrs.fr>

Edgar, All,

On 2022-08-13 22:53 +0200, Edgar Bonet spake thusly:
> Commit c343e01ac4908f76520cf9a405ed87650e78dc62 made udhcpc send a
> single DHCP request (instead of 3) before going to the background, thus
> speeding up the boot process if the DHCP lease is not obtained
> immediately. Unfortunately, this can also slow down the acquisition of
> the lease as, after going to the background, udhcpc waits for 20 seconds
> (instead of 3) before retrying.
> 
> Speed up the lease acquisition by setting the retry timeout to 3
> seconds.
> 
> Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>

I was unsure whether to consider this a fix or a new feature, but I
think we can really consider it a fix for a regresion, so: applied to
master, thanks.

And thanks for the detailed example!

Regards,
Yann E. MORIN.

> ---
> Hello!
> 
> While testing 2022.08-rc1 with acmesystems_acqua_a5_512mb_defconfig on a
> real Acqua board (and Ubuntu 20.04 host), I noticed that my board became
> very slow in getting a DHCP lease, which was a fast process on 2022.05.
> Wireshark showed the following DHCP traffic ("<" = received from the
> board, ">" = sent to the board):
> 
>     time (s)  packet
>     ---------------------
>     03.24 < DHCP Discover
>     06.24 > DHCP Offer
>     26.28 < DHCP Discover
>     26.28 > DHCP Offer
>     26.28 < DHCP Request
>     26.28 > DHCP ACK
> 
> Looking at the log 2022.05..2022.08-rc1, I identified the regression to
> be in commit c343e01ac4908f76520cf9a405ed87650e78dc62. This commit adds
> the option -t1 to the udhcpc command, which makes it go to the
> background after only one try, and has the unfortunate side effect of
> introducing a 20-second delay.
> 
> With this patch applied, the lease is acquired much faster:
> 
>     03.26 < DHCP Discover
>     06.26 > DHCP Offer
>     09.28 < DHCP Discover
>     09.29 > DHCP Offer
>     09.29 < DHCP Request
>     09.29 > DHCP ACK
> 
> Regards,
> 
> Edgar.
> 
>  package/busybox/busybox.config | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
> index 2409cbcce1..137e44c870 100644
> --- a/package/busybox/busybox.config
> +++ b/package/busybox/busybox.config
> @@ -1022,7 +1022,7 @@ CONFIG_UDHCP_DEBUG=0
>  CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
>  CONFIG_FEATURE_UDHCP_RFC3397=y
>  CONFIG_FEATURE_UDHCP_8021Q=y
> -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-t1 -b -R -O search"
> +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-t1 -A3 -b -R -O search"
>  
>  #
>  # Print Utilities
> -- 
> 2.25.1
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-08-14 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13 20:53 [Buildroot] [PATCH 1/1] package/busybox: speed up DHCP lease acquisition Edgar Bonet
2022-08-13 21:36 ` Angelo Compagnucci
2022-08-13 22:25   ` Edgar Bonet
2022-08-14 17:51     ` Yann E. MORIN
2022-08-14 17:49 ` Yann E. MORIN [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=20220814174945.GG2854108@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=angelo@amarulasolutions.com \
    --cc=bonet@grenoble.cnrs.fr \
    --cc=buildroot@buildroot.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox