Skip to content

netutils: introduce QUIC support through ngtcp2 library - #4012

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
goandrei:ngtcp2_integration
Nov 19, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
goandrei:ngtcp2_integration

Conversation

@goandrei

Copy link
Copy Markdown
Contributor

Summary

This PR introduces support for ngtcp2 library which implements the QUIC protocol following RFC9000. As a crypto engine, this change uses the already present wolfssl library.

In short, the changes:

  • update wolfssl makefile to build source files required by QUIC
  • enforce WOLFSSL_VERSION when cloning wolfssl
  • add QUIC specific macro definitions in wolfssl's user_settings.h file
  • introduce netutils/ngtcp2 with tipical required files

Impact

The change is guarded by a new Kconfig called NETUTILS_QUIC which is set to false by default. Only if enabled, ngtcp2 will be built.

Testing

To build this, I used the esp32-devkitc:nsh configuration. No other testing was done since I did not introduce any example binary yet. I am planning to add this in a future PR.

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

Comment thread netutils/ngtcp2/CMakeLists.txt Resolved
Comment thread netutils/ngtcp2/Kconfig Resolved
Comment thread netutils/ngtcp2/Makefile Resolved
Comment thread netutils/ngtcp2/Makefile Resolved
Comment thread netutils/ngtcp2/CMakeLists.txt Resolved
@goandrei goandrei changed the title Introduce QUIC support through ngtcp2 library netutils: introduce QUIC support through ngtcp2 library Nov 14, 2026
@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@goandrei please fix https://github.com/apache/nuttx-apps/actions/runs/43474208459/job/132394474279?pr=4012:

../nuttx/tools/checkpatch.sh -c -u -m -g 286c81002998664488435aa7240c0f3671dc7a7f..HEAD
Used config files:
    1: .codespellrc
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:22:0: error: C++ style comment
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:22:75: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:23:0: error: C++ style comment
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:23:3: error: Mixed case identifier found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:23:12: error: Mixed case identifier found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:24:0: error: C++ style comment
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:24:75: error: Operator/assignment must be preceded with whitespace
Warning: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/wolfssl/user_settings.h:26:1: warning: #include outside of 'Included Files' section
ERROR __main__.py:618: Check failed: /home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/ngtcp2/CMakeLists.txt

cmake-format check failed, run following command to update the style:
  $ cmake-format <src> -o <dst>

ERROR __main__.py:618: Check failed: /home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/ngtcp2/CMakeLists.txt
crypto/wolfssl/Makefile: error: Makefile modified but crypto/CMakeLists.txt was not updated.
Please maintain build-system parity between Make and CMake.
If this is a Make-only change, include '[skip-cmake-parity]' in the commit message.
Some checks failed. For contributing guidelines, see:
  https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md

@goandrei

Copy link
Copy Markdown
Contributor Author

Linting should pass now :

agorneanu@macair nuttx-apps % ../nuttx/tools/checkpatch.sh -c -u -m -g 286c81002998664488435aa7240c0f3671dc7a7f..HEAD

Used config files:
    1: .codespellrc
✔️  All checks pass.

Comment thread netutils/ngtcp2/Makefile Resolved
Comment thread netutils/ngtcp2/CMakeLists.txt Resolved
Comment thread netutils/ngtcp2/CMakeLists.txt Resolved
Comment thread crypto/wolfssl/user_settings.h Resolved
This commit is adding support for ngtcp2, a QUIC implementation
following the RFC9000. In order to benefit from the existing
wolfssl crypto backend, the library build process was adapted
to include QUIC support when the ngtcp2 flag is enabled.

[skip-cmake-parity] - no CMake file implemented for wolfssl

Signed-off-by: Andrei Gorneanu <andreigorneanu@gmail.com>
@goandrei

Copy link
Copy Markdown
Contributor Author

The build seems to fail due to some unrelated reason :

[1/5] cd /github/workspace/sources/nuttx/build/libs/libc/misc && /usr/local/bin/cmake -E touch /github/workspace/sources/nuttx/libs/libc/misc/lib_utsname.c
[2/5] Linking CXX executable nuttx
FAILED: nuttx 
: && /tools/ccache/bin/arm-none-eabi-g++  --specs=nosys.specs   -Wl,--print-memory-usage -Wl,--entry=__start -nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map @CMakeFiles/nuttx.rsp -o nuttx  && :
/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: nuttx section `.data' will not fit in region `flash'
/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 8 bytes
Memory region         Used Size  Region Size  %age Used
           flash:      131080 B       128 KB    100.01%
            sram:       10016 B        22 KB     44.46%
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
cp: cannot stat 'nuttx.hex': No such file or directory
cp: cannot stat 'nuttx.bin': No such file or directory
cp: cannot stat 'nuttx.hex': No such file or directory
cp: cannot stat 'nuttx.bin': No such file or directory
   TOOLS_DIR path is "/github/workspace/sources/nuttx"
   HOST = Linux
/github/workspace/sources/nuttx /github/workspace/sources/nuttx
On branch master
Your branch is up to date with 'origin/master'.

Is there any way I can reschedule only this run?

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

The build seems to fail due to some unrelated reason :

[1/5] cd /github/workspace/sources/nuttx/build/libs/libc/misc && /usr/local/bin/cmake -E touch /github/workspace/sources/nuttx/libs/libc/misc/lib_utsname.c
[2/5] Linking CXX executable nuttx
FAILED: nuttx 
: && /tools/ccache/bin/arm-none-eabi-g++  --specs=nosys.specs   -Wl,--print-memory-usage -Wl,--entry=__start -nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map @CMakeFiles/nuttx.rsp -o nuttx  && :
/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: nuttx section `.data' will not fit in region `flash'
/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 8 bytes
Memory region         Used Size  Region Size  %age Used
           flash:      131080 B       128 KB    100.01%
            sram:       10016 B        22 KB     44.46%
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
cp: cannot stat 'nuttx.hex': No such file or directory
cp: cannot stat 'nuttx.bin': No such file or directory
cp: cannot stat 'nuttx.hex': No such file or directory
cp: cannot stat 'nuttx.bin': No such file or directory
   TOOLS_DIR path is "/github/workspace/sources/nuttx"
   HOST = Linux
/github/workspace/sources/nuttx /github/workspace/sources/nuttx
On branch master
Your branch is up to date with 'origin/master'.

Is there any way I can reschedule only this run?

this problem was fixed, let retrigger ci.

@xiaoxiang781216
xiaoxiang781216 merged commit ac81beb into apache:master Nov 19, 2026
165 of 189 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants