While reading how to find a tcp listener in linux kervel, version 5.5.4
I found that when reuseport switch is open. kernel will search reuseport_cb and find a sk with sk->sk_state is not equal to TCP_ESTABLISH
code as follows, in linux-5.5.4\net\core\sock_reuseport.c:302
if (!sk2) {...
thanks JulienCC
but saddr,sport,daddr also have byte order problem, didn't see where coverting them to host byte order. since saddr and daddr come from ip header, sport and dport come from tcp header. and use the m to do hash process soon.
While reading how to find a tcp listener in linux kervel, version 5.3.6
I found that only dest port was converted to host short to do hash
why don't convert saddr, sport, daddr to host long or host short either ?
code as follows, in linux-5.3.6/include/net/inet_hashtables.h:
static inline...