mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] bpf: declare bpf_sk_storage_get_cg_sock_proto
@ 2023-11-22  8:13 Ben Dooks
  2023-11-27 14:20 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2023-11-22  8:13 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, davem, edumazet, kuba, pabeni, 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
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

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 include/net/bpf_sk_storage.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/net/bpf_sk_storage.h b/include/net/bpf_sk_storage.h
index 2926f1f00d65..043155810822 100644
--- a/include/net/bpf_sk_storage.h
+++ b/include/net/bpf_sk_storage.h
@@ -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;
-- 
2.37.2.352.g3c44437643


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] bpf: declare bpf_sk_storage_get_cg_sock_proto
  2023-11-22  8:13 [PATCH] bpf: declare bpf_sk_storage_get_cg_sock_proto Ben Dooks
@ 2023-11-27 14:20 ` Daniel Borkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2023-11-27 14:20 UTC (permalink / raw)
  To: Ben Dooks, netdev; +Cc: linux-kernel, davem, edumazet, kuba, pabeni, sdf

On 11/22/23 9:13 AM, Ben Dooks wrote:
> 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

> 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 (sdf@google.com) as well as bpf@vger.kernel.org:

Fixes: f7c6cb1d9728 ("bpf: Expose socket storage to BPF_PROG_TYPE_CGROUP_SOCK")

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>   include/net/bpf_sk_storage.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/net/bpf_sk_storage.h b/include/net/bpf_sk_storage.h
> index 2926f1f00d65..043155810822 100644
> --- a/include/net/bpf_sk_storage.h
> +++ b/include/net/bpf_sk_storage.h
> @@ -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;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-27 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  8:13 [PATCH] bpf: declare bpf_sk_storage_get_cg_sock_proto Ben Dooks
2023-11-27 14:20 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®