From: John Fastabend <john.fastabend@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net
Cc: netdev@vger.kernel.org
Subject: [bpf-next PATCH 0/3] Hash support for sock
Date: Fri, 27 Apr 2018 15:51:58 -0700 [thread overview]
Message-ID: <20180427224752.6861.77895.stgit@john-Precision-Tower-5810> (raw)
In the original sockmap implementation we got away with using an
array similar to devmap. However, unlike devmap where an ifindex
has a nice 1:1 function into the map we have found some use cases
with sockets need to be referenced using longer keys.
This series adds support for a sockhash map type which reuses almost
all the sockmap code except it needed a few special add/remove
handlers.
To test this we duplicate all the sockmap testing except swap out
the sockmap with a sockhash.
---
John Fastabend (3):
bpf: sockmap, refactor sockmap routines to work with hashmap
bpf: sockmap, add hash map support
bpf: selftest additions for SOCKHASH
tools/bpf/bpftool/map.c | 1
tools/include/uapi/linux/bpf.h | 6
tools/testing/selftests/bpf/Makefile | 3
tools/testing/selftests/bpf/test_sockhash_kern.c | 4
tools/testing/selftests/bpf/test_sockmap.c | 27 +-
tools/testing/selftests/bpf/test_sockmap_kern.c | 340 ----------------------
tools/testing/selftests/bpf/test_sockmap_kern.h | 340 ++++++++++++++++++++++
7 files changed, 374 insertions(+), 347 deletions(-)
create mode 100644 tools/testing/selftests/bpf/test_sockhash_kern.c
create mode 100644 tools/testing/selftests/bpf/test_sockmap_kern.h
next reply other threads:[~2018-04-27 22:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 22:51 John Fastabend [this message]
2018-04-27 22:52 ` [bpf-next PATCH 1/3] bpf: sockmap, refactor sockmap routines to work with hashmap John Fastabend
2018-04-27 22:52 ` [bpf-next PATCH 2/3] bpf: sockmap, add hash map support John Fastabend
2018-04-27 22:52 ` [bpf-next PATCH 3/3] bpf: selftest additions for SOCKHASH John Fastabend
2018-04-27 22:54 ` [bpf-next PATCH 0/3] Hash support for sock Alexei Starovoitov
2018-04-27 23:15 ` John Fastabend
-- strict thread matches above, loose matches on Subject: below --
2018-04-27 23:20 John Fastabend
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=20180427224752.6861.77895.stgit@john-Precision-Tower-5810 \
--to=john.fastabend@gmail.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--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