From: Stefan Hajnoczi <stefanha@redhat.com>
To: skvarlamatus@gmail.com
Cc: ericvh@kernel.org, lucho@ionkov.net, asmadeus@codewreck.org,
linux_oss@crudebyte.com, v9fs@lists.linux.dev,
linux-kernel@vger.kernel.org, sgarzare@redhat.com
Subject: Re: [PATCH v2] net/9p: add vsock transport
Date: Fri, 3 Jul 2026 07:41:33 +0200 [thread overview]
Message-ID: <20260703054133.GB448934@fedora> (raw)
In-Reply-To: <20260701155922.95502-1-skvarlamatus@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]
On Wed, Jul 01, 2026 at 05:59:22PM +0200, skvarlamatus@gmail.com wrote:
> From: Matus Skvarla <skvarlamatus@gmail.com>
>
> Add vsock as a transport option for 9P client connections. This
> allows mounting 9P filesystems over VM sockets without requiring TCP/IP
> networking or additional userspace tools.
>
> The implementation extends trans_fd.c with vsock support, reusing the
> existing socket infrastructure. A new p9_fd_create_vsock() function
> handles vsock connection setup by parsing the CID from the mount source,
> creating an AF_VSOCK socket, and connecting to the specified endpoint.
> All other transport operations (close, request, cancel) use the shared
> fd transport implementation.
>
> The privport mount option is not currently supported for vsock and
> returns -EOPNOTSUPP if specified.
>
> Add CONFIG_NET_9P_VSOCK option that conditionally compiles vsock support
> into 9pnet_fd.ko. This follows the pattern where socket-based transports
> (TCP, Unix, vsock) share trans_fd.c, while specialized hardware transports
> (virtio, xen, rdma) have dedicated files.
>
> Usage:
> mount -t 9p -o trans=vsock[,port=<port>] <CID> /mnt/point
>
> Signed-off-by: Matus Skvarla <skvarlamatus@gmail.com>
> ---
> Changes in v2:
> - Add depends on NET_9P_FD to Kconfig
> - Use #include <uapi/linux/vm_sockets.h>
> - Reject privport option with -EOPNOTSUPP
> - Use fc->net_ns instead of current->nsproxy->net_ns
> - Widen vsock port to u32 to match sockaddr_vm.svm_port
> - Widen p9_fd_opts.port to u32 and port_str buffer accordingly (in p9_fd_create_tcp())
> - Add vsock to Documentation/filesystems/9p.rst
> Link to v1: https://lore.kernel.org/v9fs/20260527073447.86538-1-skvarlamatus@gmail.com/
> ---
> Documentation/filesystems/9p.rst | 12 +++-
> include/net/9p/client.h | 10 +++-
> net/9p/Kconfig | 10 ++++
> net/9p/trans_fd.c | 97 +++++++++++++++++++++++++++++++-
> 4 files changed, 124 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/filesystems/9p.rst b/Documentation/filesystems/9p.rst
> index 3f65db648db0..d1bac30b3c9d 100644
> --- a/Documentation/filesystems/9p.rst
> +++ b/Documentation/filesystems/9p.rst
> @@ -50,6 +50,14 @@ mount points. Each 9P export is seen by the client as a virtio device with an
> associated "mount_tag" property. Available mount tags can be
> seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files.
>
> +For server accessible over vsock (VM sockets)::
> +
> + mount -t 9p -o trans=vsock <CID> /mnt/9
If you respin this patch, please add the port= option because it is
absent from this example and it could be missed if one doesn't read the
paragraph below carefully:
mount -t 9p -o trans=vsock[,port=<port>] <CID> /mnt/9
Other than that:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-07-03 5:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 15:59 [PATCH v2] net/9p: add vsock transport skvarlamatus
2026-07-03 5:41 ` Stefan Hajnoczi [this message]
[not found] ` <CANG_AsJtiN+31UCEZDSRX5ckq10vW-Qw7gjcBcB+feDZA7rgww@mail.gmail.com>
2026-07-03 14:16 ` Dominique Martinet
2026-07-03 14:58 ` skvarlamatus
2026-07-03 14:16 ` Matus Skvarla
2026-07-03 14:39 ` Matus Skvarla
2026-07-03 9:12 ` Stefano Garzarella
2026-07-03 14:31 ` skvarlamatus
2026-07-03 14:39 ` Stefano Garzarella
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=20260703054133.GB448934@fedora \
--to=stefanha@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=sgarzare@redhat.com \
--cc=skvarlamatus@gmail.com \
--cc=v9fs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.