diff options
| author | Tom Rini <[email protected]> | 2026-03-13 09:00:54 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-13 10:52:03 -0600 |
| commit | 6dc75d440dbdd3e2ac24ae5bb0ed51123bee8c33 (patch) | |
| tree | 854cbd24bc2ee6852e0efed6b029c755c7c26a3e /lib | |
| parent | 9f1059bc735ec2a8d78c1f3e4fcab1fa3f428317 (diff) | |
| parent | a5fcbd5a83553b3803df28422410c9fd22adaec6 (diff) | |
Merge tag 'net-20260312' of https://source.denx.de/u-boot/custodians/u-boot-net into next
Pull request net-20260312.
net:
- Move network PHY under NETDEVICES
- s/DM_CLK/CLK/ in HIFEMAC_{ETH,MDIO}
- Add support for Airoha AN8811HB PHY
- airoha: PCS and MDIO support for Airoha AN7581 SoC
net-lwip:
- Fix issue when TFTP blocksize is >8192
- Adjust PBUF_POOL_SIZE/IP_REASS_MAX_PBUFS for better performance and
resource usage.
- Enable mii command for NET_LWIP
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lwip/u-boot/lwipopts.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/lwip/u-boot/lwipopts.h b/lib/lwip/u-boot/lwipopts.h index e8a2c9d7a0a..8dae004f1a2 100644 --- a/lib/lwip/u-boot/lwipopts.h +++ b/lib/lwip/u-boot/lwipopts.h @@ -65,7 +65,21 @@ #define MEM_ALIGNMENT 8 #define MEMP_NUM_TCP_SEG 16 + +/* IP fragmentation parameters for TFTP reassembly */ +#define IP_FRAG_MTU_USABLE 1480 +#define PBUF_POOL_HEADROOM 6 +#define PBUF_POOL_RESERVE 4 +#define TFTP_BLOCKSIZE_THRESHOLD 4096 + +#if defined(CONFIG_TFTP_BLOCKSIZE) && (CONFIG_TFTP_BLOCKSIZE > TFTP_BLOCKSIZE_THRESHOLD) +#define PBUF_POOL_SIZE (((CONFIG_TFTP_BLOCKSIZE + (IP_FRAG_MTU_USABLE - 1)) / \ + IP_FRAG_MTU_USABLE) + PBUF_POOL_HEADROOM) +#define IP_REASS_MAX_PBUFS (PBUF_POOL_SIZE - PBUF_POOL_RESERVE) +#else #define PBUF_POOL_SIZE 8 +#define IP_REASS_MAX_PBUFS 4 +#endif #define LWIP_ARP 1 #define ARP_TABLE_SIZE 4 @@ -76,7 +90,7 @@ #define IP_REASSEMBLY 1 #define IP_FRAG 1 #define IP_REASS_MAXAGE 3 -#define IP_REASS_MAX_PBUFS 4 + #define IP_FRAG_USES_STATIC_BUF 0 #define IP_DEFAULT_TTL 255 @@ -121,9 +135,13 @@ #define LWIP_UDP 0 #endif +/* + * PBUF_POOL_BUFSIZE is derived from TCP_MSS even when + * CONFIG_PROT_TCP_LWIP is not defined + */ +#define TCP_MSS 1460 #if defined(CONFIG_PROT_TCP_LWIP) #define LWIP_TCP 1 -#define TCP_MSS 1460 #define TCP_WND CONFIG_LWIP_TCP_WND #define LWIP_WND_SCALE 1 #define TCP_RCV_SCALE 0x7 |
