HIL: measure device-to-host iperf rate for net_lwip_webserver
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot, testing
Research direction
Start by reading check_iperf in test/hil/net_test.py and the cited lwiperf_tcp_recv in lib/lwip/src/apps/lwiperf/lwiperf.c; reproduce the reverse-mode failure and inspect the initial TCP segments with tcpdump in the board's network namespace. Choose and implement a device-to-host measurement approach, then confirm the check accepts only a complete CSV report and reports both rx and tx rates.
Written by the indexing model from the issue text.
Description
The device/net_lwip_webserver HIL cell reports only the host-to-device TCP rate (#3918). Device-to-host is not measured: both iperf 2 modes that make lwiperf send fail against the rigs' iperf 2.2.1.
Evidence
ci.lan stm32f407disco (FS), net_lwip_webserver at 26adc208a+#3918, iperf 2.2.1 (4 Nov 2024) inside the board's network namespace (host 192.168.7.2, device 192.168.7.1), 2026-11-10:
$ iperf -c 192.168.7.1 -t 3 -y C
20261110074851,192.168.7.2,38608,192.168.7.1,5001,1,0.0-3.3,1441856,3538660 # host->device works
$ iperf -c 192.168.7.1 -t 3 -r
[ 1] tcp write failed
[ 1] shutdown failed: Transport endpoint is not connected
[ 1] 0.0000-0.0127 sec 74.1 KBytes 47.9 Mbits/sec
ERROR: expected reverse connect did not occur # rc 0
$ iperf -c 192.168.7.1 -t 3 -d -y C
[ 1] tcp write failed
20261110074859,192.168.7.2,52588,192.168.7.1,5001,1,0.0-0.0,75920,87921250
20261110074903,192.168.7.1,49153,192.168.7.2,5001,2,0.0-4.0,24,48 # rc 0
-e -r fails the same way. In both modes the device drops the client's connection after ~74 KB, before the 128 KiB header recheck in lwiperf_tcp_recv (lib/lwip/src/apps/lwiperf/lwiperf.c), and its reverse leg sends only the 24-byte header. Not root-caused: the likely cause is iperf 2.1+'s extended client header, which lwiperf (written for iperf 2.0.5) does not parse. iperf 2.1+'s -R reverse uses a protocol flag lwiperf does not support.
Remaining work
- Confirm the cause, e.g. tcpdump in the namespace of the first segments of a
-rrun. - Pick a way to measure device-to-host, then add it to
check_iperfintest/hil/net_test.py(the cell becomesrx/tx). Options:- make lwiperf accept iperf 2.1+'s header (a patch to the lwIP dependency);
- have the firmware start
lwiperf_start_tcp_clienttoward a hostiperf -son request; - serve a large generated HTTP body and time its download.
- Keep
check_iperf's rule that only a whole CSV report counts: iperf 2 exits 0 on all the failures above.
- Dominant language
- C
- Stars
- 7.3k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 67
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
area9innovation/flow9#1805 ·
Maintainers usually reply within 3 days
-
AI:Robustness triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open5gs/open5gs#5246 · 1 comment ·
Maintainers usually reply within 1 day