]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Merge patch series "BOOTP/DHCPv4 enhancements"
authorTom Rini <trini@konsulko.com>
Fri, 23 May 2025 17:29:55 +0000 (11:29 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 23 May 2025 17:31:03 +0000 (11:31 -0600)
Sean Edmond <seanedmond@microsoft.com> says:

In our datacenter application, a single DHCP server is servicing 36000+ clients.
Improvements are required to the DHCPv4 retransmission behavior to align with
RFC and ensure less pressure is exerted on the server:
- retransmission backoff interval maximum is configurable
  (environment variable bootpretransmitperiodmax)
- initial retransmission backoff interval is configurable
  (environment variable bootpretransmitperiodinit)
- transaction ID is kept the same for each BOOTP/DHCPv4 request
  (not recreated on each retry)

For our application we'll use:
- bootpretransmitperiodmax=16000
- bootpretransmitperiodinit=2000

A new configuration BOOTP_RANDOM_XID has been added to enable a randomized
BOOTP/DHCPv4 transaction ID.

Enhance DHCPv4 sending/parsing option 209 (PXE config file).  A previous
patch was accepted.  A new patch fixes a possible double free() and
addresses latest review comments.

Link: https://lore.kernel.org/r/20240509023918.2504185-1-seanedmond@microsoft.com
1  2 
cmd/Kconfig
cmd/pxe.c
lib/Kconfig
net/bootp.c
net/bootp.h

diff --cc cmd/Kconfig
index f21d27cb27f28267963e0d264e4cb9e7e791b0e8,82f6a089586d2329b4a597803a3d91d610fe3401..9a70c7a0b836db4a0f9bcde77bed3e09cfc04609
@@@ -1996,6 -1909,36 +1997,30 @@@ config BOOTP_VCI_STRIN
        default "U-Boot.arm" if ARM
        default "U-Boot"
  
 -config CMD_TFTPBOOT
 -      bool "tftpboot"
 -      default y
 -      help
 -        tftpboot - load file via network using TFTP protocol
 -
+ config BOOTP_RANDOM_XID
+       bool "Send random transaction ID to BOOTP/DHCP server"
+       depends on CMD_BOOTP && (LIB_RAND || LIB_HW_RAND)
+       help
+         Selecting this will allow for a random transaction ID to get
+         selected for each BOOTP/DHCPv4 exchange.
+ if CMD_DHCP6
+ config DHCP6_PXE_CLIENTARCH
+       hex
+       default 0x16 if ARM64
+       default 0x15 if ARM
+       default 0xFF
+ config DHCP6_PXE_DHCP_OPTION
+       bool "Request & store 'pxe_configfile' from DHCP6 server"
+ config DHCP6_ENTERPRISE_ID
+       int "Enterprise ID to send in DHCPv6 Vendor Class Option"
+       default 0
+ endif
  config CMD_TFTPPUT
        bool "tftp put"
        depends on CMD_TFTPBOOT
diff --cc cmd/pxe.c
Simple merge
diff --cc lib/Kconfig
Simple merge
diff --cc net/bootp.c
Simple merge
diff --cc net/bootp.h
Simple merge