From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Garzarella Subject: Re: [PATCH net-next 0/3] vsock: support network namespace Date: Wed, 22 Jan 2020 10:13:16 +0100 Message-ID: <20200122091316.zduzvy2txtyqty2p@steredhat> References: <20200116172428.311437-1-sgarzare@redhat.com> <20200121155053.GD641751@stefanha-x1.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200121155053.GD641751@stefanha-x1.localdomain> Sender: kvm-owner@vger.kernel.org To: Stefan Hajnoczi Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jorgen Hansen , Jason Wang , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, "Michael S. Tsirkin" , Dexuan Cui List-Id: virtualization@lists.linuxfoundation.org On Tue, Jan 21, 2020 at 03:50:53PM +0000, Stefan Hajnoczi wrote: > What should vsock_dev_do_ioctl() IOCTL_VM_SOCKETS_GET_LOCAL_CID return? > The answer is probably dependent on the caller's network namespace. Right, and I'm not handling this case. I'll fix! > > Ultimately we may need per-namespace transports. Imagine assigning a > G2H transport to a specific network namespace. Agree. > > vsock_stream_connect() needs to be namespace-aware so that other > namespaces cannot use the G2H transport to send a connection > establishment packet. Right, maybe I can change the vsock_assign_transport() to check if a transport can be assigned to a socket, checking the namespace. I'll send a v2 handling these cases and implementing the Michael's idea about /dev/vhost-vsock-netns Thanks, Stefano