Recent content by ZZZZZHB

  1. Z

    WHY check sock[i]->sk_state in reuseport_select_sock?

    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) {...
  2. Z

    WHY only covert dport to host short in inet_lookup_listener?

    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.
  3. Z

    WHY only covert dport to host short in inet_lookup_listener?

    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...
Top