]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: remove duplicate hdshk/app send functions
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Apr 2024 16:04:32 +0000 (18:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 09:07:35 +0000 (11:07 +0200)
commit7fc1ce5bc85ff81deb6b58d2328c31dbf1b4f917
tree349a6e9fe5a95147d63c95478f640c7e6f12d14c
parent4e4127a66dd8f541e37d2933d6130b4090bbb288
MEDIUM: quic: remove duplicate hdshk/app send functions

A series of previous patches have clean up sending function for
handshake case. Their new exposed API is now flexible enough to convert
app case to use the same functions.

As such, qc_send_hdshk_pkts() is renamed qc_send() and become the single
entry point for QUIC emission. It is used during application packets
emission in quic_conn_app_io_cb(), qc_send_mux(). Also the internal
function qc_prep_hpkts() is renamed qc_prep_pkts().

Remove the new unneeded qc_send_app_pkts() and qc_prep_app_pkts().

Also removed qc_send_app_probing(). It was a simple wrapper over other
application send functions. Now, default qc_send() can be reuse for such
cases with <old_data> argument set to true.

An adjustment was needed when converting qc_send_hdshk_pkts() to the
general qc_send() version. Previously, only a single packets
encoding/emission cycle was performed. This was enough as handshake
packets are always smaller than Tx buffer. However, it may be possible
to emit more application data. As such, a loop is necessary to perform
multiple encoding/emission cycles, as this was already the case in
qc_send_app_pkts().

No functional difference should happen with this commit. However, as
these are critcal functions with a lot of changes, this patch is
labelled as medium.
include/haproxy/quic_tx.h
src/quic_conn.c
src/quic_tx.c