linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bobby Eshleman <bobby.eshleman@bytedance.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	virtualization@lists.linux.dev, bpf@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] vsock: fix `vsock_proto` declaration
Date: Thu, 3 Jul 2025 07:24:49 -0400	[thread overview]
Message-ID: <20250703072443-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250703112329.28365-1-sgarzare@redhat.com>

On Thu, Jul 03, 2025 at 01:23:29PM +0200, Stefano Garzarella wrote:
> From: Stefano Garzarella <sgarzare@redhat.com>
> 
> >From commit 634f1a7110b4 ("vsock: support sockmap"), `struct proto
> vsock_proto`, defined in af_vsock.c, is not static anymore, since it's
> used by vsock_bpf.c.
> 
> If CONFIG_BPF_SYSCALL is not defined, `make C=2` will print a warning:
>     $ make O=build C=2 W=1 net/vmw_vsock/
>       ...
>       CC [M]  net/vmw_vsock/af_vsock.o
>       CHECK   ../net/vmw_vsock/af_vsock.c
>     ../net/vmw_vsock/af_vsock.c:123:14: warning: symbol 'vsock_proto' was not declared. Should it be static?
> 
> Declare `vsock_proto` regardless of CONFIG_BPF_SYSCALL, since it's defined
> in af_vsock.c, which is built regardless of CONFIG_BPF_SYSCALL.
> 
> Fixes: 634f1a7110b4 ("vsock: support sockmap")
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  include/net/af_vsock.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
> index d56e6e135158..d40e978126e3 100644
> --- a/include/net/af_vsock.h
> +++ b/include/net/af_vsock.h
> @@ -243,8 +243,8 @@ int __vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
>  int vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
>  			size_t len, int flags);
>  
> -#ifdef CONFIG_BPF_SYSCALL
>  extern struct proto vsock_proto;
> +#ifdef CONFIG_BPF_SYSCALL
>  int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
>  void __init vsock_bpf_build_proto(void);
>  #else
> -- 
> 2.50.0


  reply	other threads:[~2025-07-03 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 11:23 [PATCH net] vsock: fix `vsock_proto` declaration Stefano Garzarella
2025-07-03 11:24 ` Michael S. Tsirkin [this message]
2025-07-08  0:43 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250703072443-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=bobby.eshleman@bytedance.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).