diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-02-27 03:30:01 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-02-27 18:55:31 +0100 |
commit | 26a0e4d6ee17fa174a401d8e8d9a4c189f11f258 (patch) | |
tree | 233888516fe2b8d021b2d09897e82025cc3aa390 /tcp.h | |
parent | 4f523c3276741781346478328f863e60f30cba8e (diff) | |
download | passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar.gz passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar.bz2 passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar.lz passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar.xz passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.tar.zst passt-26a0e4d6ee17fa174a401d8e8d9a4c189f11f258.zip |
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>
Diffstat (limited to 'tcp.h')
-rw-r--r-- | tcp.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,8 +8,8 @@ #define TCP_TIMER_INTERVAL 1000 /* ms */ -#define TCP_CONN_INDEX_BITS 17 /* 128k */ -#define TCP_MAX_CONNS (1 << TCP_CONN_INDEX_BITS) +#define TCP_CONN_INDEX_BITS 17 /* 128k - 1 */ +#define TCP_MAX_CONNS MAX_FROM_BITS(TCP_CONN_INDEX_BITS) struct ctx; |