]> git.kaiwu.me - haproxy.git/commit
MINOR: quic: Do not consume the RX buffer on QUIC sock i/o handler side
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 27 Jan 2022 10:31:50 +0000 (11:31 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 27 Jan 2022 15:37:55 +0000 (16:37 +0100)
commit37ae505c217106c5686f4dfc62cff31d6e051724
treeb55bd7c280a805c99b0422f0ab0b2b07015fc363
parent794d068d8fbe37fe6fb4803c52ae01544f9f0139
MINOR: quic: Do not consume the RX buffer on QUIC sock i/o handler side

Rename quic_lstnr_dgram_read() to quic_lstnr_dgram_dispatch() to reflect its new role.
After calling this latter, the sock i/o handler must consume the buffer only if
the datagram it received is detected as wrong by quic_lstnr_dgram_dispatch().
The datagram handler task mark the datagram as consumed atomically setting ->buf
to NULL value. The sock i/o handler is responsible of flushing its RX buffer
before using it. It also keeps a datagram among the consumed ones so that
to pass it to quic_lstnr_dgram_dispatch() and prevent it from allocating a new one.
include/haproxy/xprt_quic-t.h
include/haproxy/xprt_quic.h
src/quic_sock.c
src/xprt_quic.c