]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Generalize caching for sk_storage.
authorKP Singh <kpsingh@google.com>
Tue, 25 Aug 2020 18:29:14 +0000 (20:29 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Aug 2020 22:00:03 +0000 (15:00 -0700)
commitcbb0510d38f6457a8c432a888223e3d2be72e3b1
tree0c3c8823c8857a15d185ed8c59e4cd00f307adb8
parent0627ae0b997826a1efc0511efadcef637937b5c6
bpf: Generalize caching for sk_storage.

Provide the a ability to define local storage caches on a per-object
type basis. The caches and caching indices for different objects should
not be inter-mixed as suggested in:

  https://lore.kernel.org/bpf/20200630193441.kdwnkestulg5erii@kafai-mbp.dhcp.thefacebook.com/

  "Caching a sk-storage at idx=0 of a sk should not stop an
  inode-storage to be cached at the same idx of a inode."

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200825182919.1118197-3-kpsingh@chromium.org
include/net/bpf_sk_storage.h
net/core/bpf_sk_storage.c