netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/4] Support bpf_get_socket_cookie in more prog types
@ 2018-07-31  0:42 Andrey Ignatov
  2018-07-31  0:42 ` [PATCH v2 bpf-next 1/4] bpf: " Andrey Ignatov
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andrey Ignatov @ 2018-07-31  0:42 UTC (permalink / raw)
  To: netdev; +Cc: Andrey Ignatov, ast, daniel, yhs, brakmo, kernel-team

v1->v2:
- simplify attach_type guessing logic in selftest.

This patch set adds support to call bpf_get_socket_cookie() helper from two
more program types:
* BPF_PROG_TYPE_CGROUP_SOCK_ADDR;
* BPF_PROG_TYPE_SOCK_OPS.

Patch 1 adds kernel support and provides more details.
Patch 2 syncs UAPI changes to tools/.
Patch 3 adds missing helper to bpf_helpers.h.
Patch 4 adds selftest for new functionality.


Andrey Ignatov (4):
  bpf: Support bpf_get_socket_cookie in more prog types
  bpf: Sync bpf.h to tools/
  selftests/bpf: Add bpf_get_socket_cookie to bpf_helpers.h
  selftests/bpf: Test for get_socket_cookie

 include/uapi/linux/bpf.h                      |  14 ++
 net/core/filter.c                             |  28 +++
 tools/include/uapi/linux/bpf.h                |  14 ++
 tools/testing/selftests/bpf/Makefile          |   6 +-
 tools/testing/selftests/bpf/bpf_helpers.h     |   2 +
 .../selftests/bpf/socket_cookie_prog.c        |  60 +++++
 .../selftests/bpf/test_socket_cookie.c        | 225 ++++++++++++++++++
 7 files changed, 347 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/socket_cookie_prog.c
 create mode 100644 tools/testing/selftests/bpf/test_socket_cookie.c

-- 
2.17.1

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

end of thread, other threads:[~2018-07-31  9:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-31  0:42 [PATCH v2 bpf-next 0/4] Support bpf_get_socket_cookie in more prog types Andrey Ignatov
2018-07-31  0:42 ` [PATCH v2 bpf-next 1/4] bpf: " Andrey Ignatov
2018-07-31  0:42 ` [PATCH v2 bpf-next 2/4] bpf: Sync bpf.h to tools/ Andrey Ignatov
2018-07-31  0:42 ` [PATCH v2 bpf-next 3/4] selftests/bpf: Add bpf_get_socket_cookie to bpf_helpers.h Andrey Ignatov
2018-07-31  0:42 ` [PATCH v2 bpf-next 4/4] selftests/bpf: Test for get_socket_cookie Andrey Ignatov
2018-07-31  3:44   ` Yonghong Song
2018-07-31  7:35 ` [PATCH v2 bpf-next 0/4] Support bpf_get_socket_cookie in more prog types Daniel Borkmann

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