Re: [PATCH] net/9p: add vsock transport

Dominique Martinet <[email protected]> Fri, 29 May 2026 12:01:44 +0900
Newsgroups dev.linux.lists.v9fs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
[email protected] wrote on Wed, May 27, 2026 at 09:34:47AM +0200:
> From: Matus Skvarla <[email protected]>
> 
> 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.
> 
> 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 <[email protected]>

In addition to Stefan's comments there are a few valid remarks from
sashiko.dev (e.g. port number being truncated); please have a look

https://sashiko.dev/#/patchset/20260527073447.86538-1-skvarlamatus%40gmail.com

-- 
Dominique