Hello!
> In 2.3.41, include/net/tcp.h says:
>
> #if HZ == 100
> #define TCP_TW_RECYCLE_TICK (7+2-TCP_TW_RECYCLE_SLOTS_LOG)
> #elif HZ == 1024
> #define TCP_TW_RECYCLE_TICK (10+2-TCP_TW_RECYCLE_SLOTS_LOG)
> #else
> #error HZ != 100 && HZ != 1024.
> #endif
>
> What should TCP_TW_RECYCLE_TICK be defined as for, say, HZ == 10?
TCP_TW_RECYCLE_TICK = (log(HZ)+2-TCP_TW_RECYCLE_SLOTS_LOG)
If HZ is not a 2^N, then it is rounded up to the closest power of two.
In your case it is:
#define TCP_TW_RECYCLE_TICK (4+2-TCP_TW_RECYCLE_SLOTS_LOG)
Alexey Kuznetsov
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]