MAJOR: h3: Implement zero-copy support to send DATA frame
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Oct 2023 14:41:58 +0000 (16:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Nov 2023 06:42:43 +0000 (07:42 +0100)
commit8d46a2c9738f9a819f4e8c5a147892303157a55c
tree00214bc9be2551f98700c4a99e50916a74d75ff0
parent1bcc0f8892069ad94201a04599ca8af87ba7300b
MAJOR: h3: Implement zero-copy support to send DATA frame

When possible, we try send DATA frame without copying data. To do so, we
swap the input buffer with QCS tx buffer. It is only possible iff:

 * There is only one HTX block of data at the beginning of the message
 * Amount of data to send is equal to the size of the HTX data block
 * The QCS tx buffer is empty

In this case, both buffers are swapped. The frame metadata are written at
the begining of the buffer, before data and where the HTX structure is
stored.
include/haproxy/mux_quic-t.h
src/h3.c
src/hq_interop.c
src/qmux_http.c