From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F83839DBFC for ; Fri, 3 Jul 2026 09:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783069970; cv=none; b=PuvrXHFDqOYgsewBM2zH3+Knv9uM4qSFPGNBgi+uRpMOb7HlJ16Ux/MS5GY/onXdmI1bDifOk62KTDG4lDR5R2jU/iqKwBeQsLIGNeF78HatfGlSXyz/QUUS+YeVihr0ACb5BFjuROR7pExnxk2I5mFUOXTgXIMHUpkoWzPogQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783069970; c=relaxed/simple; bh=OYXbkZRCmj0Vtl5yt/RR3TrcrmDsqtUig1eeG145l/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=APxSWM+iVN/avfWYy8QRp7IeVjZzE+1SdCjX53CUmO3TZgBiOmLdnMCrv+zeWnM4SPMCXTDfQ/9eeQ0nNMgME6PvbIj/WusuI+OIiLp/A1fyuAZySPe9w81lAyoQZ2W483ITGFND14xEz78YLIyw+i/Fme7zka82fobIjX1xvd8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GJVoGYNe; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=eT4esIyj; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GJVoGYNe"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="eT4esIyj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783069967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rTpObJaVrcNKVP17RC5GvTDRVbm9gpukLCyO+TLMZDw=; b=GJVoGYNePU4mbqzVePPsEumnZ+5ZCPJIJuV4L+pIIPktxTlvfcXL8DjcOuingUL8eauxFI cghjdpQU0BUP0E3ph1aiK0oIqi2xEGLs/0Y9nZQtMrbUbYyPMkr0vYNTfjvm6PRM299g9X PsbuFd57QGQw+/9VgpU+OvlaiexwmVA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647--mlBfRVuNn2XzPnEUS1qdg-1; Fri, 03 Jul 2026 05:12:46 -0400 X-MC-Unique: -mlBfRVuNn2XzPnEUS1qdg-1 X-Mimecast-MFC-AGG-ID: -mlBfRVuNn2XzPnEUS1qdg_1783069965 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-493b786d550so3502655e9.0 for ; Fri, 03 Jul 2026 02:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1783069965; x=1783674765; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rTpObJaVrcNKVP17RC5GvTDRVbm9gpukLCyO+TLMZDw=; b=eT4esIyj1XcZBPIX9hphBZPsVezWYYnG7JnaaWLf3zZcYWCr1BLIZju20zUMVEJEU8 PrsanSSV6r3CubIEgqBG1iDMLF40uMwI2abrMASiPVskbzV5xOB4QbLN6FqUCVoiSsKp sbBIt0SP0XSbs/a45TiVkFM6GSnharhhsEjVJYDpmH9m/Hy/oC6x/nigoej6WdZQUDGt ufHO6oTXFK2EKQQw/UHP33uMOAXPzjAZ9Zer5xsuTYC/d6QWZh4gD2Fdjgz4Ka+mC0Md FKsLx9t3gpYjflUZuiW4hDljJ3hlGUj1EDpIClyJQhG3/t5nf5ML81sCvAqEkDlZ9/1R 0a9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783069965; x=1783674765; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rTpObJaVrcNKVP17RC5GvTDRVbm9gpukLCyO+TLMZDw=; b=ApREWE7yvN+E0Xao2JhzSKN2/5wyMHfsPAlGcNl8Ptz6OXC5ufVHqNjZ6VwCR5Sdyv 7BUZ7HSL03kl2gQo0xfjEKdGmJe3tG9c+Oa5bltE65+zpl//iF8qkhaJ45YDeCicBCVB PrJumPo+XMWxU+xq46uNo2UpJ1Vm9NRvYMITeSLU22gJeFP46sOCE7VF9LwckpWWKi4X c4LKZh7GDtWgiZx+AJ2hqp0NYehpncTdRWtAE24ZXJnYMRTOzQ5VbabB6yRhOoVlJ3Ul QMlqGVq6UaRlt0hrY9BYXuHOVk0J4SKil5dDfVEV3At00ax9cAiNIcKPEqUONpNumU7e 6yyQ== X-Forwarded-Encrypted: i=1; AFNElJ8torAtgjVKr4Ty31PPsdyxvgxbjjLCFZGnPbpPmSluE5l+bA5TvZxwJUy6z1Kc3IDf/v3Yh67SzX7XYUk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7RVWmHB50EpCgZQlLLfMKBg4gxPvnsEt8M8fHjv8TK+QyORJI wHsYayPF/gR9DqpW4Cvx03+1pfwFGc8b6aTS0QmMJeseyEb9kRhVOF7GbppFcQwU4HfTltSeAFe e7v1QmYSL/3DdlEw38vEh8m9VFK0Ne99mJwbXhowzPd+AQzUa5z0qmmOqN8VtdAex+A== X-Gm-Gg: AfdE7clgcCqCfvzAthtFDeVVqrxKnihsPHfubsNGCHYqMOJoBPdqjTA/Bk83pe9so/l hFOrY5u2PEA2B/GYjARg68Vqoziz0J4ZG2wCFKswk+Pd5JyCuTDFe2JgmXytaYfRR5kWz3jIJbT AaS5d+y4SuLaRiq9JiYkwa9o6KS2wmGwyDRtov8k3VgTAqEa9Vo7PP6jyDmuq5SBNqGs8MFyesc bZ8ss9JQXBVMTAhmXcIqZmemnRnyck1SU37Uh3AH3T5fuSXgIISqqui93KPbfHoBWlrO9CkyKJc 4fxuIMViqhQK/ey6LZ97D363NosDjIRt4LqoRTZLeTNJRPCpepbtL04Z8l2hPQduAhxQOk48y9y x1QYlLd5pZqmmwZsuok8aneUxBZ3a/BLRcC/GtHr13HAE07bH7l1vTepwxsNm X-Received: by 2002:a05:600c:8715:b0:493:bed7:6d7c with SMTP id 5b1f17b1804b1-493c2b8943dmr130142235e9.25.1783069964660; Fri, 03 Jul 2026 02:12:44 -0700 (PDT) X-Received: by 2002:a05:600c:8715:b0:493:bed7:6d7c with SMTP id 5b1f17b1804b1-493c2b8943dmr130141635e9.25.1783069963996; Fri, 03 Jul 2026 02:12:43 -0700 (PDT) Received: from sgarzare-redhat (host-79-34-22-35.business.telecomitalia.it. [79.34.22.35]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-477db3dba0esm15938954f8f.7.2026.07.03.02.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2026 02:12:43 -0700 (PDT) Date: Fri, 3 Jul 2026 11:12:39 +0200 From: Stefano Garzarella 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, stefanha@redhat.com Subject: Re: [PATCH v2] net/9p: add vsock transport Message-ID: References: <20260701155922.95502-1-skvarlamatus@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20260701155922.95502-1-skvarlamatus@gmail.com> On Wed, Jul 01, 2026 at 05:59:22PM +0200, skvarlamatus@gmail.com wrote: >From: Matus Skvarla > >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. Why not? I'm no expert on 9p; it's just out of curiosity. > >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=] /mnt/point > >Signed-off-by: Matus Skvarla >--- >Changes in v2: > - Add depends on NET_9P_FD to Kconfig > - Use #include > - 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/mount_tag files. > >+For server accessible over vsock (VM sockets):: >+ >+ mount -t 9p -o trans=vsock /mnt/9 >+ >+where CID is the vsock Context ID of the remote endpoint (2 for host from >+a guest VM, 3+ for guest VMs from the host). The port to connect to can be >+specified with the port option (default: 564). >+ > USBG Usage > ========== > >@@ -115,8 +123,10 @@ Options > ======== ============================================ > unix specifying a named pipe mount point > tcp specifying a normal TCP/IP connection >- fd used passed file descriptors for connection >+ fd uses passed file descriptors for connection nit: unrelated change? The rest LGTM, so for vsock point of view: Acked-by: Stefano Garzarella