Skip to content

quic upload improvements - #22669

Closed
icing wants to merge 6 commits into
curl:masterfrom
icing:vquic-ecn-support
Closed

icing wants to merge 6 commits into
curl:masterfrom
icing:vquic-ecn-support

Conversation

@icing

@icing icing commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

quic: various improvements

  • set sockopt to receive ECN
  • set socktop to dontfrag
  • vquic: provide ECN on receive to callbacks
  • ngtcp2: manage sendbuf more carefully, do not add more than QUIC can keep in flight

@icing

icing commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@vszakats I need some help with cmake detecting <netinet/ip.h>. I tried to add the magic incantations to CMakeLists.txt, but it seems to have been a miss.

Update: found it!

@icing
icing marked this pull request as ready for review August 25, 2026 13:38
@icing
icing requested a review from bagder August 25, 2026 13:38
@bagder
bagder requested a balanced review from Copilot August 25, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves QUIC packet metadata handling and ngtcp2 upload buffering.

Changes:

  • Enables ECN reception and IP fragmentation controls.
  • Propagates ECN metadata through QUIC receive callbacks.
  • Adds adaptive ngtcp2 in-flight upload limits.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CMakeLists.txt Detects netinet/ip.h.
configure.ac Adds Autoconf header detection.
lib/curl_config-cmake.h.in Exposes the header feature macro.
lib/cf-socket.c Configures ECN and fragmentation socket options.
lib/vquic/vquic.c Extracts and forwards received ECN metadata.
lib/vquic/vquic_int.h Updates the receive callback ECN type.
lib/vquic/cf-quiche.c Adopts the callback signature.
lib/vquic/cf-ngtcp2.c Adds adaptive upload buffering.
lib/vquic/cf-ngtcp2-proxy.c Renames in-flight tracking fields.
lib/vquic/cf-ngtcp2-cmn.h Defines upload-buffer state and defaults.
lib/vquic/cf-ngtcp2-cmn.c Initializes state and forwards ECN to ngtcp2.
Suppressed comments (1)

lib/vquic/vquic.c:905

  • This receive path has the same ancillary-buffer regression as recvmmsg: with both IP_RECVTOS and UDP_GRO enabled, msg_ctrl has room for only one cmsg. Losing the GRO cmsg causes an aggregated datagram to be passed as a single QUIC packet. Allocate space for both the TOS and GRO control messages before extracting them here.
    ecn = vquic_msghdr_get_ecn(&msg, remote_addr.ss_family);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/vquic/vquic.c Outdated
Comment thread lib/vquic/vquic.c
Comment thread lib/vquic/cf-ngtcp2.c
Comment thread configure.ac Outdated
Comment on lines +4082 to +4084
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif

Since this isn't needed by other detections, we can drop this I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try if you think it's worth it. A bit stressed for time right now.

Comment thread lib/vquic/vquic.c Outdated
Comment thread CMakeLists.txt Outdated
@vszakats

vszakats commented Aug 25, 2026

Copy link
Copy Markdown
Member

We can prefill it for Windows and Unix (for CI) to save configure time:

--- a/CMake/unix-cache.cmake
+++ b/CMake/unix-cache.cmake
@@ -202,6 +202,7 @@ else()
   set(HAVE_NETINET_IN6_H 0)
 endif()
 set(HAVE_NETINET_IN_H 1)
+set(HAVE_NETINET_IP_H 1)
 set(HAVE_NETINET_TCP_H 1)
 set(HAVE_NETINET_UDP_H 1)
 set(HAVE_NET_IF_H 1)
--- a/CMake/win32-cache.cmake
+++ b/CMake/win32-cache.cmake
@@ -112,6 +112,7 @@ set(HAVE_MEMRCHR 0)
 set(HAVE_NETDB_H 0)
 set(HAVE_NETINET_IN6_H 0)
 set(HAVE_NETINET_IN_H 0)
+set(HAVE_NETINET_IP_H 0)
 set(HAVE_NETINET_TCP_H 0)
 set(HAVE_NETINET_UDP_H 0)
 set(HAVE_NET_IF_H 0)

icing added 6 commits August 26, 2026 10:10
- set sockopt to receive ECN
- set socktop to dontfrag
- vquic: provide ECN on receive to callbacks
- ngtcp2: manage sendbuf more carefully, do not add
  more than QUIC can keep in flight
@icing
icing force-pushed the vquic-ecn-support branch from 807db43 to e98035a Compare August 26, 2026 08:26
@bagder bagder closed this in f2c03b1 Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants