netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/8] sockmap integration for ktls
@ 2018-10-13  0:45 Daniel Borkmann
  2018-10-13  0:45 ` [PATCH bpf-next v2 1/8] tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup Daniel Borkmann
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Daniel Borkmann @ 2018-10-13  0:45 UTC (permalink / raw)
  To: alexei.starovoitov; +Cc: john.fastabend, davejwatson, netdev, Daniel Borkmann

This work adds a generic sk_msg layer and converts both sockmap
and later ktls over to make use of it as a common data structure
for application data (similarly as sk_buff for network packets).
With that in place the sk_msg framework spans accross ULP layer
in the kernel and allows for introspection or filtering of L7
data with the help of BPF programs operating on a common input
context.

In a second step, we enable the latter for ktls which was previously
not possible, meaning, ktls and sk_msg verdict programs were
mutually exclusive in the ULP layer which created challenges for
the orchestrator when trying to apply TCP based policy, for
example. Leveraging the prior consolidation we can finally overcome
this limitation.

Note, there's no change in behavior when ktls is not used in
combination with BPF, and also no change in behavior for stand
alone sockmap. The kselftest suites for ktls, sockmap and ktls
with sockmap combined also runs through successfully. For further
details please see individual patches.

Thanks!

v1 -> v2:
  - Removed leftover comment spotted by Alexei
  - Improved commit messages, rebase

Daniel Borkmann (5):
  tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup
  tcp, ulp: remove ulp bits from sockmap
  bpf, sockmap: convert to generic sk_msg interface
  tls: convert to generic sk_msg interface
  bpf, doc: add maintainers entry to related files

John Fastabend (3):
  tls: replace poll implementation with read hook
  tls: add bpf support to sk_msg handling
  bpf: add tls support for testing in test_sockmap

 MAINTAINERS                                |   10 +
 include/linux/bpf.h                        |   33 +-
 include/linux/bpf_types.h                  |    2 +-
 include/linux/filter.h                     |   21 -
 include/linux/skmsg.h                      |  410 +++++
 include/net/sock.h                         |    4 -
 include/net/tcp.h                          |   28 +-
 include/net/tls.h                          |   24 +-
 kernel/bpf/Makefile                        |    5 -
 kernel/bpf/core.c                          |    2 -
 kernel/bpf/sockmap.c                       | 2629 ----------------------------
 kernel/bpf/syscall.c                       |    6 +-
 net/Kconfig                                |   11 +
 net/core/Makefile                          |    2 +
 net/core/filter.c                          |  270 +--
 net/core/skmsg.c                           |  802 +++++++++
 net/core/sock.c                            |   61 -
 net/core/sock_map.c                        | 1002 +++++++++++
 net/ipv4/Makefile                          |    1 +
 net/ipv4/tcp_bpf.c                         |  655 +++++++
 net/ipv4/tcp_ulp.c                         |   73 +-
 net/strparser/Kconfig                      |    4 +-
 net/tls/Kconfig                            |    1 +
 net/tls/tls_device.c                       |    2 +-
 net/tls/tls_main.c                         |   11 +-
 net/tls/tls_sw.c                           |  900 ++++++----
 tools/testing/selftests/bpf/test_sockmap.c |   89 +
 27 files changed, 3666 insertions(+), 3392 deletions(-)
 create mode 100644 include/linux/skmsg.h
 delete mode 100644 kernel/bpf/sockmap.c
 create mode 100644 net/core/skmsg.c
 create mode 100644 net/core/sock_map.c
 create mode 100644 net/ipv4/tcp_bpf.c

-- 
2.9.5

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

end of thread, other threads:[~2018-10-18  1:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13  0:45 [PATCH bpf-next v2 0/8] sockmap integration for ktls Daniel Borkmann
2018-10-13  0:45 ` [PATCH bpf-next v2 1/8] tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup Daniel Borkmann
2018-10-16 14:17   ` Eric Dumazet
2018-10-16 14:29     ` Daniel Borkmann
2018-10-13  0:45 ` [PATCH bpf-next v2 2/8] tcp, ulp: remove ulp bits from sockmap Daniel Borkmann
2018-10-13  0:45 ` [PATCH bpf-next v2 3/8] bpf, sockmap: convert to generic sk_msg interface Daniel Borkmann
2018-10-13  0:45 ` [PATCH bpf-next v2 4/8] tls: " Daniel Borkmann
2018-10-17 14:55   ` Eric Dumazet
2018-10-17 17:32     ` Daniel Borkmann
2018-10-13  0:46 ` [PATCH bpf-next v2 5/8] tls: replace poll implementation with read hook Daniel Borkmann
2018-10-13  0:46 ` [PATCH bpf-next v2 6/8] tls: add bpf support to sk_msg handling Daniel Borkmann
2018-10-13  0:46 ` [PATCH bpf-next v2 7/8] bpf: add tls support for testing in test_sockmap Daniel Borkmann
2018-10-16  0:42   ` Andrey Ignatov
2018-10-16  0:48     ` Daniel Borkmann
2018-10-13  0:46 ` [PATCH bpf-next v2 8/8] bpf, doc: add maintainers entry to related files Daniel Borkmann
2018-10-15 19:27 ` [PATCH bpf-next v2 0/8] sockmap integration for ktls Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).