From: Sascha Hauer <sha@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org,
Ahmad Fatoum <a.fatoum@pengutronix.de>,
Dan Shelton <dan.f.shelton@gmail.com>
Subject: Re: barebox + picotcp-1.7.0
Date: Mon, 4 Mar 2024 15:47:39 +0100 [thread overview]
Message-ID: <ZeXfC5XjqFz-oaL2@pengutronix.de> (raw)
In-Reply-To: <20240303215803.f8693ec93f03fd048acd3a30@gmail.com>
Hi Antony,
On Sun, Mar 03, 2024 at 09:58:03PM +0300, Antony Pavlov wrote:
> Hi all!
>
> In the message [1] Sascha proposed to have the barebox network stack
> and picotcp in parallel.
>
> This approach is used in the branch 20240303.picotcp-1.7.0 from
> https://github.com/frantony/barebox/ repo [2]:
>
> * all incoming packets go through the barebox network stack and only if
> they are not processed by it, they are forwarded to the picotcp network
> stack (all incoming ARP packets always go to the picotcp network stack).
>
> * risc-v virtual qemu machine with user networking (slirp network stack)
> is used for demonstration; one needs only qemu risc-v emulator
> for demonstration;
>
> * these barebox commands are introduced for picotcp stack capabilities
> demonstration:
>
> * dhclient --- setup picotcp network interface using the DHCP protocol;
> * ifconfig --- print/setup picotcp network interface information;
> * route --- print picotcp routing table;
> * picoping --- send ICMP ECHO_REQUEST to network hosts, receive replies;
> * picohost --- perform DNS lookup (google DNS server is used);
> * app_wget --- download file using the HTTP protocol.
>
> * tcpdump code is incorporated into barebox for network stack debugging.
> tcpdump supports parsing most of the protocols supported by barebox
> (DHCP, ARP, ICMP, DNS, TFTP and TCP).
I gave this a test on real hardware. I think the result is similar to
yours, dhclient, ifconfig, route, picoping, picohost work as expected.
app_wget does not work, it bails out with a NULL pointer exception.
I don't seem to have access to the Google DNS server, I switched this to
our local nameserver. Here global.net.nameserver should be used finally.
It's a bit odd that barebox and picotcp both use different configs, so
that we have to call barebox dhcp and also dhclient to make a network
interface usable in both barebox and picotcp. That should be a solvable
issue though.
Overall this looks like a good base for having both barebox network
stack and picotcp in parallel, so we could enable picotcp when needed
and still keep traditional barebox networking at least for a grace
period.
I'd still like to test lwip as well. Given that there are patches for
U-Boot already this should be doable without too much effort. The
integration into U-Boot likely shows the places we have to touch.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-03-04 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-03 18:58 Antony Pavlov
2024-03-04 14:47 ` Sascha Hauer [this message]
2024-03-10 20:19 ` Antony Pavlov
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=ZeXfC5XjqFz-oaL2@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=dan.f.shelton@gmail.com \
/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