]> git.baikalelectronics.ru Git - kernel.git/commit
soreuseport: pass skb to secondary UDP socket lookup
authorCraig Gallek <kraig@google.com>
Tue, 5 Jan 2016 20:08:07 +0000 (15:08 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 06:28:04 +0000 (01:28 -0500)
commit7271205c080f17ea8efbd5580ef36c4888630e4a
tree2b88e0dc8ac5cc9a85c22abe6b11ad082300cd9a
parentd8bb822a9b5ad2c26317804cbd7b6464be786779
soreuseport: pass skb to secondary UDP socket lookup

This socket-lookup path did not pass along the skb in question
in my original BPF-based socket selection patch.  The skb in the
udpN_lib_lookup2 path can be used for BPF-based socket selection just
like it is in the 'traditional' udpN_lib_lookup path.

udpN_lib_lookup2 kicks in when there are greater than 10 sockets in
the same hlist slot.  Coincidentally, I chose 10 sockets per
reuseport group in my functional test, so the lookup2 path was not
excersised. This adds an additional set of tests with 20 sockets.

Fixes: 7bdde44992ff ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
Fixes: e102736317c7 ("soreuseport: BPF selection functional test")
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Craig Gallek <kraig@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c
net/ipv6/udp.c
tools/testing/selftests/net/reuseport_bpf.c