mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
net: lwip: Fix PBUF_POOL_BUFSIZE when PROT_TCP_LWIP is disabled
The PBUF_POOL_BUFSIZE ends up being only 592 bytes, instead of 1514,
when PROT_TCP_LWIP Kconfig option is disabled. This results in a full
Ethernet frame requiring three PBUFs instead of just one.
This happens because the PBUF_POOL_BUFSIZE constant depends on the value
of a TCP_MSS constant, something that defaults to 536 when PROT_TCP_LWIP
is disabled.
PBUF_POOL_BUFSIZE = LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN)
Ensure that a full Ethernet frame fits inside a single PBUF by moving
the define of TCP_MSS outside the PROT_TCP_LWIP ifdef block.
Fixes: 1c41a7afaa ("net: lwip: build lwIP")
Acked-by: Jerome Forissier <jerome.forissier@arm.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
This commit is contained in:
@@ -121,9 +121,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
|
||||
|
||||
Reference in New Issue
Block a user