Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3361087ybc; Thu, 21 Nov 2019 07:15:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyeRoKjsDqaCHGfhzTmCf3I92eVIbrkjt6tL8b7azG9jgEaefR/locu4EK/SE9b+tRj7bHC X-Received: by 2002:a1c:5409:: with SMTP id i9mr10307342wmb.135.1574349338852; Thu, 21 Nov 2019 07:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574349338; cv=none; d=google.com; s=arc-20160816; b=LVLJkZQHwykv7w0zvo+DXrGSGeasUOf28fG3Tw5xt2bogJocRLJQAmOq58xIqb5FI5 xefcmZCpa3udm7Js1+nAB9N47Zpu2nmT66E75/am3NsDMknQtZ1z7poHojvT1Gtg8sLU rw5sgtKbag4aGmQeHJyUcjXuJZFwpWSKd2iZl58k3g2J1erzXcjhoHERfjiTO16zEruM 0plfPzDK6CXMix02rVf1phB5ZtQIJ65TimWRBQZsJNapvNvOmhdX96pDR6a125HNejej WSegrp2ZrgURe4hVD/kUl5zd4QM6vOLwKfnz0mtn6FwE9LGy+6bwOQoVVGt907aVFXPA CC5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature; bh=S/ndUKKJCxI76HoRVTG7jNdszQTcPJXiUk69ASnD9hc=; b=rl/oz8eK3zSmiZc2i3buPloaC4sphhPBJqys2n3CwJT5Nltyr8HpYDChjbAdpkEPfg n6hlJ5I8/7GHcFzpCb7QJVCEe3sroojbTQ5L/GogRWh7qkFNxD/LNXVboNlcd4pv+mGl edcrcVHayiazaoaIL5DWRy15JT5bUIxwYU5NpPYlbiZcW+Gk94C50voRfafJAb83KVjt GXpdK3FpYs/3TurqTmWC0XIa73ORs6S4AWDXkzPwpItzEKiaJx+GeZZe7Qzvf+Ega8up FjxgortXafYlkFoayYZ+0SDNdNxPOT0ZfC/j+A7X9P3S0xjmSA1zjtQ4pPEHk6e/bFQO zImg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BFZPun6W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x31si2404178eda.334.2019.11.21.07.15.14; Thu, 21 Nov 2019 07:15:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BFZPun6W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726880AbfKUPOE (ORCPT + 99 others); Thu, 21 Nov 2019 10:14:04 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:43006 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726735AbfKUPOE (ORCPT ); Thu, 21 Nov 2019 10:14:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574349242; 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=S/ndUKKJCxI76HoRVTG7jNdszQTcPJXiUk69ASnD9hc=; b=BFZPun6Wui8mst5ik4v+igZbbNO52U03jnmSpDZ1ATsGYUxUJFr+Ti3ykcD52EkazKpp+B ko2SioijMq46xlosEU/tY9Nt7mHwLezU+K1xLd3BvLSJRmSAi5PvMABX2yMrB2PxStfrsf GYB6ESIY9PDnA2Y+Db56AsDis/pFM7w= 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-248-MyCj3NooMKShAbR2Zq1UDA-1; Thu, 21 Nov 2019 10:13:59 -0500 Received: by mail-wm1-f71.google.com with SMTP id 199so1990770wmb.0 for ; Thu, 21 Nov 2019 07:13:58 -0800 (PST) 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:in-reply-to; bh=iHsCY/CMXwIcgnSHclUoHJ8eh4Q1rh48lgjW6W5ihDs=; b=pOvwYTJlxgxQoHJjrjFaSt3IXW6PoXCuncxVXosdSO2814k8Dj9tiBJjipLEkOKEM1 mFVxRVGtXd8PCbiTRoAB8lwh4kV8+F3O2W0P3HwmVQfkSZ4Dqq9daRRpcJB/GdejccNZ SMmfzN6uXSCy2vS2hX1JYU809d63+vSNUkGSVY+fM4MMtmw+egnVI1KgagN5K52o4nWQ 3lShO4k86tbveznLz2l8GTy7Y54P8sp/2QN3IkCuz6CVFB3n/PrN7c8V0UQGS/rMoigG BDhXkvskK6BESNtQfi4enna8zuDLBQYa8PWAazvJaC5Tl5xYjv/xTzfNxyr5X7vt6gSL r9VQ== X-Gm-Message-State: APjAAAW6N/fVFrxjPdLBVnwWiQa95iRBGMeP4LqBflvFo4xrtO3QXikw epg4XZdOaOw1QNURAZ6UFbCAt1QlrdqcCb2HivxS4dbaVOMRpFK94BAELunJNAFx4Abi32QyA7o nLnI/caiVLnfcNWoahFo9V4m7 X-Received: by 2002:adf:fd4a:: with SMTP id h10mr10771265wrs.90.1574349237927; Thu, 21 Nov 2019 07:13:57 -0800 (PST) X-Received: by 2002:adf:fd4a:: with SMTP id h10mr10771237wrs.90.1574349237686; Thu, 21 Nov 2019 07:13:57 -0800 (PST) Received: from steredhat (a-nu5-32.tin.it. [212.216.181.31]) by smtp.gmail.com with ESMTPSA id z7sm1978953wma.46.2019.11.21.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 07:13:57 -0800 (PST) Date: Thu, 21 Nov 2019 16:13:55 +0100 From: Stefano Garzarella To: Jorgen Hansen Cc: "netdev@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Dexuan Cui , Stefan Hajnoczi , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "David S. Miller" Subject: Re: [PATCH net-next 0/6] vsock: add local transport support Message-ID: <20191121151355.grgfbte6xniqe6xo@steredhat> References: <20191119110121.14480-1-sgarzare@redhat.com> MIME-Version: 1.0 In-Reply-To: X-MC-Unique: MyCj3NooMKShAbR2Zq1UDA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 02:45:32PM +0000, Jorgen Hansen wrote: > > From: Stefano Garzarella [mailto:sgarzare@redhat.com] > > Sent: Tuesday, November 19, 2019 12:01 PM > > This series introduces a new transport (vsock_loopback) to handle > > local communication. > > This could be useful to test vsock core itself and to allow developers > > to test their applications without launching a VM. > >=20 > > Before this series, vmci and virtio transports allowed this behavior, > > but only in the guest. > > We are moving the loopback handling in a new transport, because it > > might be useful to provide this feature also in the host or when > > no H2G/G2H transports (hyperv, virtio, vmci) are loaded. > >=20 > > The user can use the loopback with the new VMADDR_CID_LOCAL (that > > replaces VMADDR_CID_RESERVED) in any condition. > > Otherwise, if the G2H transport is loaded, it can also use the guest > > local CID as previously supported by vmci and virtio transports. > > If G2H transport is not loaded, the user can also use VMADDR_CID_HOST > > for local communication. > >=20 > > Patch 1 is a cleanup to build virtio_transport_common without virtio > > Patch 2 adds the new VMADDR_CID_LOCAL, replacing > > VMADDR_CID_RESERVED > > Patch 3 adds a new feature flag to register a loopback transport > > Patch 4 adds the new vsock_loopback transport based on the loopback > > implementation of virtio_transport > > Patch 5 implements the logic to use the local transport for loopback > > communication > > Patch 6 removes the loopback from virtio_transport > >=20 > > @Jorgen: Do you think it might be a problem to replace > > VMADDR_CID_RESERVED with VMADDR_CID_LOCAL? >=20 > No, that should be fine. It has never allowed for use with stream sockets= in > AF_VSOCK. The only potential use would be for datagram sockets, but that > side appears to be unaffected by your changes, since loopback is only > introduced for SOCK_STREAM. >=20 Yes, datagram sockets are not affected. Thanks for the clarification, Stefano