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:
parent
4f523c3276
commit
26a0e4d6ee
4 changed files with 7 additions and 5 deletions
4
tcp.h
4
tcp.h
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue