[WIP] net/lwip: [EXPERIMENTAL] Add auxiliary lwIP stack for sim. - #20159
Closed
elokuucadiaN wants to merge 1 commit into
Closed
elokuucadiaN wants to merge 1 commit into
elokuucadiaN wants to merge 1 commit into
Conversation
Integrate the complete lwIP 2.0.3 source tree as an optional stack alongside NuttX networking. Add a NuttX sys_arch port, an Ethernet adapter, and a simulator L2 tap so applications can explicitly use the lwip_* socket API without replacing native NuttX socket routing. Provide sim:lwip configuration and documentation for setup and the required long-lived initialization context. The implementation is currently limited to the simulator Ethernet driver and remains experimental. Verified with a clean WSL2 Ubuntu 22.04 / GCC 11.4.0 sim:lwip build. In one simulator session, UDP delivered 16 bytes, TCP delivered 20 bytes, and a TCP transfer delivered 67108864 bytes in 4.697 seconds. Test applications are maintained outside this NuttX change. Assisted-by: Codex:gpt-5 Assisted-by: Codex:gpt-5.6-sol Signed-off-by: 21c <2022685682@qq.com>
5 tasks
Author
|
Superseded by #20160 after renaming the source branch. The signed commit and test scope are unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
net/lwip/lwip-2.0.3/COPYING.sys_archport, Ethernet link adapter, and a raw L2 tap for the simulator network driver. Applications select the prefixedlwip_*API; native NuttX socket routing is unchanged.sim:lwipconfiguration and documentation, including the requirement to initialize lwIP from a long-lived context.nuttx-appsprograms that are not included in this NuttX PR; there is no dependent apps PR.Impact
CONFIG_NET_LWIP, currently limited toARCH_BOARD_SIM && NET_PKT.lwip_*API and initialize the auxiliary stack in a persistent context.sim:lwipconfiguration; no default configuration is changed.Documentation/components/net/lwip.rstis included.Testing
Build host: WSL2 Ubuntu 22.04, x86_64, GCC 11.4.0.
Target:
sim:lwip, NuttX master basebc116157329946d2f7e6c82eb4b2d82009a41ebb; fresh export from the staged Git tree,make olddefconfig && make -j8completed successfully.Local test setup:
BOARDCTL_FINALINITdisabled and the three local test programs enabled only in the isolated build configuration. The local NSH test harness callsnuttx_lwip_initialize()from its persistent context. These test-only apps and configuration changes are not included in this PR.Runtime: Within one NSH session over a TAP interface (
10.0.1.1/24), the host receiver logged:NuttX
nxstylecompleted with no diagnostics for the ten NuttX-written/modified C and header files. The complete vendored lwIP tree is preserved verbatim;git diff --checkreports pre-existing trailing whitespace in third-party files.No physical hardware runtime result is available: the current link adapter only supports
sim. This is a draft for architecture and scope discussion, not a request to merge without meeting the project's testing requirements.PR verification self-check