haproxy/src
Amaury Denoyelle 00a3e5f786 MAJOR: mux-quic: remove intermediary Tx buffer
Previously, QUIC MUX sending was implemented with data transfered along
two different buffer instances per stream.

The first QCS buffer was used for HTX blocks conversion into H3 (or
other application protocol) during snd_buf stream callback. QCS instance
is then registered for sending via qcc_io_cb().

For each sending QCS, data memcpy is performed from the first to a
secondary buffer. A STREAM frame is produced for each QCS based on the
content of their secondary buffer.

This model is useful for QUIC MUX which has a major difference with
other muxes : data must be preserved longer, even after sent to the
lower layer. Data references is shared with quic-conn layer which
implements retransmission and data deletion on ACK reception.

This double buffering stages was the first model implemented and remains
active until today. One of its major drawbacks is that it requires
memcpy invocation for every data transferred between the two buffers.
Another important drawback is that the first buffer was is allocated by
each QCS individually without restriction. On the other hand, secondary
buffers are accounted for the connection. A bottleneck can appear if
secondary buffer pool is exhausted, causing unnecessary haproxy
buffering.

The purpose of this commit is to completely break this model. The first
buffer instance is removed. Now, application protocols will directly
allocate buffer from qc_stream_desc layer. This removes completely the
memcpy invocation.

This commit has a lot of code modifications. The most obvious one is the
removal of <qcs.tx.buf> field. Now, qcc_get_stream_txbuf() returns a
buffer instance from qc_stream_desc layer. qcs_xfer_data() which was
responsible for the memcpy between the two buffers is also completely
removed. Offset fields of QCS and QCC are now incremented directly by
qcc_send_stream(). These values are used as boundary with flow control
real offset to delimit the STREAM frames built.

As this change has a big impact on the code, this commit is only the
first part to fully support single buffer emission. For the moment, some
limitations are reintroduced and will be fixed in the next patches :

* on snd_buf if QCS sent buffer in used has room but not enough for the
  application protocol to store its content
* on snd_buf if QCS sent buffer is NULL and allocation cannot succeeds
  due to connection pool exhaustion

One final important aspect is that extra care is necessary now in
snd_buf callback. The same buffer instance is referenced by both the
stream and quic-conn layer. As such, some operation such as realign
cannot be done anymore freely.
2024-01-31 16:28:54 +01:00
..
acl.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
action.c MINOR: support for http-request set-timeout client 2023-09-28 08:49:22 +02:00
activity.c MINOR: activity: report profiling duration and age in "show profiling" 2023-11-14 11:46:37 +01:00
applet.c MINOR: applets: Use channel's field to compute amount of data received 2023-12-06 10:24:41 +01:00
arg.c
auth.c
backend.c MINOR: backend: export get_server_*() functions 2024-01-02 11:44:42 +01:00
base64.c
cache.c BUG/MEDIUM: cache: Fix crash when deleting secondary entry 2024-01-24 18:01:30 +01:00
calltrace.c
cbuf.c
cfgcond.c
cfgdiag.c
cfgparse-global.c BUG/MINOR: ext-check: cannot use without preserve-env 2023-12-08 14:26:06 +01:00
cfgparse-listen.c BUG/MINOR: cfgparse-listen: fix warning being reported as an alert 2023-12-01 09:09:45 +01:00
cfgparse-quic.c BUG/MINOR: quic: newreno QUIC congestion control algorithm no more available 2024-01-25 08:02:41 +01:00
cfgparse-ssl.c MEDIUM: ssl: implements 'default-crt' keyword for bind Lines 2024-01-12 17:40:42 +01:00
cfgparse-tcp.c BUG/MINOR: cfgparse-tcp: leak when re-declaring interface from bind line 2023-06-06 15:15:17 +02:00
cfgparse-unix.c
cfgparse.c BUG/MINOR: server: fix server_find_by_name() usage during parsing 2024-01-02 15:52:47 +01:00
channel.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
check.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
chunk.c MEDIUM: init: initialize the trash earlier 2023-09-08 16:25:19 +02:00
cli.c CLEANUP: mworker/cli: add comments about pcli_find_and_exec_kw() 2023-12-07 18:04:41 +01:00
clock.c
compression.c MINOR: compression/slz: add support for a pure flush of pending bytes 2023-06-30 16:12:36 +02:00
connection.c MINOR: connection: add sample fetches to report per-connection glitches 2024-01-18 17:21:44 +01:00
cpuset.c REORG: cpuset: move parse_cpu_set() and parse_cpumap() to cpuset.c 2023-09-08 16:25:19 +02:00
debug.c MINOR: debug: add features and build options to "show dev" 2024-01-02 11:44:42 +01:00
dgram.c MINOR: dgram: allow to set rcv/sndbuf for dgram sockets as well 2023-10-18 17:01:19 +02:00
dict.c
dns.c
dynbuf.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
eb32sctree.c
eb32tree.c
eb64tree.c
ebimtree.c
ebistree.c
ebmbtree.c
ebpttree.c
ebsttree.c
ebtree.c
errors.c MEDIUM: errors: move the MODE_QUIET test in print_message() 2023-11-09 14:39:11 +01:00
ev_epoll.c
ev_evports.c
ev_kqueue.c
ev_poll.c
ev_select.c
event_hdl.c MINOR: event_hdl: add global tunables 2023-11-29 08:59:27 +01:00
extcheck.c MINOR: ext-check: add an option to preserve environment variables 2023-11-23 16:53:57 +01:00
fcgi-app.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
fcgi.c
fd.c
filters.c Revert "MINOR: filter: "filter" requires TCP or HTTP mode" 2023-11-18 11:16:21 +01:00
fix.c
flt_bwlim.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
flt_http_comp.c BUG/MINOR: compression: possible NULL dereferences in comp_prepare_compress_request() 2023-11-29 08:59:27 +01:00
flt_spoe.c BUG/MEDIUM: spoe: Never create new spoe applet if there is no server up 2024-01-05 17:28:50 +01:00
flt_trace.c
freq_ctr.c BUG/MEDIUM: freq-ctr: Don't report overshoot for long inactivity period 2023-11-08 16:38:06 +01:00
frontend.c MINOR: frontend: implement a dedicated actconn increment function 2023-10-26 15:18:48 +02:00
h1_htx.c BUG/MINOR: h1-htx: properly initialize the err_pos field 2024-01-31 15:22:12 +01:00
h1.c CLEANUP: h1: remove unused function h1_measure_trailers() 2024-01-31 15:22:12 +01:00
h2.c MINOR: h2: Set the BODYLESS_RESP flag on the HTX start-line if necessary 2023-10-17 18:51:13 +02:00
h3_stats.c
h3.c MAJOR: mux-quic: remove intermediary Tx buffer 2024-01-31 16:28:54 +01:00
haproxy.c [RELEASE] Released version 3.0-dev1 2024-01-06 14:09:35 +01:00
hash.c
hlua_fcn.c MEDIUM: server: make server_set_inetaddr() updater serializable 2023-12-21 14:22:27 +01:00
hlua.c CLEANUP: hlua: fix indent, remove extra return in hlua_core_get_var() 2024-01-24 16:27:47 +01:00
hpack-dec.c
hpack-enc.c
hpack-huff.c
hpack-tbl.c
hq_interop.c MAJOR: mux-quic: remove intermediary Tx buffer 2024-01-31 16:28:54 +01:00
http_acl.c
http_act.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
http_ana.c MEDIUM: http_act: check status codes against the bit fields for err/fail 2024-01-11 15:10:08 +01:00
http_client.c DEBUG: unstatify a few functions that are often present in backtraces 2023-11-30 17:15:54 +01:00
http_conv.c
http_ext.c BUG/MINOR: http_ext: unhandled ERR_ABORT in proxy_http_parse_7239() 2023-07-06 15:41:17 +02:00
http_fetch.c MINOR: http-fetch: Add a sample to get the transaction status code 2023-11-29 11:11:12 +01:00
http_htx.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
http_rules.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
http.c MEDIUM: http: add the ability to redefine http-err-codes and http-fail-codes 2024-01-11 15:10:08 +01:00
htx.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
init.c
jwt.c
lb_chash.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
lb_fas.c
lb_fwlc.c
lb_fwrr.c
lb_map.c
linuxcap.c MEDIUM: capabilities: enable support for Linux capabilities 2023-08-29 11:11:50 +02:00
listener.c MINOR: rhttp: mark reverse HTTP as experimental 2023-11-30 15:04:27 +01:00
log.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
lru.c
mailers.c
map.c MINOR: map: add map_*_key converters to provide the matching key 2023-12-21 14:22:27 +01:00
mjson.c
mqtt.c
mux_fcgi.c MINOR: muxes: Implement ->sctl() callback for muxes and return the stream id 2023-11-29 11:11:12 +01:00
mux_h1.c CLEANUP: mux-h1: Fix a trace message about C-L header addition 2023-12-13 16:45:29 +01:00
mux_h2.c MINOR: mux-h2: implement MUX_CTL_GET_GLITCHES 2024-01-18 17:21:44 +01:00
mux_pt.c MINOR: mux-pt: Add global option to enable/disable zero-copy forwarding 2023-12-04 15:32:32 +01:00
mux_quic.c MAJOR: mux-quic: remove intermediary Tx buffer 2024-01-31 16:28:54 +01:00
mworker-prog.c
mworker.c MINOR: mworker/cli: implement hard-reload over the master CLI 2023-11-24 21:44:25 +01:00
namespace.c BUG/MINOR: namespace: missing free in netns_sig_stop() 2023-06-14 11:27:29 +02:00
ncbuf.c
pattern.c MINOR: map: mapfile ordering also matters for tree-based match types 2024-01-11 11:13:54 +01:00
payload.c MEDIUM: tree-wide: fetches that may return IPV4+IPV6 now return ADDR 2023-07-03 16:32:01 +02:00
peers.c MINOR: peers: rely on srv->addr and remove peer->addr 2023-12-21 14:22:27 +01:00
pipe.c
pool.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
proto_quic.c CLEANUP: Re-apply xalloc_size.cocci (3) 2023-11-06 20:49:56 +01:00
proto_rhttp.c CLEANUP: assorted typo fixes in the code and comments 2024-01-02 10:19:48 +01:00
proto_sockpair.c
proto_tcp.c
proto_udp.c MEDIUM: udp: allow to retrieve the frontend destination address 2024-01-02 11:44:42 +01:00
proto_uxdg.c
proto_uxst.c
protocol.c MINOR: quic+openssl_compat: Do not start without "limited-quic" 2023-08-17 15:44:03 +02:00
proxy.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
qmux_http.c MEDIUM: mux-quic: add BUG_ON if sending on locally closed QCS 2023-12-21 15:42:08 +01:00
qmux_trace.c MINOR: mux-quic: remove unneeded sent-offset fields 2024-01-31 16:28:54 +01:00
qpack-dec.c
qpack-enc.c BUG/MEDIUM: qpack: allow 6xx..9xx status codes 2024-01-29 15:40:19 +01:00
qpack-tbl.c
queue.c
quic_ack.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_cc_cubic.c MINOR: quic: Stop hardcoding a scale shifting value (CUBIC_BETA_SCALE_FACTOR_SHIFT) 2024-01-25 08:02:41 +01:00
quic_cc_newreno.c REORG: quic: Move QUIC path definitions/declarations to quic_cc module 2023-11-28 15:37:50 +01:00
quic_cc_nocc.c REORG: quic: Move QUIC path definitions/declarations to quic_cc module 2023-11-28 15:37:50 +01:00
quic_cc.c
quic_cid.c CLEANUP: quic_cid: remove unused listener arg 2023-11-30 15:04:27 +01:00
quic_cli.c REORG: quic: Move some QUIC CLI code to its C file 2023-11-28 15:37:22 +01:00
quic_conn.c REORG: quic: Move quic_increment_curr_handshake() to quic_sock 2023-11-28 15:47:18 +01:00
quic_fctl.c MINOR: mux-quic: define a flow control related type 2024-01-31 16:28:54 +01:00
quic_frame.c MEDIUM: quic: Heavy task mode during handshake 2023-11-09 10:32:31 +01:00
quic_loss.c REORG: quic: Rename some functions used upon ACK receipt 2023-11-28 15:37:50 +01:00
quic_openssl_compat.c BUG/MEDIUM: quic: keylog callback not called (USE_OPENSSL_COMPAT) 2024-01-16 10:17:27 +01:00
quic_retransmit.c REORG: quic: Add a new module for retransmissions 2023-11-28 15:47:18 +01:00
quic_retry.c REORG: quic: Add a new module for QUIC retry 2023-11-28 15:47:18 +01:00
quic_rx.c BUG/MEDIUM: quic: QUIC CID removed from tree without locking 2023-12-13 14:42:50 +01:00
quic_sock.c REORG: quic: Move the QUIC DCID parser to quic_sock.c 2023-11-28 15:37:50 +01:00
quic_ssl.c MEDIUM: ssl/quic: always compile the ssl_conf.early_data test 2024-01-31 11:57:54 +01:00
quic_stats.c
quic_stream.c MAJOR: mux-quic: remove intermediary Tx buffer 2024-01-31 16:28:54 +01:00
quic_tls.c BUG/MEDIUM: quic: remove unsent data from qc_stream_desc buf 2024-01-26 16:02:05 +01:00
quic_tp.c MINOR: quic: Transport parameters encoding without version_information 2024-01-23 16:03:29 +01:00
quic_trace.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
quic_tx.c REORG: quic: Add a new module for retransmissions 2023-11-28 15:47:18 +01:00
raw_sock.c MEDIUM: raw-sock: Specifiy amount of data to send via snd_pipe callback 2023-10-17 18:51:13 +02:00
regex.c
resolvers.c BUG/MEDIUM: server/dns: perform svc_port updates atomically from SRV records 2023-12-21 14:22:27 +01:00
ring.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
sample.c BUG/MINOR: jwt: fix jwt_verify crash on 32-bit archs 2024-01-24 10:35:22 +01:00
server_state.c BUG/MINOR: server-state: Avoid warning on 'file not found' 2023-07-21 15:08:27 +02:00
server.c CLEANUP: quic: Remaining useless code into server part 2024-01-04 11:16:06 +01:00
session.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
sha1.c
shctx.c BUG/MINOR: shctx: Remove old HA_SPIN_INIT 2023-11-17 16:56:18 +01:00
signal.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
sink.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
slz.c IMPORT: slz: implement a synchronous flush() operation 2023-06-30 16:12:36 +02:00
sock_inet.c
sock_unix.c BUG/MINOR: sock: mark abns sockets as non-suspendable and always unbind them 2023-11-20 11:38:26 +01:00
sock.c BUG/MINOR: sock: mark abns sockets as non-suspendable and always unbind them 2023-11-20 11:38:26 +01:00
ssl_ckch.c MEDIUM: ssl: generate '*' SNI filters for default certificates 2024-01-12 17:40:42 +01:00
ssl_crtlist.c MEDIUM: ssl: generate '*' SNI filters for default certificates 2024-01-12 17:40:42 +01:00
ssl_gencert.c REORG: ssl: move 'generate-certificates' code to ssl_gencert.c 2024-01-12 17:40:42 +01:00
ssl_ocsp.c
ssl_sample.c CLEANUP: ssl: fix indentation in smp_fetch_ssl_fc_ec() (part 2) 2024-01-09 17:27:31 +01:00
ssl_sock.c BUG/MAJOR: ssl_sock: Always clear retry flags in read/write functions 2024-01-29 15:10:24 +01:00
ssl_utils.c
stats.c BUG/MEDIUM: cli: some err/warn msg dumps add LR into CSV output on stat's CLI 2024-01-24 08:38:59 +01:00
stconn.c BUG/MEDIUM: stconn: Forward shutdown on write timeout only if it is forwardable 2024-01-05 17:28:06 +01:00
stick_table.c BUILD: stick-table: fix build error on 32-bit platforms 2024-01-21 08:21:35 +01:00
stream.c DEBUG: stream: Report lra/fsb values for front end back SC in stream dump 2023-12-01 11:25:49 +01:00
task.c CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
tcp_act.c MINOR: rhttp: mark reverse HTTP as experimental 2023-11-30 15:04:27 +01:00
tcp_rules.c MINOR: log/backend: prevent tcp-{request,response} use with LOG mode 2023-11-18 11:16:21 +01:00
tcp_sample.c MINOR: sample: accept_date / request_date return %Ts / %tr timestamp values 2023-07-24 17:12:29 +02:00
tcpcheck.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
thread.c MEDIUM: cache: Use dedicated cache tree lock alongside shctx lock 2023-11-16 19:35:10 +01:00
time.c
tools.c BUG/MEDIUM: cli: some err/warn msg dumps add LR into CSV output on stat's CLI 2024-01-24 08:38:59 +01:00
trace.c MINOR: trace: support -dt optional format 2023-11-27 17:15:14 +01:00
uri_auth.c
uri_normalizer.c
vars.c CLEANUP: log: deinitialization of the log buffer in one function 2024-01-30 08:27:26 +01:00
version.c
wdt.c
xprt_handshake.c
xprt_quic.c BUG/MAJOR: quic: complete thread migration before tcp-rules 2023-11-20 16:11:26 +01:00