]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit4cc9ce4e739961a7b9e6b2f3b27a72124d356373
tree0c3c8823c8857a15d185ed8c59e4cd00f307adb8
parent1f00d375af84fbcdb6dd6c79fd7c3d02d2390338
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