MINOR: quic: implement build options report

Define a new function quic_register_build_options(). Its purpose is to
register a build options string for QUIC features which is reported when
using haproxy -vv.

This will allow to easily determine if connection socket-owner mode and
GSO are supported or not. Here is the new filtered output :

$ ./haproxy -vv|grep '^QUIC:'
QUIC: connection socket-owner mode support : yes
QUIC: GSO emission support : yes
This commit is contained in:
Amaury Denoyelle 2024-12-05 16:14:08 +01:00
parent cab2cc15c1
commit fc0bb6224c

View File

@ -835,6 +835,25 @@ static int quic_test_socketopts(void)
}
REGISTER_POST_CHECK(quic_test_socketopts);
static void quic_register_build_options(void)
{
char *ptr = NULL;
int ret;
ret = quic_test_conn_socket_owner();
memprintf(&ptr, "QUIC: connection socket-owner mode support : ");
memprintf(&ptr, "%s%s\n", ptr, ret > 0 ? "yes" :
!ret ? "no" : "unknown");
ret = quic_test_gso();
memprintf(&ptr, "%sQUIC: GSO emission support : ", ptr);
memprintf(&ptr, "%s%s", ptr, ret > 0 ? "yes" :
!ret ? "no" : "unknown");
hap_register_build_opts(ptr, 1);
}
INITCALL0(STG_REGISTER, quic_register_build_options);
/*
* Local variables:
* c-indent-level: 8