1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-14 03:25:34 +02:00

Fix definitions of SOCKET_MAX, TCP_MAX_CONNS

...and, given that I keep getting this wrong, add a convenience
macro, MAX_FROM_BITS().

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Stefano Brivio 2023-02-27 03:30:01 +01:00
parent 4f523c3276
commit 26a0e4d6ee
4 changed files with 7 additions and 5 deletions

View file

@ -54,7 +54,7 @@ struct tcp_tap_conn {
#define TCP_RETRANS_BITS 3
unsigned int retrans :TCP_RETRANS_BITS;
#define TCP_MAX_RETRANS ((1U << TCP_RETRANS_BITS) - 1)
#define TCP_MAX_RETRANS MAX_FROM_BITS(TCP_RETRANS_BITS)
#define TCP_WS_BITS 4 /* RFC 7323 */
#define TCP_WS_MAX 14