From: Lorenz Bauer <lmb@cloudflare.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Cc: kernel-team@cloudflare.com, Lorenz Bauer <lmb@cloudflare.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: [PATCH bpf-next 0/4] Sockmap copying
Date: Fri, 25 Sep 2020 10:56:26 +0100 [thread overview]
Message-ID: <20200925095630.49207-1-lmb@cloudflare.com> (raw)
Enable calling map_update_elem on sockmaps from bpf_iter context. This
in turn allows us to copy a sockmap by iterating its elements.
The change itself is tiny, all thanks to the ground work from Martin,
whose series [1] this patch is based on. I updated the tests to do some
copying, and also included two cleanups.
I'm sending this out now rather than when Martin's series has landed
because I hope this can get in before the merge window (potentially)
closes this weekend.
1: https://lore.kernel.org/bpf/20200925000337.3853598-1-kafai@fb.com/
Lorenz Bauer (4):
bpf: sockmap: enable map_update_elem from bpf_iter
selftests: bpf: Add helper to compare socket cookies
bpf: selftests: remove shared header from sockmap iter test
selftest: bpf: Test copying a sockmap and sockhash
kernel/bpf/verifier.c | 2 +-
net/core/sock_map.c | 3 +
.../selftests/bpf/prog_tests/sockmap_basic.c | 100 +++++++++++-------
.../selftests/bpf/progs/bpf_iter_sockmap.c | 32 ++++--
.../selftests/bpf/progs/bpf_iter_sockmap.h | 3 -
5 files changed, 90 insertions(+), 50 deletions(-)
delete mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_sockmap.h
--
2.25.1
next reply other threads:[~2020-09-25 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 9:56 Lorenz Bauer [this message]
2020-09-25 9:56 ` [PATCH bpf-next 1/4] bpf: sockmap: enable map_update_elem from bpf_iter Lorenz Bauer
2020-09-25 12:01 ` kernel test robot
2020-09-25 21:53 ` Martin KaFai Lau
2020-09-28 9:06 ` Lorenz Bauer
2020-09-25 9:56 ` [PATCH bpf-next 2/4] selftests: bpf: Add helper to compare socket cookies Lorenz Bauer
2020-09-25 9:56 ` [PATCH bpf-next 3/4] bpf: selftests: remove shared header from sockmap iter test Lorenz Bauer
2020-09-25 9:56 ` [PATCH bpf-next 4/4] selftest: bpf: Test copying a sockmap and sockhash Lorenz Bauer
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=20200925095630.49207-1-lmb@cloudflare.com \
--to=lmb@cloudflare.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@cloudflare.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).