linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Allow checking SYN cookies from XDP and tc cls act
@ 2019-02-22  9:50 Lorenz Bauer
  2019-02-22  9:50 ` [PATCH 1/3] bpf: add helper to check for a valid SYN cookie Lorenz Bauer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Lorenz Bauer @ 2019-02-22  9:50 UTC (permalink / raw)
  To: ast, daniel, netdev; +Cc: linux-api, Lorenz Bauer

This series adds a helper bpf_sk_check_syncookie, which allows checking
whether a packet is a valid SYN cookie for a given socket. This is
useful for implementing load-balancing approaches like glb-director [1]
or Beamer [2] in pure eBPF.

Specifically, we'd like to replace the functionality of the glb-redirect
kernel module by an XDP program or tc classifier.

1: https://github.com/github/glb-director
2: https://www.usenix.org/conference/nsdi18/presentation/olteanu

Lorenz Bauer (3):
  bpf: add helper to check for a valid SYN cookie
  tools: sync changes to uapi/linux/bpf.h
  selftests/bpf: add tests for bpf_sk_check_syncookie

 include/uapi/linux/bpf.h                      |  18 +-
 net/core/filter.c                             |  68 ++++++
 tools/include/uapi/linux/bpf.h                |  18 +-
 tools/testing/selftests/bpf/.gitignore        |   1 +
 tools/testing/selftests/bpf/Makefile          |   5 +-
 tools/testing/selftests/bpf/bpf_helpers.h     |   3 +
 .../bpf/progs/test_sk_syncookie_kern.c        | 119 ++++++++++
 .../selftests/bpf/test_sk_syncookie.sh        |  81 +++++++
 .../selftests/bpf/test_sk_syncookie_user.c    | 212 ++++++++++++++++++
 9 files changed, 521 insertions(+), 4 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_sk_syncookie_kern.c
 create mode 100755 tools/testing/selftests/bpf/test_sk_syncookie.sh
 create mode 100644 tools/testing/selftests/bpf/test_sk_syncookie_user.c

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

end of thread, other threads:[~2019-02-28 17:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22  9:50 [PATCH 0/3] Allow checking SYN cookies from XDP and tc cls act Lorenz Bauer
2019-02-22  9:50 ` [PATCH 1/3] bpf: add helper to check for a valid SYN cookie Lorenz Bauer
2019-02-23  0:44   ` Martin Lau
2019-02-25 18:26     ` Lorenz Bauer
2019-02-26  5:37       ` Martin Lau
2019-02-28 15:11         ` Lorenz Bauer
2019-02-28 17:37           ` Martin Lau
2019-02-24 11:21   ` kbuild test robot
2019-02-24 11:37   ` kbuild test robot
2019-02-22  9:50 ` [PATCH 2/3] tools: sync changes to uapi/linux/bpf.h Lorenz Bauer
2019-02-22  9:50 ` [PATCH 3/3] selftests/bpf: add tests for bpf_sk_check_syncookie Lorenz Bauer

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).