Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp407515ybz; Wed, 29 Apr 2020 02:23:53 -0700 (PDT) X-Google-Smtp-Source: APiQypL8gKGYDkPIbjqogkkY+CUmiI8ERE5IFGHk0gU7C9LkPu2sYHfeieegpWCyLs+E2dgBAj1z X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr1462112edv.99.1588152232998; Wed, 29 Apr 2020 02:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588152232; cv=none; d=google.com; s=arc-20160816; b=PT41rqBqAPvT4rTFc1Mc1bA2XcCgZI6zKcO8yWREXCwH7hiTj+HcBRT1bi17QyuhPp T9vxsFwBvnxIj6j+k/MXuiXQ0Q4Litetjpk+INTsAnbId5rQhwcK1e2PFqKQLmiz5Awy 7PmoswPBzGUYf4EwiBWoflITL+Z7MbPPQKKZgCbh/c4IAEu6uNbcXR2Iou2mRH7HNVl1 2fPCAOUQPVkttJvLUQdK65tlX7BkilutbDiis8CjZ+yIUMsVw61GurKPz2EvSFjAGz3L RIljvdxkSArVLDqrNVN9AlLXCfEQtluzhwXLwX5yklXi8q6d9L1yXAuv3cZm5Unn7HW6 rQ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=VZvr/skNPOFKMD3ogXhoD9tnQHqLrRRqrmLtubG1DcI=; b=o+MpHxU75C9Z/HrSoyNf16sJAGQ/RGy9xmOahNoqfA2gIYwEn3YrczJjTgbJrLScyE f4cAIRrd7beiTEBi7SKK35eyGdUvsVb1Gubf906J2bF97EuSxzAd6MmKmFFjk9Cd6qC+ 9t3cddbVimZBaLCu2IAAkNBSeJDjOd3sub0+wirE93MnuSNPNkApzaqxXWEMEVq+QEEv TQWuMdv8pWLoG5dkw/0WdyCNtgUJH0JJ4Kt5tM6QH5A5JllEH4Y59zklyQZMAvWVvpk5 hVBFUnDDpGoCDOMhGLHtBE/IDucIPefpH99YYTEYQ353ddFCtrG94uQQaldfzp8fOSPs 6TvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HDjWY3QT; 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 r18si3437926ejj.211.2020.04.29.02.23.28; Wed, 29 Apr 2020 02:23:52 -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=HDjWY3QT; 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 S1726561AbgD2JWB (ORCPT + 99 others); Wed, 29 Apr 2020 05:22:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60886 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726511AbgD2JWB (ORCPT ); Wed, 29 Apr 2020 05:22:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588152119; 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=VZvr/skNPOFKMD3ogXhoD9tnQHqLrRRqrmLtubG1DcI=; b=HDjWY3QTT5t0DJdEycL/IFlcPHFAwAj0hVjprL8q5ffO4RLTfeSgdCFHDVZ+RzI5Cmz+M4 Z67b5Rocfr+iWabyXMU40WSf5B5xuK0QTaRkmbcsRLIhuSt1qA0NkgblMhzPxP9McVm7TH XPnYgKWvvbCqe5KdKObupJaYcNi8hQk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-122-urpKaGkpMHmnm-m04i_PzA-1; Wed, 29 Apr 2020 05:21:55 -0400 X-MC-Unique: urpKaGkpMHmnm-m04i_PzA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96E72107ACF4; Wed, 29 Apr 2020 09:21:53 +0000 (UTC) Received: from [10.72.13.2] (ovpn-13-2.pek2.redhat.com [10.72.13.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 752B65C1BE; Wed, 29 Apr 2020 09:21:44 +0000 (UTC) Subject: Re: [PATCH net-next 0/3] vsock: support network namespace To: Stefano Garzarella 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 References: <20200116172428.311437-1-sgarzare@redhat.com> <20200427142518.uwssa6dtasrp3bfc@steredhat> <224cdc10-1532-7ddc-f113-676d43d8f322@redhat.com> <20200428160052.o3ihui4262xogyg4@steredhat> From: Jason Wang Message-ID: <6dc937e4-0ef9-617d-c9c8-8b1f8c428d90@redhat.com> Date: Wed, 29 Apr 2020 17:21:42 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200428160052.o3ihui4262xogyg4@steredhat> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/29 =E4=B8=8A=E5=8D=8812:00, Stefano Garzarella wrote: > On Tue, Apr 28, 2020 at 04:13:22PM +0800, Jason Wang wrote: >> On 2020/4/27 =E4=B8=8B=E5=8D=8810:25, Stefano Garzarella wrote: >>> Hi David, Michael, Stefan, >>> I'm restarting to work on this topic since Kata guys are interested t= o >>> 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 bett= er >>> 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 befo= re >>> (host reachable from any netns). >>> I think we can handle this in the vsock core and not in the sing= le >>> transports. >>> >>> The simplest way that I found, is to add a new >>> IOCTL_VM_SOCKETS_ASSIGN_G2H_NETNS to /dev/vsock to enable the fe= ature >>> and assign the device to the same netns of the process that do t= he >>> ioctl(), but I'm not sure it is clean enough. >>> >>> Maybe it is better to add new rtnetlink messages, but I'm not su= re 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 t= hen. >> 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 don't see but if there's we can try to find a solution or ask for=20 netdev experts for that. I do hear from somebody that is interested in=20 having netdev in the past. > > 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 t= he host. Yes, it's worth to have a try then we will have a unified management=20 interface and we will benefit from it in the future. Starting form guest is good idea which should be less complicated than ho= st. Thanks > > Stefano >