All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Forissier <jerome.forissier@linaro.org>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Javier Tia <javier.tia@linaro.org>,
	Raymond Mao <raymond.mao@linaro.org>,
	Maxim Uvarov <muvarov@gmail.com>
Subject: Re: [PATCH v5 00/20] Introduce the lwIP network stack
Date: Thu, 1 Aug 2024 16:40:03 +0200	[thread overview]
Message-ID: <ebc992d6-93e8-4e7e-99dc-834cc981f5a3@linaro.org> (raw)
In-Reply-To: <20240725223401.GD989285@bill-the-cat>



On 7/26/24 00:34, Tom Rini wrote:
> On Thu, Jul 25, 2024 at 11:22:20AM -0600, Tom Rini wrote:
>> On Thu, Jul 25, 2024 at 02:57:21PM +0200, Jerome Forissier wrote:
>>
>>> This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip
>>> library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP
>>> stack [2] [3] as an alternative to the current implementation in net/,
>>> selectable with Kconfig, and ultimately keep only lwIP if possible. Some
>>> reasons for doing so are:
>>> - Make the support of HTTPS in the wget command easier. Javier T. and
>>> Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do
>>> so. With that it becomes possible to fetch and launch a distro installer
>>> such as Debian etc. using a secure, authenticated connection directly
>>> from the U-Boot shell. Several use cases:
>>>   * Authentication: prevent MITM attack (third party replacing the
>>> binary with a different one)
>>>   * Confidentiality: prevent third parties from grabbing a copy of the
>>> image as it is being downloaded
>>>   * Allow connection to servers that do not support plain HTTP anymore
>>> (this is becoming more and more common on the Internet these days)
>>> - Possibly benefit from additional features implemented in lwIP
>>> - Less code to maintain in U-Boot
>>>
>>> Prior to applying this series, the lwIP stack needs to be added as a
>>> Git subtree with the following command:
>>>
>>>  $  git subtree add --squash --prefix lib/lwip/lwip https://git.savannah.gnu.org/git/lwip.git STABLE-2_2_0_RELEASE
>>
>> This is better than v4, and on the hardware platforms I could build and
>> boot on (which was most of mine except the am62x_beagleplay), the tests
>> ran and completed, including the tftp+boot a Linux kernel.
>>
>> The bad news is CI blows up, a lot:
>> https://source.denx.de/u-boot/u-boot/-/pipelines/21764
>> And:
>> https://dev.azure.com/u-boot/a1096300-2999-4ec4-a21a-4c22075e3771/_apis/build/builds/9014/logs/106
>> which is another Kconfig dependency problem. I don't _think_ I
>> introduced that, but since this wasn't against top of tree, I had to
>> apply the cmd/Kconfig patch manually.
>>
>> I have my world build running still and may have more comments based on
>> that.
> 
> First, with NET_LWIP being default rather than NET, there's a lot of
> other Kconfig dependency issues. Unfortunately I don't see an easy tool
> for making sure this is all clean aside from a shell loop like:
> for C in `(cd configs;ls)`;do make -s $C;done

I have run this loop successfully with the upcoming v6 version. Some
configs do print some warnings but there is no error.


> Once those are fixed, this is feeling pretty OK I think. I assume PXE
> support is high on the follow-up TODO list?

Certainly, although I'm not sure I'll be able to spend time on it in the
very near future.

> That said, after taking
> tiger-rk3588 as an example platform and hacking out PXE related stuff and
> turning on lwIP:
>    aarch64: (for 1/1 boards) all +10144.0 bss -4040.0 data -64.0 rodata -100.0 text +14348.0
>             tiger-rk3588   : all +10144 bss -4040 data -64 rodata -100 text +14348
>                u-boot: add: 161/-115, grow: 8/-6 bytes: 24552/-14382 (10170)
[snip]
 
> Although I'm not 100% sure that config is functionally equivalent, so
> perhaps it would be helpful if you could take a board or two and
> reconfigure them with the legacy stack, but equivalent functionality to
> with lwIP, for comparison sake? Thanks!

I tried two boards and compared NET (u-boot.net) agains NET_LWIP
(u-boot). I will give more details on how to remove PXE from the NET
build and select/unselect the proper Kconfig symbols to obtain equivalent
functionality in the cover letter for v6. Note that dhcp, ping, dns, tftp
and wget are enabled in both builds. Here are the results.

- For imx8mp_evk_defconfig:

$ ~/work/linux/scripts/bloat-o-meter u-boot.net u-boot | sed -n '1p;$p'
add/remove: 228/162 grow/shrink: 49/4 up/down: 51217/-29078 (22139)
Total: Before=651990, After=674129, chg +3.40%

- For rpi_3_32b_defconfig:

$ ~/work/linux/scripts/bloat-o-meter u-boot.net u-boot | sed -n '1p;$p'
add/remove: 256/92 grow/shrink: 5/8 up/down: 50934/-16780 (34154)
Total: Before=418877, After=453031, chg +8.15%

I will post v6 soon.

Thanks,
-- 
Jerome

  reply	other threads:[~2024-08-01 14:40 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 12:57 [PATCH v5 00/20] Introduce the lwIP network stack Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 01/20] flash: prefix error codes with FL_ Jerome Forissier
2024-07-25 18:18   ` Tom Rini
2024-07-26  8:51     ` Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 02/20] net: introduce alternative implementation as net-lwip/ Jerome Forissier
2024-07-25 13:46   ` Maxim Uvarov
2024-07-25 16:17   ` Tom Rini
2024-07-26 12:08     ` Jerome Forissier
2024-07-26  8:44   ` Michal Simek
2024-07-26 12:39     ` Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 03/20] configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y Jerome Forissier
2024-08-07 13:58   ` Felix Brack
2024-07-25 12:57 ` [PATCH v5 04/20] net: fec_mxc_init(): do not ignore return status of fec_open() Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 05/20] net: split include/net.h into net{, -common, -legacy, -lwip}.h Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 06/20] net: eth-uclass: add function eth_start_udev() Jerome Forissier
2024-07-25 18:27   ` Tom Rini
2024-07-26  8:38     ` Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 07/20] net-lwip: build lwIP Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 08/20] net-lwip: add DHCP support and dhcp commmand Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 09/20] net-lwip: add TFTP support and tftpboot command Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 10/20] net-lwip: add ping command Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 11/20] net-lwip: add dns command Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 12/20] net: split cmd/net.c into cmd/net.c and cmd/net-common.c Jerome Forissier
2024-07-29 12:41   ` Ilias Apalodimas
2024-07-25 12:57 ` [PATCH v5 13/20] net-lwip: add wget command Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 14/20] net-lwip: lwIP wget supports user defined port in the uri, so allow it Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 15/20] cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 16/20] configs: add qemu_arm64_lwip_defconfig Jerome Forissier
2024-07-25 15:58   ` Tom Rini
2024-07-25 16:10     ` Jerome Forissier
2024-07-25 16:25       ` Tom Rini
2024-07-26 12:27         ` Jerome Forissier
2024-07-26 14:05           ` Tom Rini
2024-07-25 12:57 ` [PATCH v5 17/20] lwip: tftp: add support of blksize option to client Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 18/20] net-lwip: add TFTP_BLOCKSIZE Jerome Forissier
2024-07-29 12:29   ` Ilias Apalodimas
2024-07-29 15:18     ` Jerome Forissier
2024-07-30  9:57       ` Ilias Apalodimas
2024-07-25 12:57 ` [PATCH v5 19/20] CI: add qemu_arm64_lwip to the test matrix Jerome Forissier
2024-07-25 12:57 ` [PATCH v5 20/20] MAINTAINERS: net-lwip: add myself as a maintainer Jerome Forissier
2024-07-25 13:03 ` [PATCH v5 00/20] Introduce the lwIP network stack Fabio Estevam
2024-07-25 17:22 ` Tom Rini
2024-07-25 22:34   ` Tom Rini
2024-08-01 14:40     ` Jerome Forissier [this message]
2024-08-01 14:43       ` Tom Rini
2024-08-01 15:15         ` Jerome Forissier
2024-08-01 15:21           ` Tom Rini
2024-08-02 20:16       ` Tom Rini
2024-08-07 15:06         ` Jerome Forissier
2024-07-30  9:48   ` Jerome Forissier
2024-07-30 14:02     ` Tom Rini
2024-07-30 14:23       ` Jerome Forissier
2024-08-07 18:54 ` Michael Nazzareno Trimarchi
2024-08-07 19:08   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebc992d6-93e8-4e7e-99dc-834cc981f5a3@linaro.org \
    --to=jerome.forissier@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=javier.tia@linaro.org \
    --cc=muvarov@gmail.com \
    --cc=raymond.mao@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.