soreuseport: fast reuseport TCP socket selection
This change extends the fast SO_REUSEPORT socket lookup implemented for UDP to TCP. Listener sockets with SO_REUSEPORT and the same receive address are additionally added to an array for faster random access. This means that only a single socket from the group must be found in the listener list before any socket in the group can be used to receive a packet. Previously, every socket in the group needed to be considered before handing off the incoming packet. This feature also exposes the ability to use a BPF program when selecting a socket from a reuseport group. Signed-off-by:Craig Gallek <kraig@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/inet_hashtables.h 4 additions, 1 deletioninclude/net/inet_hashtables.h
- net/ipv4/inet_connection_sock.c 10 additions, 4 deletionsnet/ipv4/inet_connection_sock.c
- net/ipv4/inet_hashtables.c 60 additions, 4 deletionsnet/ipv4/inet_hashtables.c
- net/ipv4/udp.c 2 additions, 2 deletionsnet/ipv4/udp.c
- net/ipv6/inet6_connection_sock.c 2 additions, 0 deletionsnet/ipv6/inet6_connection_sock.c
- net/ipv6/inet6_hashtables.c 15 additions, 1 deletionnet/ipv6/inet6_hashtables.c
Loading
Please register or sign in to comment