MINOR: listener: remove the now useless LI_F_QUIC_LISTENER flag

This flag is only used to tag a QUIC listener, which we now know by
its bind_conf's xprt as well. It's only used to decide whether or not
to perform an extra initialization step on the listener. Let's drop it
as well as the flags field.

With the various fields and options moved, the listener struct reduced
by 48 bytes total.
This commit is contained in:
Willy Tarreau 2023-01-12 20:20:57 +01:00
parent b25634d23e
commit 9e2682afed
3 changed files with 2 additions and 5 deletions

View File

@ -219,7 +219,6 @@ struct li_per_thread {
struct listener *li; /* back reference on the listener */
};
#define LI_F_QUIC_LISTENER 0x00000001 /* listener uses proto quic */
/* The listener will be directly referenced by the fdtab[] which holds its
* socket. The listener provides the protocol-specific accept() function to
@ -230,12 +229,11 @@ struct listener {
enum li_state state; /* state: NEW, INIT, ASSIGNED, LISTEN, READY, FULL */
/* 2-byte hole here */
int luid; /* listener universally unique ID, used for SNMP */
int flags; /* LI_F_* flags */
int nbconn; /* current number of connections on this listener */
unsigned int thr_idx; /* thread indexes for queue distribution : (t2<<16)+t1 */
__decl_thread(HA_RWLOCK_T lock);
struct fe_counters *counters; /* statistics counters */
int nbconn; /* current number of connections on this listener */
struct mt_list wait_queue; /* link element to make the listener wait for something (LI_LIMITED) */
char *name; /* listener's name */

View File

@ -4316,7 +4316,7 @@ init_proxies_list_stage2:
}
#ifdef USE_QUIC
if (listener->flags & LI_F_QUIC_LISTENER) {
if (listener->bind_conf->xprt == xprt_get(XPRT_QUIC)) {
if (!global.cluster_secret) {
diag_no_cluster_secret = 1;
if (listener->bind_conf->options & BC_O_QUIC_FORCE_RETRY) {

View File

@ -526,7 +526,6 @@ int quic_connect_server(struct connection *conn, int flags)
*/
static void quic_add_listener(struct protocol *proto, struct listener *listener)
{
listener->flags |= LI_F_QUIC_LISTENER;
listener->rx.flags |= RX_F_LOCAL_ACCEPT;
default_add_listener(proto, listener);