<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/net-lwip.h, branch master</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: nfs: Port the NFS code to work with lwIP</title>
<updated>2026-01-15T10:09:28+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-12-12T11:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=230cf3bc277622081b27e33469f5f1f59fc48180'/>
<id>230cf3bc277622081b27e33469f5f1f59fc48180</id>
<content type='text'>
After the preparatory patches moved most of the NFS code into common
files we now add the code to enable NFS support with lwIP.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Acked-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After the preparatory patches moved most of the NFS code into common
files we now add the code to enable NFS support with lwIP.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Acked-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: make dhcp_run() common for NET and NET_LWIP</title>
<updated>2025-10-22T12:28:33+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-10-09T12:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b8e78585171787794611205d661b97bc5f4dd83'/>
<id>4b8e78585171787794611205d661b97bc5f4dd83</id>
<content type='text'>
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: ping: set net_try_count to 1</title>
<updated>2025-08-18T13:47:58+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-08-04T12:51:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=90c05f68fcab57d669233033d34e52b8d55d57dd'/>
<id>90c05f68fcab57d669233033d34e52b8d55d57dd</id>
<content type='text'>
The legacy network stack sets net_try_count to 1 at the beginning of the
net_loop() function. This is required for net_start_again() to work
properly. Therefore, set the variable accordingly in the do_ping()
function when NET_LWIP=y. This fixes an issue where a ping to an
unreachable destination would run twice on the same network device. For
example with qemu_arm64_lwip_defconfig:

 =&gt; dhcp
 DHCP client bound to address 10.0.2.15 (3 ms)
 =&gt; ping 10.0.0.1
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 =&gt; QEMU: Terminated

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The legacy network stack sets net_try_count to 1 at the beginning of the
net_loop() function. This is required for net_start_again() to work
properly. Therefore, set the variable accordingly in the do_ping()
function when NET_LWIP=y. This fixes an issue where a ping to an
unreachable destination would run twice on the same network device. For
example with qemu_arm64_lwip_defconfig:

 =&gt; dhcp
 DHCP client bound to address 10.0.2.15 (3 ms)
 =&gt; ping 10.0.0.1
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 =&gt; QEMU: Terminated

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: add net_lwip_dns_resolve()</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:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9501274f94f02ee55059814033ea727180e310cb'/>
<id>9501274f94f02ee55059814033ea727180e310cb</id>
<content type='text'>
Add a helper fonction to convert an IP address (supplied as a text
string) or a host name to an ip_addr_t.

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 a helper fonction to convert an IP address (supplied as a text
string) or a host name to an ip_addr_t.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: split net/lwip/wget.c</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:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d3761a31ef094596361624b73d56479a2fe1e573'/>
<id>d3761a31ef094596361624b73d56479a2fe1e573</id>
<content type='text'>
Split net/lwip/wget.c in two: one part which implements CONFIG_WGET
stays in net/ while the part that implements CONFIG_CMD_WGET is moved
into cmd/.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split net/lwip/wget.c in two: one part which implements CONFIG_WGET
stays in net/ while the part that implements CONFIG_CMD_WGET is moved
into cmd/.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: move dns init to common function</title>
<updated>2025-07-08T09:05:29+00:00</updated>
<author>
<name>Tim Harvey</name>
<email>tharvey@gateworks.com</email>
</author>
<published>2025-05-30T15:38:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a383869d6b58b3d66a91460a8b1a6fdcc09a1fe9'/>
<id>a383869d6b58b3d66a91460a8b1a6fdcc09a1fe9</id>
<content type='text'>
move the dns init including setting the dns servers from env vars to a
common function as other commands that support hostname lookups will
need this.

Signed-off-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
[jf: add CMD_DNS conditional to support NET_LWIP &amp;&amp; !CMD_DNS]
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
move the dns init including setting the dns servers from env vars to a
common function as other commands that support hostname lookups will
need this.

Signed-off-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
[jf: add CMD_DNS conditional to support NET_LWIP &amp;&amp; !CMD_DNS]
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ping: make do_ping() available via &lt;net.h&gt;</title>
<updated>2025-04-23T08:02:49+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-04-15T21:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1f907e559d5d29f7824115e47c9771595fdf5819'/>
<id>1f907e559d5d29f7824115e47c9771595fdf5819</id>
<content type='text'>
Make the do_ping() function in cmd/net.c a global one by getting rid of
the static qualifier, and move the prototype declaration from net-lwip.h
to net-common.h. This makes the function available to other parts of
U-Boot when CONFIG_NET=y, as was already the case when
CONFIG_NET_LWIP=y.

This is a peparation step to make the sandbox tests use a common API
between NET and NET_LWIP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the do_ping() function in cmd/net.c a global one by getting rid of
the static qualifier, and move the prototype declaration from net-lwip.h
to net-common.h. This makes the function available to other parts of
U-Boot when CONFIG_NET=y, as was already the case when
CONFIG_NET_LWIP=y.

This is a peparation step to make the sandbox tests use a common API
between NET and NET_LWIP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: fix initialization sequence before a command</title>
<updated>2025-04-23T08:02:49+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-04-15T21:17:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5666865decb8f24b4710a15be35207a62f972aee'/>
<id>5666865decb8f24b4710a15be35207a62f972aee</id>
<content type='text'>
The things that are done prior to executing a network command with
NET_LWIP are not consistent with what is done with NET. It impacts the
selection of the current device, and more precisely if the active device
is invalid NET would return an error while NET_LWIP would try to pick a
new device. This incorrect behavior was detected thanks to the eth_rotate
sandbox test (dm_test_eth_rotate()).

Fix it by re-using a sequence similar to what NET has in net_loop().
This piece of code is inserted in a function called net_lwip_eth_start()
renamed from net_lwip_eth_set_current().

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The things that are done prior to executing a network command with
NET_LWIP are not consistent with what is done with NET. It impacts the
selection of the current device, and more precisely if the active device
is invalid NET would return an error while NET_LWIP would try to pick a
new device. This incorrect behavior was detected thanks to the eth_rotate
sandbox test (dm_test_eth_rotate()).

Fix it by re-using a sequence similar to what NET has in net_loop().
This piece of code is inserted in a function called net_lwip_eth_start()
renamed from net_lwip_eth_set_current().

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: move eth_init() out of new_netif()</title>
<updated>2025-02-12T18:36:57+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-01-30T08:22:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9f6b9f57fefa391018083c42bc3de9f33ea3bd90'/>
<id>9f6b9f57fefa391018083c42bc3de9f33ea3bd90</id>
<content type='text'>
Move the initialization of the ethernet devices out of the new_netif()
function. Indeed, new_netif() accepts a struct device argument, which
is expected to be valid and active. The activation and selection of
this device are achieved by eth_init() (on first time the network
stack is used) and eth_set_current(). This is what takes care of the
ethrotate and ethact environment variables. Therefore, move these calls
to a new function: net_lwip_set_current(), and use it whenever a
net-lwip command is run.

This patch hopefully fixes the incorrect net-lwip behavior observed on
boards with multiple ethernet interfaces [1].

Tested on an i.MX8MPlus EVK equipped wih two ethernet ports. The dhcp
command succeeds whether the cable is plugged into the first or second
port.

[1] https://lists.denx.de/pipermail/u-boot/2025-January/576326.html

Reported-by: E Shattow &lt;e@freeshell.de&gt;
Tested-by: E Shattow &lt;e@freeshell.de&gt;
Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the initialization of the ethernet devices out of the new_netif()
function. Indeed, new_netif() accepts a struct device argument, which
is expected to be valid and active. The activation and selection of
this device are achieved by eth_init() (on first time the network
stack is used) and eth_set_current(). This is what takes care of the
ethrotate and ethact environment variables. Therefore, move these calls
to a new function: net_lwip_set_current(), and use it whenever a
net-lwip command is run.

This patch hopefully fixes the incorrect net-lwip behavior observed on
boards with multiple ethernet interfaces [1].

Tested on an i.MX8MPlus EVK equipped wih two ethernet ports. The dhcp
command succeeds whether the cable is plugged into the first or second
port.

[1] https://lists.denx.de/pipermail/u-boot/2025-January/576326.html

Reported-by: E Shattow &lt;e@freeshell.de&gt;
Tested-by: E Shattow &lt;e@freeshell.de&gt;
Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: wget: make wget_with_dns return value compatible with its lwip version</title>
<updated>2024-11-16T20:35:05+00:00</updated>
<author>
<name>Adriano Cordova</name>
<email>adrianox@gmail.com</email>
</author>
<published>2024-11-11T21:08:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=de28a2a5f2ad93b156b39c2aee24cb5d01c7e619'/>
<id>de28a2a5f2ad93b156b39c2aee24cb5d01c7e619</id>
<content type='text'>
There are two wget_with_dns functions, one in the legacy network
stack and one in lwip, but the return values are not compatible.
This commit modifies the legacy version of wget_with_dns so that
the return values are compatible: 0 on success, otherwise a negative
error. This way wget_with_dns can be called in a network stack
agnostic way.

Signed-off-by: Adriano Cordova &lt;adrianox@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two wget_with_dns functions, one in the legacy network
stack and one in lwip, but the return values are not compatible.
This commit modifies the legacy version of wget_with_dns so that
the return values are compatible: 0 on success, otherwise a negative
error. This way wget_with_dns can be called in a network stack
agnostic way.

Signed-off-by: Adriano Cordova &lt;adrianox@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
