[PATCH v6 2/3] net: bootp: BOOTP/DHCPv4 retransmission improvements

Tom Rini trini at konsulko.com
Wed Mar 27 00:58:12 CET 2024


On Wed, Nov 22, 2023 at 03:27:45PM -0800, Sean Edmond wrote:

> This patch introduces 3 improvements to align with RFC 951:
> - retransmission backoff interval maximum is configurable
> - initial retranmission backoff interval is configurable
> - transaction ID is kept the same for each BOOTP/DHCPv4 request
> 
> In applications where thousands of nodes are serviced by a single DHCP
> server, maximizing the retransmission backoff interval at 2 seconds (the
> current u-boot default) exerts high pressure on the DHCP server and
> network layer.
> 
> RFC 951 “7.2. Client Retransmission Strategy” states that the
> retransmission backoff interval should be limited to 60 seconds.  This
> patch allows the interval to be configurable using the environment
> variable "bootpretransmitperiodmax"
> 
> The initial retranmission backoff period defaults to 250ms, which is
> also too small for these scenarios with many clients.  This patch makes
> the initial retransmission interval to be configurable using the
> environment variable "bootpretransmitperiodinit".
> 
> Also, on a retransmission it is not expected for the transaction ID to
> change (only the 'secs' field should be updated). Let's save the
> transaction ID and use the same transaction ID for each BOOTP/DHCPv4
> exchange.
> 
> Signed-off-by: Sean Edmond <seanedmond at microsoft.com>

This leads to failure to build on some platforms:
+(imxrt1050-evk) WARNING: unmet direct dependencies detected for CMD_DHCP
+(imxrt1050-evk)   Depends on [n]: CMDLINE [=y] && NET [=y] && CMD_NET [=y] && CMD_BOOTP [=n]
+(imxrt1050-evk)   Selected by [y]:
+(imxrt1050-evk)   - BOOT_DEFAULTS_CMDS [=y] && CMD_NET [=y]
+(imxrt1050-evk) arm-linux-gnueabi-ld.bfd: net/net.o: in function `net_loop':
+(imxrt1050-evk) net/net.c:526:(.text.net_loop+0xa8): undefined reference to `bootp_reset'
+(imxrt1050-evk) arm-linux-gnueabi-ld.bfd: net/net.c:528:(.text.net_loop+0xb0): undefined reference to `dhcp_request'

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240326/73ae3212/attachment.sig>


More information about the U-Boot mailing list