From: Andrey Ignatov <rdna@fb.com>
To: <netdev@vger.kernel.org>
Cc: Andrey Ignatov <rdna@fb.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <brakmo@fb.com>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 0/4] Support bpf_get_socket_cookie in more prog types
Date: Mon, 30 Jul 2018 09:04:32 -0700 [thread overview]
Message-ID: <cover.1532966062.git.rdna@fb.com> (raw)
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 | 249 ++++++++++++++++++
7 files changed, 371 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
next reply other threads:[~2018-07-30 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 16:04 Andrey Ignatov [this message]
2018-07-30 16:04 ` [PATCH bpf-next 1/4] bpf: Support bpf_get_socket_cookie in more prog types Andrey Ignatov
2018-07-30 23:49 ` Yonghong Song
2018-07-30 16:04 ` [PATCH bpf-next 2/4] bpf: Sync bpf.h to tools/ Andrey Ignatov
2018-07-30 23:49 ` Yonghong Song
2018-07-30 16:04 ` [PATCH bpf-next 3/4] selftests/bpf: Add bpf_get_socket_cookie to bpf_helpers.h Andrey Ignatov
2018-07-30 23:50 ` Yonghong Song
2018-07-30 16:04 ` [PATCH bpf-next 4/4] selftests/bpf: Test for get_socket_cookie Andrey Ignatov
2018-07-30 23:59 ` Yonghong Song
2018-07-31 0:25 ` Andrey Ignatov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1532966062.git.rdna@fb.com \
--to=rdna@fb.com \
--cc=ast@kernel.org \
--cc=brakmo@fb.com \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).