haproxy/include/haproxy/quic_sock-t.h
Amaury Denoyelle 1cba8d60f3 CLEANUP: quic: improve naming for rxbuf/datagrams handling
QUIC datagrams are read from a random thread. They are then redispatch
to the connection thread according to the first packet DCID. These
operations are implemented through a special buffer designed to avoid
locking.

Refactor this code with the following changes :
* <rxbuf> type is renamed <quic_receiver_buf>. Its list element is also
  renamed to highligh its attach point to a receiver.
* <quic_dgram> and <quic_receiver_buf> definition are moved to
  quic_sock-t.h. This helps to reduce the size of quic_conn-t.h.
* <quic_dgram> list elements are renamed to highlight their attach point
  into a <quic_receiver_buf> and a <quic_dghdlr>.

This should be backported up to 2.6.
2022-10-13 11:06:48 +02:00

22 lines
744 B
C

#ifndef _HAPROXY_QUIC_SOCK_T_H
#define _HAPROXY_QUIC_SOCK_T_H
#ifdef USE_QUIC
/* QUIC connection accept queue. One per thread. */
struct quic_accept_queue {
struct mt_list listeners; /* QUIC listeners with at least one connection ready to be accepted on this queue */
struct tasklet *tasklet; /* task responsible to call listener_accept */
};
/* Buffer used to receive QUIC datagrams on random thread and redispatch them
* to the connection thread.
*/
struct quic_receiver_buf {
struct buffer buf; /* storage for datagrams received. */
struct list dgram_list; /* datagrams received with this rxbuf. */
struct mt_list rxbuf_el; /* list element into receiver.rxbuf_list. */
};
#endif /* USE_QUIC */
#endif /* _HAPROXY_QUIC_SOCK_T_H */