diff options
author | Craig Gallek <kraig@google.com> | 2016-02-10 11:50:40 -0500 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2022-10-28 15:39:29 +0100 |
commit | bae331196dd03f322a25e9de4cc794e1ed79f7ba (patch) | |
tree | bed4c7852c3af5f63ce5100e203f36eeb30244ec /net/ipv4/udp.c | |
parent | 4ada2ed73da06813915cffcee47fcd39969bf24c (diff) |
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>
Change-Id: I84cc6952d273fcb1b1dba7cbf31504ea135ecdae
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 40005bb8824c..766431c6e321 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -366,8 +366,8 @@ EXPORT_SYMBOL(udp_lib_get_port); * match_wildcard == false: addresses must be exactly the same, i.e. * 0.0.0.0 only equals to 0.0.0.0 */ -static int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2, - bool match_wildcard) +int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2, + bool match_wildcard) { struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); |