Skip to contentSkip to conversation

bpf: declare bpf_sk_storage_get_cg_sock_proto

PATCH In review Ben Dooks 2 participants 2 messages Nov 22, 2023 – Nov 27, 2023

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 bpf: declare bpf_sk_storage_get_cg_sock_proto

The bpf_sk_storage_get_cg_sock_proto struct is exported from net/core/bpf_sk_storage.c but is not decalred in any header file. Fix the following sparse warning by adding it to the include/net/bpf_sk_storage.h header:

net/core/bpf_sk_storage.c:334:29: warning: symbol 'bpf_sk_storage_get_cg_sock_proto' was not declared. Should it be static

---
 include/net/bpf_sk_storage.h | 1 +
 1 file changed, 1 insertion(+)
include/net/bpf_sk_storage.h +1 -0
index 2926f1f00d65..043155810822 100644
@@ -22,6 +22,7 @@ extern const struct bpf_func_proto bpf_sk_storage_get_proto;
 extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
 extern const struct bpf_func_proto bpf_sk_storage_get_tracing_proto;
 extern const struct bpf_func_proto bpf_sk_storage_delete_tracing_proto;
+extern const struct bpf_func_proto bpf_sk_storage_get_cg_sock_proto;
 
 struct bpf_local_storage_elem;
 struct bpf_sk_storage_diag;
Signature · 1 line
2.37.2.352.g3c44437643
#1 lore raw
Quoted 2 lines · Ben Dooks

The bpf_sk_storage_get_cg_sock_proto struct is exported from net/core/bpf_sk_storage.c but is not decalred in any header

nit: typo

Quoted 4 lines

file. Fix the following sparse warning by adding it to the include/net/bpf_sk_storage.h header:

net/core/bpf_sk_storage.c:334:29: warning: symbol 'bpf_sk_storage_get_cg_sock_proto' was not declared. Should it be static

Please add Fixes tag and Cc author ([email protected]) as well as [email protected]:

Fixes f7c6cb1d9728 ("bpf: Expose socket storage to BPF_PROG_TYPE_CGROUP_SOCK")
Quoted 18 lines
---
  include/net/bpf_sk_storage.h | 1 +
  1 file changed, 1 insertion(+)
include/net/bpf_sk_storage.h +1 -0
index 2926f1f00d65..043155810822 100644
@@ -22,6 +22,7 @@ extern const struct bpf_func_proto bpf_sk_storage_get_proto;
  extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
  extern const struct bpf_func_proto bpf_sk_storage_get_tracing_proto;
  extern const struct bpf_func_proto bpf_sk_storage_delete_tracing_proto;
+extern const struct bpf_func_proto bpf_sk_storage_get_cg_sock_proto;
 
  struct bpf_local_storage_elem;
  struct bpf_sk_storage_diag;