All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] Faster SO_REUSEPORT for TCP
@ 2016-02-04 15:35 Craig Gallek
  2016-02-04 15:35 ` [PATCH net-next 1/7] sock: struct proto hash function may error Craig Gallek
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Craig Gallek @ 2016-02-04 15:35 UTC (permalink / raw)
  To: netdev, David Miller

From: Craig Gallek <kraig@google.com>

This patch series complements an earlier series (6a5ef90c58da)
which added faster SO_REUSEPORT lookup for UDP sockets by
extending the feature to TCP sockets.  It uses the same
array-based data structure which allows for socket selection
after finding the first listening socket that matches an incoming
packet.  Prior to this feature, every socket in the reuseport
group needed to be found and examined before a selection could be
made.

With this series the SO_ATTACH_REUSEPORT_CBPF and
SO_ATTACH_REUSEPORT_EBPF socket options now work for TCP sockets
as well.  The test at the end of the series includes an example of
how to use these options to select a reuseport socket based on the
cpu core id handling the incoming packet.

There are several refactoring patches that precede the feature
implementation.  Only the last two patches in this series
should result in any behavioral changes.

Craig Gallek (7):
  sock: struct proto hash function may error
  inet: create IPv6-equivalent inet_hash function
  tcp: __tcp_hdrlen() helper
  inet: refactor inet[6]_lookup functions to take skb
  soreuseport: Prep for fast reuseport TCP socket selection
  soreuseport: fast reuseport TCP socket selection
  soreuseport: BPF selection functional test for TCP

 include/linux/tcp.h                             |   7 +-
 include/net/addrconf.h                          |   2 +
 include/net/inet6_hashtables.h                  |  13 +-
 include/net/inet_hashtables.h                   |  25 ++-
 include/net/ping.h                              |   2 +-
 include/net/raw.h                               |   2 +-
 include/net/sock.h                              |   6 +-
 include/net/udp.h                               |   2 +-
 net/core/filter.c                               |   2 +-
 net/core/sock.c                                 |   1 +
 net/dccp/ipv6.c                                 |   2 +-
 net/ieee802154/socket.c                         |   9 +-
 net/ipv4/af_inet.c                              |   9 +-
 net/ipv4/inet_connection_sock.c                 |  22 +-
 net/ipv4/inet_diag.c                            |   6 +-
 net/ipv4/inet_hashtables.c                      |  67 +++++-
 net/ipv4/ping.c                                 |   4 +-
 net/ipv4/raw.c                                  |   4 +-
 net/ipv4/tcp_ipv4.c                             |  10 +-
 net/ipv4/udp.c                                  |   4 +-
 net/ipv6/af_inet6.c                             |   6 +-
 net/ipv6/inet6_connection_sock.c                |   2 +
 net/ipv6/inet6_hashtables.c                     |  34 +++-
 net/ipv6/tcp_ipv6.c                             |  10 +-
 net/l2tp/l2tp_ip6.c                             |   2 +-
 net/netfilter/xt_TPROXY.c                       |  31 ++-
 net/netfilter/xt_socket.c                       |  28 ++-
 net/phonet/socket.c                             |   2 +-
 tools/testing/selftests/net/.gitignore          |   1 +
 tools/testing/selftests/net/Makefile            |   2 +-
 tools/testing/selftests/net/reuseport_bpf.c     | 117 ++++++++++-
 tools/testing/selftests/net/reuseport_bpf_cpu.c | 258 ++++++++++++++++++++++++
 32 files changed, 609 insertions(+), 83 deletions(-)
 create mode 100644 tools/testing/selftests/net/reuseport_bpf_cpu.c

-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH net-next 0/7] Faster SO_REUSEPORT for TCP
@ 2016-02-09 23:39 Craig Gallek
  2016-02-09 23:39 ` [PATCH net-next 3/7] tcp: __tcp_hdrlen() helper Craig Gallek
  0 siblings, 1 reply; 18+ messages in thread
From: Craig Gallek @ 2016-02-09 23:39 UTC (permalink / raw)
  To: netdev, David Miller

From: Craig Gallek <kraig@google.com>

This patch series complements an earlier series (6a5ef90c58da)
which added faster SO_REUSEPORT lookup for UDP sockets by
extending the feature to TCP sockets.  It uses the same
array-based data structure which allows for socket selection
after finding the first listening socket that matches an incoming
packet.  Prior to this feature, every socket in the reuseport
group needed to be found and examined before a selection could be
made.

With this series the SO_ATTACH_REUSEPORT_CBPF and
SO_ATTACH_REUSEPORT_EBPF socket options now work for TCP sockets
as well.  The test at the end of the series includes an example of
how to use these options to select a reuseport socket based on the
cpu core id handling the incoming packet.

There are several refactoring patches that precede the feature
implementation.  Only the last two patches in this series
should result in any behavioral changes.

v2:
- In the first patched I missed a couple of hash functions that should now be
  returning int instead of void.  I missed these the first time through as it
  only generated a warning and not an error :\

Craig Gallek (7):
  sock: struct proto hash function may error
  inet: create IPv6-equivalent inet_hash function
  tcp: __tcp_hdrlen() helper
  inet: refactor inet[6]_lookup functions to take skb
  soreuseport: Prep for fast reuseport TCP socket selection
  soreuseport: fast reuseport TCP socket selection
  soreuseport: BPF selection functional test for TCP

 include/linux/tcp.h                             |   7 +-
 include/net/addrconf.h                          |   2 +
 include/net/inet6_hashtables.h                  |  13 +-
 include/net/inet_hashtables.h                   |  25 ++-
 include/net/phonet/phonet.h                     |   2 +-
 include/net/ping.h                              |   2 +-
 include/net/raw.h                               |   2 +-
 include/net/sock.h                              |   6 +-
 include/net/udp.h                               |   2 +-
 net/core/filter.c                               |   2 +-
 net/core/sock.c                                 |   1 +
 net/dccp/ipv4.c                                 |   2 +-
 net/dccp/ipv6.c                                 |   4 +-
 net/ieee802154/socket.c                         |  17 +-
 net/ipv4/af_inet.c                              |   9 +-
 net/ipv4/inet_connection_sock.c                 |  22 +-
 net/ipv4/inet_diag.c                            |   6 +-
 net/ipv4/inet_hashtables.c                      |  67 +++++-
 net/ipv4/ping.c                                 |   4 +-
 net/ipv4/raw.c                                  |   4 +-
 net/ipv4/tcp_ipv4.c                             |  10 +-
 net/ipv4/udp.c                                  |   4 +-
 net/ipv6/af_inet6.c                             |   6 +-
 net/ipv6/inet6_connection_sock.c                |   2 +
 net/ipv6/inet6_hashtables.c                     |  34 +++-
 net/ipv6/tcp_ipv6.c                             |  10 +-
 net/l2tp/l2tp_ip6.c                             |   3 +-
 net/netfilter/xt_TPROXY.c                       |  31 ++-
 net/netfilter/xt_socket.c                       |  28 ++-
 net/phonet/socket.c                             |   6 +-
 net/sctp/socket.c                               |   3 +-
 tools/testing/selftests/net/.gitignore          |   1 +
 tools/testing/selftests/net/Makefile            |   2 +-
 tools/testing/selftests/net/reuseport_bpf.c     | 117 ++++++++++-
 tools/testing/selftests/net/reuseport_bpf_cpu.c | 258 ++++++++++++++++++++++++
 35 files changed, 624 insertions(+), 90 deletions(-)
 create mode 100644 tools/testing/selftests/net/reuseport_bpf_cpu.c

-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-02-09 23:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04 15:35 [PATCH net-next 0/7] Faster SO_REUSEPORT for TCP Craig Gallek
2016-02-04 15:35 ` [PATCH net-next 1/7] sock: struct proto hash function may error Craig Gallek
2016-02-05  5:34   ` Eric Dumazet
2016-02-09 23:44   ` Craig Gallek
2016-02-04 15:35 ` [PATCH net-next 2/7] inet: create IPv6-equivalent inet_hash function Craig Gallek
2016-02-05  5:34   ` Eric Dumazet
2016-02-04 15:35 ` [PATCH net-next 3/7] tcp: __tcp_hdrlen() helper Craig Gallek
2016-02-05  5:35   ` Eric Dumazet
2016-02-04 15:35 ` [PATCH net-next 4/7] inet: refactor inet[6]_lookup functions to take skb Craig Gallek
2016-02-05  5:36   ` Eric Dumazet
2016-02-04 15:35 ` [PATCH net-next 5/7] soreuseport: Prep for fast reuseport TCP socket selection Craig Gallek
2016-02-05  5:37   ` Eric Dumazet
2016-02-04 15:35 ` [PATCH net-next 6/7] soreuseport: " Craig Gallek
2016-02-05  5:38   ` Eric Dumazet
2016-02-04 15:35 ` [PATCH net-next 7/7] soreuseport: BPF selection functional test for TCP Craig Gallek
2016-02-05  5:40   ` Eric Dumazet
2016-02-06  2:59   ` Alexei Starovoitov
2016-02-09 23:39 [PATCH net-next 0/7] Faster SO_REUSEPORT " Craig Gallek
2016-02-09 23:39 ` [PATCH net-next 3/7] tcp: __tcp_hdrlen() helper Craig Gallek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.