Skip to content

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jun 30, 2023

Contribution description

RC1 of lwIP 2.2.0 is out, so let's see if it works with RIOT.

DO NOT MERGE YET! WE SHOULD ONLY MERGE THE ACTUAL RELEASE. This PR is currently WIP and only for testing if the 2.2.0 API works with RIOT.

Testing procedure

The tests/pkg/lwip* tests should work.

tests/lwip should also manually tested for all combinations of LWIP_IPV4=0 and LWIP_IPV6=1 on a 6LoWPAN-based board (did not do that yet).

Issues/PRs references

None

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Jun 30, 2023
@miri64 miri64 requested review from yarrick and benpicco June 30, 2023 06:32
@github-actions github-actions bot added Area: network Area: Networking Area: pkg Area: External package ports labels Jun 30, 2023
@miri64 miri64 requested a review from maribu June 30, 2023 06:33
@riot-ci
Copy link

riot-ci commented Jun 30, 2023

Murdock results

✔️ PASSED

2cbdd66 lwip: bump to v2.2.0

Success Failures Total Runtime
7949 0 7949 15m:01s

Artifacts

@miri64
Copy link
Member Author

miri64 commented Jul 2, 2023

Had some time to test 6LoWPAN. LWIP_IPV4=1 does not make any sense with 6LoWPAN (= IPv6 over Low-Power Wireless Personal Area Networks), as I remembered during testing ;-P, so this leaves only

LWIP_IPV6=1 LWIP_IPV4=0 for v2.2.0-rc1

Server

make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/pkg/lwip'
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-07-02 21:03:40,766 # Connect to serial port /dev/ttyACM1
Welcome to pyterm!
Type '/exit' to exit.
ifconfig
2023-07-02 21:03:52,428 # ifconfig
2023-07-02 21:03:52,434 # Iface L60 HWaddr: 00:04:25:19:18:01:ae:82 Link: up State: up
2023-07-02 21:03:52,436 #         Link type: wireless
2023-07-02 21:03:52,444 #         inet6 addr: fe80:0:0:0:204:2519:1801:ae82 scope: link state: valid preferred
> udp server
2023-07-02 21:04:10,451 # udp server
2023-07-02 21:04:10,455 # usage: udp server [start|stop]
> udp server start
2023-07-02 21:04:13,750 # udp server start
2023-07-02 21:04:13,753 # usage udp server start <port>
> udp server start 1337
2023-07-02 21:04:20,078 # udp server start 1337
2023-07-02 21:04:20,082 # Success: started UDP server on port 1337
> 2023-07-02 21:04:43,753 # Received UDP data from [fe80::204:2519:1801:bcd8]:49153
2023-07-02 21:04:43,754 # 00000000  AB  CD  EF
ip server
2023-07-02 21:04:53,152 # ip server
2023-07-02 21:04:53,155 # usage: ip server [start|stop]
> ip server start
2023-07-02 21:04:55,712 # ip server start
2023-07-02 21:04:55,715 # usage ip server start <protocol>
> ip server start 90
2023-07-02 21:05:13,126 # ip server start 90
2023-07-02 21:05:13,130 # Success: started IP server on protocol 90
> 2023-07-02 21:05:27,163 # Received IP data from [fe80::204:2519:1801:bcd8]:
2023-07-02 21:05:27,165 # 00000000  01  23  45  60
tcp server start 1234
2023-07-02 21:05:49,167 # tcp server start 1234
2023-07-02 21:05:49,171 # Success: started TCP server on port 1234
> 2023-07-02 21:06:03,423 # TCP client [fe80::204:2519:1801:bcd8]:49153 connected
2023-07-02 21:06:15,699 # Received TCP data from client [fe80::204:2519:1801:bcd8]:49153
2023-07-02 21:06:15,702 # 00000000  09  86  4A  BC  DE  F0
2023-07-02 21:06:28,708 # TCP connection to [fe80::204:2519:1801:bcd8]:49153 reset

Client

make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/pkg/lwip'
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-07-02 21:03:46,188 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
hele
2023-07-02 21:03:59,093 # hele
2023-07-02 21:03:59,096 # shell: command not found: hele
> help
2023-07-02 21:04:01,029 # help
2023-07-02 21:04:01,032 # Command              Description
2023-07-02 21:04:01,035 # ---------------------------------------
2023-07-02 21:04:01,042 # ip                   Send IP packets and listen for packets of certain type
2023-07-02 21:04:01,049 # tcp                  Send TCP messages and listen for messages on TCP port
2023-07-02 21:04:01,056 # udp                  Send UDP messages and listen for messages on UDP port
2023-07-02 21:04:01,060 # ifconfig             List network interfaces
2023-07-02 21:04:01,065 # pm                   interact with layered PM subsystem
2023-07-02 21:04:01,070 # ps                   Prints information about running threads.
2023-07-02 21:04:01,074 # reboot               Reboot the node
2023-07-02 21:04:01,078 # version              Prints current RIOT_VERSION
> udp
2023-07-02 21:04:05,126 # udp
2023-07-02 21:04:05,128 # usage: udp [send|server]
> udp send fe80:0:0:0:204:2519:1801:ae82
2023-07-02 21:04:30,525 # udp send fe80:0:0:0:204:2519:1801:ae82
2023-07-02 21:04:30,531 # usage: udp send <addr>:<port> <hex data> [<num> [<delay in us>]]
> udp send fe80:0:0:0:204:2519:1801:ae82:1337 abcdef
2023-07-02 21:04:36,259 # udp send fe80:0:0:0:204:2519:1801:ae82:1337 abcdef
2023-07-02 21:04:36,263 # Error: unable to parse destination address
> udp send [fe80:0:0:0:204:2519:1801:ae82]:1337 abcdef
2023-07-02 21:04:43,733 # udp send [fe80:0:0:0:204:2519:1801:ae82]:1337 abcdef
2023-07-02 21:04:43,741 # Success: send 3 byte over UDP to [fe80:0:0:0:204:2519:1801:ae82]:1337
> ip send
2023-07-02 21:05:17,753 # ip send
2023-07-02 21:05:17,759 # usage: ip send <addr> <protocol> <hex data> [<num> [<delay in us>]]
> ip send fe80:0:0:0:204:2519:1801:ae82 90 0123456
2023-07-02 21:05:27,154 # ip send fe80:0:0:0:204:2519:1801:ae82 90 0123456
2023-07-02 21:05:27,162 # Success: send 4 byte over IPv6 to fe80:0:0:0:204:2519:1801:ae82 (next header: 90)
> tcp connect [fe80:0:0:0:204:2519:1801:ae82]
2023-07-02 21:05:57,573 # tcp connect [fe80:0:0:0:204:2519:1801:ae82]
2023-07-02 21:05:57,577 # Error: no port or illegal port value provided
> tcp connect [fe80:0:0:0:204:2519:1801:ae82]:1234
2023-07-02 21:06:03,403 # tcp connect [fe80:0:0:0:204:2519:1801:ae82]:1234
> tcp send 09864abcdef
2023-07-02 21:06:15,689 # tcp send 09864abcdef
2023-07-02 21:06:15,693 # Success: send 6 byte over TCP to server
> tcp disconnect
2023-07-02 21:06:28,698 # tcp disconnect
>

@maribu
Copy link
Member

maribu commented Jul 2, 2023

Is this still a draft, or ready for review?

@miri64
Copy link
Member Author

miri64 commented Jul 2, 2023

This is still a draft, since 2.2.0 is still a release candidate, as explained in OP.

@miri64
Copy link
Member Author

miri64 commented Jul 2, 2023

(I just wanted to test as early as possible to report possible bugs back to lwIP before the next RC)

@miri64
Copy link
Member Author

miri64 commented Sep 26, 2023

2.2.0 came out last night, so this is ready for review.

I did not test 6LoWPAN or IPv4 with tests/pkg/lwip yet

@miri64 miri64 marked this pull request as ready for review September 26, 2023 08:20
@miri64
Copy link
Member Author

miri64 commented Sep 26, 2023

And rebased to current master.

@miri64
Copy link
Member Author

miri64 commented Sep 26, 2023

Tested IPv4 and IPv6 dual stack support (and IPv4 alone, but not shown) on native:

Server
RIOT native interrupts/signals initialized.
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2023.10-devel-310-g2cbdd6-pkg/enh/lwip-2.2.0)
RIOT lwip test application
> ip server start 254
ip server start 254
Success: started IP server on protocol 254
> Received IP data from [10.0.0.166]:
00000000  AB  CD  EF
ifconfig
ifconfig
Iface ET0 HWaddr: da:27:1d:a8:64:24 Link: up State: up
        Link type: wired
        inet addr: 10.0.0.167 mask: 255.255.255.0 gw: 10.0.0.1
        inet6 addr: fe80:0:0:0:d827:1dff:fea8:6424 scope: link state: valid preferred
> Received IP data from [fe80::e0bc:7dff:fecb:f550]:
00000000  12  34  56
udp server start 1337
udp server start 1337
Success: started UDP server on port 1337
> Received UDP data from [fe80::e0bc:7dff:fecb:f550]:49153
00000000  AB  CD  EF
Received UDP data from [a00:a6::]:49154
00000000  12  34  56  78  90
tcp server start 4321
tcp server start 4321
Success: started TCP server on port 4321
> TCP client [a00:a6::]:49153 connected
Received TCP data from client [a00:a6::]:49153
00000000  76  54  32  10
TCP connection to [a00:a6::]:49153 reset
TCP client [fe80::e0bc:7dff:fecb:f550]:49154 connected
Received TCP data from client [fe80::e0bc:7dff:fecb:f550]:49154
00000000  AB  CD  EF
Client
RIOT native interrupts/signals initialized.
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2023.10-devel-310-g2cbdd6-pkg/enh/lwip-2.2.0)
RIOT lwip test application
> ip send 10.0.0.167 254 abcdef
ip send 10.0.0.167 254 abcdef
Success: send 3 byte over IPv4 to 10.0.0.167 (next header: 254)
> ip send fe80:0:0:0:d827:1dff:fea8:6424 254 123456
ip send fe80:0:0:0:d827:1dff:fea8:6424 254 123456
Success: send 3 byte over IPv6 to fe80:0:0:0:d827:1dff:fea8:6424 (next header: 254)
> udp send [fe80:0:0:0:d827:1dff:fea8:6424]:1337 abcdef 
udp send [fe80:0:0:0:d827:1dff:fea8:6424]:1337 abcdef 
Success: send 3 byte over UDP to [fe80:0:0:0:d827:1dff:fea8:6424]:1337
> udp send 10.0.0.167:1337 123456789
udp send 10.0.0.167:1337 123456789
Success: send 5 byte over UDP to 10.0.0.167:1337
> tcp connect 10.0.0.167:4321
tcp connect 10.0.0.167:4321
> tcp send 7654321
tcp send 7654321
Success: send 4 byte over TCP to server
> tcp disconnect
tcp disconnect
> tcp connect [fe80:0:0:0:d827:1dff:fea8:6424]:4321
tcp connect [fe80:0:0:0:d827:1dff:fea8:6424]:4321
> tcp send abcdef
tcp send abcdef
Success: send 3 byte over TCP to server

@OlegHahm
Copy link
Member

I can confirm that DHCP and TCP on IPv4 are still working (at least on native).

@OlegHahm
Copy link
Member

SLAAC and TCP over IPv6 seems to work as well.

@miri64
Copy link
Member Author

miri64 commented Sep 26, 2023

Tested 6LoWPAN on IoT-LAB

ifconfig
1695749951.650992;m3-98;ifconfig
1695749951.651219;m3-98;Iface L60 HWaddr: 5e:ee:17:70:cd:ab:7b:a9 Link: up State: up
1695749951.651341;m3-98;        Link type: wireless
1695749951.651476;m3-99;ifconfig
1695749951.651567;m3-99;Iface L60 HWaddr: 5a:ec:05:b2:53:d9:89:1f Link: up State: up
1695749951.651661;m3-99;        Link type: wireless
1695749951.666691;m3-98;        inet6 addr: fe80:0:0:0:5cee:1770:cdab:7ba9 scope: link state: valid preferred
1695749951.666943;m3-99;        inet6 addr: fe80:0:0:0:58ec:5b2:53d9:891f scope: link state: valid preferred
m3-98;ip server start 254
1695749965.681974;m3-98;> ip server start 254
1695749965.682214;m3-98;Success: started IP server on protocol 254
m3-99;ip send fe80:0:0:0:5cee:1770:cdab:7ba9 254 09764321092107435421abcdef
1695749982.752887;m3-99;> ip send fe80:0:0:0:5cee:1770:cdab:7ba9 254 09764321092107435421abcdef
1695749982.753129;m3-99;Success: send 13 byte over IPv6 to fe80:0:0:0:5cee:1770:cdab:7ba9 (next header: 254)
1695749982.768953;m3-98;> Received IP data from [fe80::58ec:5b2:53d9:891f]:
1695749982.769171;m3-98;00000000  09  76  43  21  09  21  07  43  54  21  AB  CD  EF
m3-98;udp server start 1337
1695750000.799548;m3-98;udp server start 1337
1695750000.799797;m3-98;Success: started UDP server on port 1337
m3-99;udp send fe80:0:0:0:5cee:1770:cdab:7ba9 1337 0987643210987654321098764321098764321abcdef065432107654321
1695750031.885746;m3-99;> udp send fe80:0:0:0:5cee:1770:cdab:7ba9 1337 0987643210987654321098764321098764321abcdef065432107654321
1695750031.885990;m3-99;Error: unable to parse destination address
m3-99;udp send [fe80:0:0:0:5cee:1770:cdab:7ba9]:1337 0987643210987654321098764321098764321abcdef065432107654321
1695750044.444933;m3-99;> udp send [fe80:0:0:0:5cee:1770:cdab:7ba9]:1337 0987643210987654321098764321098764321abcef065432107654321
1695750044.445479;m3-99;Success: send 29 byte over UDP to [fe80:0:0:0:5cee:1770:cdab:7ba9]:1337
1695750044.460588;m3-98;> Received UDP data from [fe80::58ec:5b2:53d9:891f]:49153
1695750044.460838;m3-98;00000000  09  87  64  32  10  98  76  54  32  10  98  76  43  21  09  87
1695750044.460975;m3-98;00000010  64  32  1A  BC  EF  06  54  32  10  76  54  32  10
m3-98;tcp server start 5432
1695750186.787138;m3-98;> tcp server start 5432
1695750186.787382;m3-98;Success: started TCP server on port 5432
m3-99;tcp connect [fe80:0:0:0:5cee:1770:cdab:7ba9]:5432
1695750192.531585;m3-99;> tcp connect [fe80:0:0:0:5cee:1770:cdab:7ba9]:5432
1695750192.546721;m3-98;> TCP client [fe80::58ec:5b2:53d9:891f]:49153 connected
m3-98;tcp send 0987
1695750196.418395;m3-98;tcp send 0987
1695750196.418646;m3-98;could not send
m3-99;tcp send 0987
1695750207.233888;m3-98;> Received TCP data from client [fe80::58ec:5b2:53d9:891f]:49153
1695750207.234220;m3-98;00000000  09  87
1695750207.234439;m3-99;> tcp send 0987
1695750207.234547;m3-99;Success: send 2 byte over TCP to server
m3-99;tcp send 097654323467898765432134567898765432345678
1695750215.634099;m3-99;> tcp send 097654323467898765432134567898765432345678
1695750215.649228;m3-98;Received TCP data from client [fe80::58ec:5b2:53d9:891f]:49153
1695750215.649445;m3-98;00000000  09  76  54  32  34  67  89  87  65  43  21  34  56  78  98  76
1695750215.649628;m3-98;00000010  54  32  34  56  78
1695750215.650165;m3-99;Success: send 21 byte over TCP to server

@OlegHahm OlegHahm self-requested a review September 26, 2023 18:40
@miri64
Copy link
Member Author

miri64 commented Sep 26, 2023

bors merge

bors bot added a commit that referenced this pull request Sep 26, 2023
19780: lwip: bump to v2.2.0 r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@bors
Copy link
Contributor

bors bot commented Sep 26, 2023

Build failed:

@miri64
Copy link
Member Author

miri64 commented Sep 27, 2023

Seems unrelated.

/tmp/dwq.0.2341808353924658/6db7da43ae8df7224e1b7a5d20a77a24/build/tests_unittests.elf: _native_popsig: real_read: Bad file descriptor

Let's retry: bors merge

@miri64
Copy link
Member Author

miri64 commented Sep 27, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 27, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit fe2aee5 into RIOT-OS:master Sep 27, 2023
@miri64 miri64 deleted the pkg/enh/lwip-2.2.0 branch September 27, 2023 11:46
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants