<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/lwip, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: lwip: scale buffer pool size with TFTP block size</title>
<updated>2026-03-13T16:52:02+00:00</updated>
<author>
<name>Pranav Tilak</name>
<email>pranav.vinaytilak@amd.com</email>
</author>
<published>2026-03-10T12:58:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67586012490a4b2b4db6b79647aaf946f03eb767'/>
<id>67586012490a4b2b4db6b79647aaf946f03eb767</id>
<content type='text'>
TFTP transfers fail when tftpblocksize is set to 8192 or larger due to
insufficient buffer resources for IP fragment reassembly.

Calculate PBUF_POOL_SIZE and IP_REASS_MAX_PBUFS dynamically based on
CONFIG_TFTP_BLOCKSIZE using IP fragmentation boundaries (1480 usable
bytes per fragment at 1500 MTU). The pool size includes headroom for
TX, ARP, and protocol overhead, while ensuring PBUF_POOL_SIZE remains
greater than IP_REASS_MAX_PBUFS as required by lwIP.

Signed-off-by: Pranav Tilak &lt;pranav.vinaytilak@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TFTP transfers fail when tftpblocksize is set to 8192 or larger due to
insufficient buffer resources for IP fragment reassembly.

Calculate PBUF_POOL_SIZE and IP_REASS_MAX_PBUFS dynamically based on
CONFIG_TFTP_BLOCKSIZE using IP fragmentation boundaries (1480 usable
bytes per fragment at 1500 MTU). The pool size includes headroom for
TX, ARP, and protocol overhead, while ensuring PBUF_POOL_SIZE remains
greater than IP_REASS_MAX_PBUFS as required by lwIP.

Signed-off-by: Pranav Tilak &lt;pranav.vinaytilak@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: Fix PBUF_POOL_BUFSIZE when PROT_TCP_LWIP is disabled</title>
<updated>2026-03-13T16:52:02+00:00</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-03-09T21:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b3ee14ea6d233a507a7983ccb5f1328cc8d683c2'/>
<id>b3ee14ea6d233a507a7983ccb5f1328cc8d683c2</id>
<content type='text'>
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: 1c41a7afaa15 ("net: lwip: build lwIP")
Acked-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: 1c41a7afaa15 ("net: lwip: build lwIP")
Acked-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: tftp: add support of tsize option to client</title>
<updated>2026-02-06T15:42:37+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-01-28T23:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=337f50bad2ac8e1db126e4f6d372a3186bba2893'/>
<id>337f50bad2ac8e1db126e4f6d372a3186bba2893</id>
<content type='text'>
The TFTP server can report the size of the entire file that is about to
be received in the Transfer Size Option, this is described in RFC 2349.
This functionality is optional and the server may not report tsize in
case it is not supported.

Always send tsize request to the server to query the transfer size,
and in case the server does respond, cache that information locally
in tftp_state.tsize, otherwise cache size 0. Introduce new function
tftp_client_get_tsize() which returns the cached tftp_state.tsize so
clients can determine the transfer size and use it.

Update net/lwip/tftp.c to make use of tftp_client_get_tsize() and
avoid excessive printing of '#' during TFTP transfers in case the
transfer size is reported by the server.

Submitted upstream: https://savannah.nongnu.org/patch/index.php?item_id=10557

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Acked-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TFTP server can report the size of the entire file that is about to
be received in the Transfer Size Option, this is described in RFC 2349.
This functionality is optional and the server may not report tsize in
case it is not supported.

Always send tsize request to the server to query the transfer size,
and in case the server does respond, cache that information locally
in tftp_state.tsize, otherwise cache size 0. Introduce new function
tftp_client_get_tsize() which returns the cached tftp_state.tsize so
clients can determine the transfer size and use it.

Update net/lwip/tftp.c to make use of tftp_client_get_tsize() and
avoid excessive printing of '#' during TFTP transfers in case the
transfer size is reported by the server.

Submitted upstream: https://savannah.nongnu.org/patch/index.php?item_id=10557

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Acked-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: tftp: Do not write past buffer end</title>
<updated>2026-02-04T08:04:36+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2026-01-14T15:12:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8df6b78746ee1f4f0bb750aec9c4da2fb31d3e33'/>
<id>8df6b78746ee1f4f0bb750aec9c4da2fb31d3e33</id>
<content type='text'>
sprintf will add a trailing \0 so manually adding a trailing \0 will
result in an extra unaccounted for character being written. This
overwrote the first byte of the following allocation block resulting in
unexpected behavior.

This was found by Running 'pxe get' with no available file resulting in
multiple attempts, using the default algorithm, to attempt to find a file.
Eventually there would be a failed assert when free() was called.
Failing the assert would result in a system reset.

Fixes: 27d7ccda94fa ("net: lwip: tftp: add support of blksize option to client")
Reported-by: Michal Simek &lt;michal.simek@amd.com&gt;
Tested-by: Michal Simek &lt;michal.simek@amd.com&gt;

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # Pine64+
Reviewed-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
Reviewed-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sprintf will add a trailing \0 so manually adding a trailing \0 will
result in an extra unaccounted for character being written. This
overwrote the first byte of the following allocation block resulting in
unexpected behavior.

This was found by Running 'pxe get' with no available file resulting in
multiple attempts, using the default algorithm, to attempt to find a file.
Eventually there would be a failed assert when free() was called.
Failing the assert would result in a system reset.

Fixes: 27d7ccda94fa ("net: lwip: tftp: add support of blksize option to client")
Reported-by: Michal Simek &lt;michal.simek@amd.com&gt;
Tested-by: Michal Simek &lt;michal.simek@amd.com&gt;

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # Pine64+
Reviewed-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
Reviewed-by: Jerome Forissier &lt;jerome.forissier@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: enable debug traces for SNTP when CONFIG_LWIP_DEBUG is set</title>
<updated>2025-09-30T10:01:36+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-09-22T09:35:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4462ab9a0b559a45c2b3e2dfb3912303e3449c9b'/>
<id>4462ab9a0b559a45c2b3e2dfb3912303e3449c9b</id>
<content type='text'>
Now that SNTP is supported, enable SNTP debug traces when LWIP_DEBUG is
enabled. In particular, this allows to see which NTP servers are
received during DHCP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that SNTP is supported, enable SNTP debug traces when LWIP_DEBUG is
enabled. In particular, this allows to see which NTP servers are
received during DHCP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: tftp: resend initial request</title>
<updated>2025-08-18T13:47:58+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-07-24T16:08:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46fc56559933777051bcc7b58d06424f1f4af504'/>
<id>46fc56559933777051bcc7b58d06424f1f4af504</id>
<content type='text'>
The TFTP implementation does not resend the initial request if there is
no response from the server. Since TFTP is based on UDP, there should be
a mechanism to deal with unreliable transmissions at this point, similar
to what we have for data packets. Therefore, introduce request
retransmission.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
CC: Venkatesh Abbarapu &lt;venkatesh.abbarapu@amd.com&gt;
CC: Michal Simek &lt;michal.simek@amd.com&gt;
CC: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TFTP implementation does not resend the initial request if there is
no response from the server. Since TFTP is based on UDP, there should be
a mechanism to deal with unreliable transmissions at this point, similar
to what we have for data packets. Therefore, introduce request
retransmission.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
CC: Venkatesh Abbarapu &lt;venkatesh.abbarapu@amd.com&gt;
CC: Michal Simek &lt;michal.simek@amd.com&gt;
CC: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: add Kconfig option to show ICMP unreachable errors</title>
<updated>2025-08-18T12:08:57+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-08-12T12:43:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6b914d5596d947ebea4e8697004e210df1abe61e'/>
<id>6b914d5596d947ebea4e8697004e210df1abe61e</id>
<content type='text'>
Add Kconfig symbol LWIP_ICMP_SHOW_UNREACH which, when enabled, prints a
message to the console upon reception of ICMP unreachable messages. For
example:

 $ make qemu_arm64_lwip_defconfig
 $ qemu-system-aarch64 -M virt -cpu max -nographic -bios u-boot.bin
 [...]
 =&gt; dhcp
 DHCP client bound to address 10.0.2.15 (0 ms)
 =&gt; tftp 192.168.0.100:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.100; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (host unreachable) from 192.168.0.16
 Timeout!
 =&gt; tftp 192.168.0.16:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.16; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (port unreachable) from 192.168.0.16
 Timeout!
 =&gt;

Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/73.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Kconfig symbol LWIP_ICMP_SHOW_UNREACH which, when enabled, prints a
message to the console upon reception of ICMP unreachable messages. For
example:

 $ make qemu_arm64_lwip_defconfig
 $ qemu-system-aarch64 -M virt -cpu max -nographic -bios u-boot.bin
 [...]
 =&gt; dhcp
 DHCP client bound to address 10.0.2.15 (0 ms)
 =&gt; tftp 192.168.0.100:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.100; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (host unreachable) from 192.168.0.16
 Timeout!
 =&gt; tftp 192.168.0.16:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.16; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (port unreachable) from 192.168.0.16
 Timeout!
 =&gt;

Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/73.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: icmp: allow reporting ICMP destination unreachable</title>
<updated>2025-08-18T12:08:57+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-08-12T12:43:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fbd79b493d943a2f41a78408cc99ca4ee4392b07'/>
<id>fbd79b493d943a2f41a78408cc99ca4ee4392b07</id>
<content type='text'>
Allow reporting ICMP destination unreachable messages via a user-defined
callback.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow reporting ICMP destination unreachable messages via a user-defined
callback.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: provide a sntp_format_time() function</title>
<updated>2025-08-01T07:30:47+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-07-24T15:26:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=71056afe2094b5a6fad4a2dd940252d1def55e7e'/>
<id>71056afe2094b5a6fad4a2dd940252d1def55e7e</id>
<content type='text'>
Provide a trivial implementation of sntp_format_time() to fix a build
error when CONFIG_LWIP_DEBUG=y:

lib/lwip/lwip/src/apps/sntp/sntp.c: In function ‘sntp_format_time’:
lib/lwip/lwip/src/apps/sntp/sntp.c:283:10: error: implicit declaration of function ‘ctime’ [-Werror=implicit-function-declaration]
  283 |   return ctime(&amp;ut);
      |          ^~~~~

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a trivial implementation of sntp_format_time() to fix a build
error when CONFIG_LWIP_DEBUG=y:

lib/lwip/lwip/src/apps/sntp/sntp.c: In function ‘sntp_format_time’:
lib/lwip/lwip/src/apps/sntp/sntp.c:283:10: error: implicit declaration of function ‘ctime’ [-Werror=implicit-function-declaration]
  283 |   return ctime(&amp;ut);
      |          ^~~~~

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: add sntp command</title>
<updated>2025-07-08T09:07:37+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-06-25T13:19:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a2a0c7527eb86e69bc7a78d9250eb5a1068ae5b7'/>
<id>a2a0c7527eb86e69bc7a78d9250eb5a1068ae5b7</id>
<content type='text'>
Implement the sntp command when NET_LWIP=y.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the sntp command when NET_LWIP=y.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
