mbox series

[bpf-next,v3,0/3] bpf: introduce timeout map

Message ID 20201222013344.795259-1-xiyou.wangcong@gmail.com (mailing list archive)
Headers show
Series bpf: introduce timeout map | expand

Message

Cong Wang Dec. 22, 2020, 1:33 a.m. UTC
From: Cong Wang <cong.wang@bytedance.com>

This patchset introduces a new bpf hash map which has timeout.
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.

---
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 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                          | 252 +++++++++++++++++-
 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       |  46 ++++
 7 files changed, 319 insertions(+), 9 deletions(-)