Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4306593ybz; Tue, 28 Apr 2020 09:06:03 -0700 (PDT) X-Google-Smtp-Source: APiQypLJMOwAe/omvs081gSZ7t3CFHsTW3WZvfzSZ3kR5WXN8COVVG11BbbQE8nkvHXa3CAl+9C3 X-Received: by 2002:aa7:d653:: with SMTP id v19mr22907897edr.383.1588089963593; Tue, 28 Apr 2020 09:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588089963; cv=none; d=google.com; s=arc-20160816; b=yxwTIrL7nIBHNbaskeohJyUabntvYI2DA/d+nS4LoDpZHrbklFNoWGX3uyRUAb7EsH BOZ0jbgo5Ur0+UG6JpUiTUjsWAY+CrzGSbzBPUHCmqNZiNIYcma2nC7mqvLjlYwdk42/ WbE91PfHfBcpzg5qSJd10HJQTxLAxy/ZdXZErnib65UopQHUTnyM2/r7SL9etW0PXwJE Ya4O1NFNm1aWZIlSCcGj5LhDCe6vve5JqwkY9pn0iOdja69O1MBJPqAgT7CIFzjdIrr1 l0ucr561vYvrz0zzfMYb79w1ymYI9sEdsPTlE82oArMhnBUcynBG/RYjLtMDFvsEB/30 0ILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=V/nHrnAWjFYDEx+ooars7FfriVR6n5mahvVNAOlPkCA=; b=Y0+oH6A1pJE518UFe4tIlxLBr+kcfSUA62CQLmQz068W3auzDhfpeksWrbDehxK//K woN209M+igRnjyJJbEO355I7wlg/t/DOX8DIkLbqfDkyKWcsAylnUxsgn1YBWwl6slWx k/07mE1aqJTieQMDQSiDiB2JaqgbJBdKwnV0CSn7m4PneLQvsIC+bEA/CUDDR4kfHrol qD9CC0Ioo75yGAw/lCQ/9U80oag+vtEcKoyDf2W3kqI9P6IhS1tnCuTwhjZi22rmvIlC YEIjnWrDbWGYm63xX/60xgTGmCXymJxfwW37ITA9WonOz7Sgtf0zouDOVxZe3C+CZIkb wTnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CWInyEc9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si2128825ejv.161.2020.04.28.09.05.10; Tue, 28 Apr 2020 09:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CWInyEc9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728232AbgD1QBD (ORCPT + 99 others); Tue, 28 Apr 2020 12:01:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46088 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728080AbgD1QBB (ORCPT ); Tue, 28 Apr 2020 12:01:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588089660; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V/nHrnAWjFYDEx+ooars7FfriVR6n5mahvVNAOlPkCA=; b=CWInyEc9RhBkQetkohvGIXbkg3GphnrOZ6NsM0dp1q0WQPBbomrjasUEDYbDMQTRb8hMzK pA/9zfxPfOoxh/dinN2Cv778s1D6zaZE1sP+6qpi2XeXAi/pYWaNivBwCsqFAxWA1ygtVc OYbNyocD7uMCQyAxjlYnmPwRP/ah6wE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215-lTf2py4WP0q7Rf-TCfi6KQ-1; Tue, 28 Apr 2020 12:00:58 -0400 X-MC-Unique: lTf2py4WP0q7Rf-TCfi6KQ-1 Received: by mail-wm1-f71.google.com with SMTP id n127so1054001wme.4 for ; Tue, 28 Apr 2020 09:00:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=V/nHrnAWjFYDEx+ooars7FfriVR6n5mahvVNAOlPkCA=; b=F9ILT1HuO/moKr4Z84QJ3pjPoDpMgBGAZa0zBLX6EsQ5wJADHWv9s8FUz/viFEzdEe q6xQ89+rFFsY8NlmDZN4AyV7Ai5fUFH46UFbDsi6vmXi2h+p9rpQKoKG99NOlEfzNKXT 4kaxOx+MmzDa32iFgXDZRn/Hy3KA/dLm7OJqIooKpLo8chOZygEXD6Lh21atf0YRVGZw 4MWLliKKSTUSUWoNwYGHJdoC6miPs2wAKiJWZQC0X/kJ8GssSPjF0jXSVrZHJiG0bZy2 ovWTbI8mK9gQ27Ce0EqGzJbRBaeh4j0jfMLEPjyNf3oN0TjlpLsbFn+pwOiAK1DfStBH ykxA== X-Gm-Message-State: AGi0PuZ6yTdsCZRY3HxL8VApOcIn7QvdPokaPOUn7eGMaoH97+TYMP0B Mtp5Wu23b4ZHXdRIGiCmdRc64TdAymhN4toSMvRGeBZWzjhb5TrCgSgLqo+j855Y1qbsckhp6n+ aUMXLKnIhvc8905LO2qqB3AMF X-Received: by 2002:adf:bb94:: with SMTP id q20mr36673127wrg.105.1588089656820; Tue, 28 Apr 2020 09:00:56 -0700 (PDT) X-Received: by 2002:adf:bb94:: with SMTP id q20mr36673001wrg.105.1588089655649; Tue, 28 Apr 2020 09:00:55 -0700 (PDT) Received: from steredhat (host108-207-dynamic.49-79-r.retail.telecomitalia.it. [79.49.207.108]) by smtp.gmail.com with ESMTPSA id i129sm4064632wmi.20.2020.04.28.09.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 09:00:54 -0700 (PDT) Date: Tue, 28 Apr 2020 18:00:52 +0200 From: Stefano Garzarella To: Jason Wang Cc: davem@davemloft.net, Stefan Hajnoczi , "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Jorgen Hansen , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Dexuan Cui , netdev@vger.kernel.org Subject: Re: [PATCH net-next 0/3] vsock: support network namespace Message-ID: <20200428160052.o3ihui4262xogyg4@steredhat> References: <20200116172428.311437-1-sgarzare@redhat.com> <20200427142518.uwssa6dtasrp3bfc@steredhat> <224cdc10-1532-7ddc-f113-676d43d8f322@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <224cdc10-1532-7ddc-f113-676d43d8f322@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 04:13:22PM +0800, Jason Wang wrote: > > On 2020/4/27 下午10:25, Stefano Garzarella wrote: > > Hi David, Michael, Stefan, > > I'm restarting to work on this topic since Kata guys are interested to > > have that, especially on the guest side. > > > > While working on the v2 I had few doubts, and I'd like to have your > > suggestions: > > > > 1. netns assigned to the device inside the guest > > > > Currently I assigned this device to 'init_net'. Maybe it is better > > if we allow the user to decide which netns assign to the device > > or to disable this new feature to have the same behavior as before > > (host reachable from any netns). > > I think we can handle this in the vsock core and not in the single > > transports. > > > > The simplest way that I found, is to add a new > > IOCTL_VM_SOCKETS_ASSIGN_G2H_NETNS to /dev/vsock to enable the feature > > and assign the device to the same netns of the process that do the > > ioctl(), but I'm not sure it is clean enough. > > > > Maybe it is better to add new rtnetlink messages, but I'm not sure if > > it is feasible since we don't have a netdev device. > > > > What do you suggest? > > > As we've discussed, it should be a netdev probably in either guest or host > side. And it would be much simpler if we want do implement namespace then. > No new API is needed. > Thanks Jason! It would be cool, but I don't have much experience on netdev. Do you see any particular obstacles? I'll take a look to understand how to do it, surely in the guest would be very useful to have the vsock device as a netdev and maybe also in the host. Stefano