From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>
Subject: [Patch bpf-next v4 0/3] bpf: introduce timeout hash map
Date: Sat, 16 Jan 2021 20:22:21 -0800 [thread overview]
Message-ID: <20210117042224.17839-1-xiyou.wangcong@gmail.com> (raw)
From: Cong Wang <cong.wang@bytedance.com>
This patchset introduces a new eBPF hash map whose elements have
timeouts. Patch 1 is the implementation of timeout map, patch 2 adds
some test cases for timeout map in test_maps, and patch 3 adds a test
case in map ptr test.
Please check each patch description for more details.
---
v4: merge gc_work into gc_idle_work to avoid a nasty race condition
fix a potential use-after-free
add one more test case
improve comments and update changelog
v3: move gc list from bucket to elem
reuse lru_node in struct htab_elem
drop patches which are no longer necessary
fix delete path
add a test case for delete path
add parallel test cases
change timeout to ms
drop batch ops
v2: fix hashmap ptr test
add a test case in map ptr test
factor out htab_timeout_map_alloc()
Cong Wang (3):
bpf: introduce timeout hash map
selftests/bpf: add test cases for bpf timeout map
selftests/bpf: add timeout map check in map_ptr tests
include/linux/bpf_types.h | 1 +
include/uapi/linux/bpf.h | 5 +-
kernel/bpf/hashtab.c | 239 +++++++++++++++++-
kernel/bpf/syscall.c | 3 +-
tools/include/uapi/linux/bpf.h | 1 +
.../selftests/bpf/progs/map_ptr_kern.c | 20 ++
tools/testing/selftests/bpf/test_maps.c | 47 ++++
7 files changed, 307 insertions(+), 9 deletions(-)
--
2.25.1
next reply other threads:[~2021-01-17 4:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 4:22 Cong Wang [this message]
2021-01-17 4:22 ` [Patch bpf-next v4 1/3] bpf: introduce timeout hash map Cong Wang
2021-01-18 19:10 ` Cong Wang
2021-01-17 4:22 ` [Patch bpf-next v4 2/3] selftests/bpf: add test cases for bpf timeout map Cong Wang
2021-01-17 4:22 ` [Patch bpf-next v4 3/3] selftests/bpf: add timeout map check in map_ptr tests Cong Wang
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=20210117042224.17839-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.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).