From: Mauricio Vasquez B <mauricio.vasquez@polito.it>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH bpf-next 0/3] Implement bpf map queue
Date: Mon, 06 Aug 2018 15:58:22 +0200 [thread overview]
Message-ID: <153356387977.6981.12236150594041620482.stgit@kernel> (raw)
Bpf queue map is a new kind of map that provides a LIFO/FIFO queue
implementation.
In some applications, like a SNAT, it is necessary to keep track of
a pool of free elemenets, network ports in this case, then a queue
can be used for that purpose.
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
---
Mauricio Vasquez B (3):
bpf: add bpf queue map
selftests/bpf: add test cases for BPF_MAP_TYPE_QUEUE
bpf: add sample for BPF_MAP_TYPE_QUEUE
include/linux/bpf_types.h | 1
include/uapi/linux/bpf.h | 5 +
kernel/bpf/Makefile | 2
kernel/bpf/queuemap.c | 287 +++++++++++++++++++++++++++++++
kernel/bpf/syscall.c | 61 +++++--
kernel/bpf/verifier.c | 16 +-
samples/bpf/.gitignore | 1
samples/bpf/Makefile | 3
samples/bpf/test_map_in_map_user.c | 9 -
samples/bpf/test_queuemap.sh | 37 ++++
samples/bpf/test_queuemap_kern.c | 51 ++++++
samples/bpf/test_queuemap_user.c | 53 ++++++
tools/include/uapi/linux/bpf.h | 5 +
tools/testing/selftests/bpf/test_maps.c | 72 ++++++++
14 files changed, 577 insertions(+), 26 deletions(-)
create mode 100644 kernel/bpf/queuemap.c
create mode 100755 samples/bpf/test_queuemap.sh
create mode 100644 samples/bpf/test_queuemap_kern.c
create mode 100644 samples/bpf/test_queuemap_user.c
next reply other threads:[~2018-08-06 16:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 13:58 Mauricio Vasquez B [this message]
2018-08-06 13:58 ` [PATCH bpf-next 1/3] bpf: add bpf queue map Mauricio Vasquez B
2018-08-07 13:40 ` Daniel Borkmann
2018-08-09 2:50 ` Mauricio Vasquez
2018-08-07 13:52 ` Daniel Borkmann
2018-08-09 2:55 ` Mauricio Vasquez
2018-08-07 14:42 ` Alexei Starovoitov
2018-08-09 3:08 ` Mauricio Vasquez
2018-08-09 4:48 ` Alexei Starovoitov
2018-08-09 9:02 ` Daniel Borkmann
2018-08-09 14:51 ` Mauricio Vasquez
2018-08-09 16:23 ` Alexei Starovoitov
2018-08-09 23:41 ` Mauricio Vasquez
2018-08-10 3:09 ` Alexei Starovoitov
2018-08-06 13:58 ` [PATCH bpf-next 2/3] selftests/bpf: add test cases for BPF_MAP_TYPE_QUEUE Mauricio Vasquez B
2018-08-07 13:42 ` Daniel Borkmann
2018-08-06 13:58 ` [PATCH bpf-next 3/3] bpf: add sample " Mauricio Vasquez B
2018-08-07 13:44 ` Daniel Borkmann
2018-08-09 2:52 ` Mauricio Vasquez
2018-08-07 20:31 ` Jakub Kicinski
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=153356387977.6981.12236150594041620482.stgit@kernel \
--to=mauricio.vasquez@polito.it \
--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