public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Cc: Jerome Forissier <jerome.forissier@linaro.org>,
	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: Wed, 7 Aug 2024 13:08:13 -0600	[thread overview]
Message-ID: <20240807190813.GI1626301@bill-the-cat> (raw)
In-Reply-To: <CAOf5uwkiTwsAPducOJxEBUHKYiT0+q_dH_ZCOdCd7e4b45DS0A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3595 bytes --]

On Wed, Aug 07, 2024 at 08:54:08PM +0200, Michael Nazzareno Trimarchi wrote:
> Hi Jerome
> 
> On Thu, Jul 25, 2024 at 2:58 PM Jerome Forissier
> <jerome.forissier@linaro.org> 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
> >
> > Notes:
> >
> > 1. A number of features are currently incompatible with NET_LWIP: SANDBOX,
> > DFU_TFTP, FASTBOOT, SPL_NET. All make assumptions on how the network
> > stack is implemented and/or pull sybols that are not trivially exported
> > from lwIP. Some interface rework may be needed.
> >
> > 2. Due to the above and in order to provide some level of testing, a new QEMU
> > configuration is introduced (qemu_arm64_lwip_defconfig) which is the same
> > as qemu_arm64_defconfig but with NET_LWIP and CMD_*_LWIP enabled.
> > Tests are added to test/py/tests/test_net.py for that configuration.
> >
> > 3. The default QEMU networking doesn't work with NET_LWIP. wget
> > pauses and resets the connection. Wireshark shows [TCP Window Full] and
> > [TCP ZeroWindow]. Wen using an emulated e1000 however all is fine
> > (that is "-nic tap,model=e1000" on the QEMU command line, with a bridge
> > configured on the host).
> >
> > Changes in v5:
> >
> > - Rebased on next
> > - Refactor Kconfig options to avoid duplicates
> > - Library functions use a more consistent naming (dhcp_loop(),
> > ping_loop() etc.) and take a struct udevice * parameter (Heinrich S.)
> > - Do not use net_process_receive_packet() for input anymore. Instead of
> > calling eth_rx() which would invoke net_process_receive_packet(), we
> > call a new net_lwip_rx(udev) function which invokes the device recv()
> > and pushes the packets up the lwIP stack. Thus everything is tied to
> > a udevice now. (Heinrich S.)
> > - Add "configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y"
> > (Tom R.)
> 
> Here I have some questions. You can have CONFIG_NET with two alternatives and
> the alternatives are exclusive. Why do we need a CONFIG_NO_NET definition?

For the platforms that today don't enable networking at all (of which
there are a small but reasonable number). Since it's a "choice"
statement we need a "none of the above" option.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2024-08-07 19:08 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
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 [this message]

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=20240807190813.GI1626301@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=javier.tia@linaro.org \
    --cc=jerome.forissier@linaro.org \
    --cc=michael@amarulasolutions.com \
    --cc=muvarov@gmail.com \
    --cc=raymond.mao@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox