Skip to content

netutils: introduce QUIC support through ngtcp2 library - #4012

Open
goandrei wants to merge 1 commit into
apache:masterfrom
goandrei:ngtcp2_integration
Open

goandrei wants to merge 1 commit into
apache:masterfrom
goandrei:ngtcp2_integration

Conversation

@goandrei

Copy link
Copy Markdown

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

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
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.

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.

2 participants