Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035AbdH2PhO (ORCPT ); Tue, 29 Aug 2017 11:37:14 -0400 Received: from mail-sn1nam02on0063.outbound.protection.outlook.com ([104.47.36.63]:65433 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751323AbdH2PhM (ORCPT ); Tue, 29 Aug 2017 11:37:12 -0400 From: "Jorgen S. Hansen" To: Dexuan Cui CC: Stefan Hajnoczi , "davem@davemloft.net" , "netdev@vger.kernel.org" , "gregkh@linuxfoundation.org" , "devel@linuxdriverproject.org" , KY Srinivasan , Haiyang Zhang , "Stephen Hemminger" , George Zhang , Michal Kubecek , Asias He , "Vitaly Kuznetsov" , Cathy Avery , "jasowang@redhat.com" , Rolf Neugebauer , Dave Scott , "Marcelo Cerri" , "apw@canonical.com" , "olaf@aepfle.de" , "joe@perches.com" , "linux-kernel@vger.kernel.org" , Dan Carpenter Subject: Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default Thread-Topic: [PATCH] vsock: only load vmci transport on VMware hypervisor by default Thread-Index: AdMXLqHUpz8ZGmCVQCq3Yks74VajMAAMewiAAALTwAAAF9gwEAAbKDYAAA5QEwAAruLPgAAGuDGAAB9bwtABKpD2cAAbWzSA Date: Tue, 29 Aug 2017 15:37:07 +0000 Message-ID: <61AE41B3-D143-46D2-8C68-009B78AF12C8@vmware.com> References: <20170817135559.GG5539@stefanha-x1.localdomain> <04460E3B-B213-4090-96CD-00CEEBE6AC32@vmware.com> <20170818153716.GB17572@stefanha-x1.localdomain> <20170822095437.GB16799@stefanha-x1.localdomain> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [80.197.119.203] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR05MB2266;20:V5NcdF0v3IMvN+QGu3RwXerL7LtUGKtHc01KjRMk4u0o2m+VK9NjaVByErBQ6j4nfQchXsA1ca+HGMOL/yquvaRM3BCSa39qfxGyKx67Rq1KskUFe4EsRe1JtWiUq7FRhILGtVj0wCwS58yafltGNdMhUEjLf0DhIuxoISkQoqo= x-ms-office365-filtering-correlation-id: 124293eb-9499-4f1e-5596-08d4eef3ce88 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR05MB2266; x-ms-traffictypediagnostic: CY1PR05MB2266: x-exchange-antispam-report-test: UriScan:(278428928389397)(89211679590171); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR05MB2266;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR05MB2266; x-forefront-prvs: 0414DF926F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(189002)(199003)(377454003)(24454002)(97736004)(8936002)(106356001)(6916009)(2950100002)(53546010)(93886005)(101416001)(68736007)(102836003)(76176999)(6116002)(83716003)(36756003)(50986999)(6506006)(3846002)(81156014)(81166006)(8676002)(345774005)(105586002)(2906002)(3660700001)(54356999)(3280700002)(86362001)(6512007)(4326008)(189998001)(2900100001)(82746002)(53936002)(66066001)(6246003)(2561002)(110136004)(1511001)(2421001)(6436002)(305945005)(14454004)(229853002)(7736002)(77096006)(6486002)(7416002)(5660300001)(25786009)(478600001)(54906002)(99286003)(33656002)(8666007);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB2266;H:CY1PR05MB2217.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; authentication-results: spf=none (sender IP is ) smtp.mailfrom=jhansen@vmware.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2017 15:37:07.2931 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2266 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7TGNiSp027515 Content-Length: 1966 Lines: 53 > On Aug 29, 2017, at 4:36 AM, Dexuan Cui wrote: > >> From: Dexuan Cui >> Sent: Tuesday, August 22, 2017 21:21 >>> ... >>> ... >>> The only problem here would be the potential for a guest and a host app >> to >>> have a conflict wrt port numbers, even though they would be able to >>> operate fine, if restricted to their appropriate transport. >>> >>> Thanks, >>> Jorgen >> >> Hi Jorgen, Stefan, >> Thank you for the detailed analysis! >> You have a much better understanding than me about the complex >> scenarios. Can you please work out a patch? :-) > > Hi Jorgen, Stefan, > May I know your plan for this? I’d be happy to discuss this now, but I don’t have time to work on the actual implementation in the next couple of weeks. For the guest, we agree that registering a guest transport should be tied to either the hypervisor running the guest, or the existence of the appropriate virtual hardware. My main concern is that our existing software relies on the current behavior of auto-loading the VMCI transport on the host side. So changing that behavior could cause trouble for our existing Linux users. I’m wondering whether it would be possible to support multiple host side transports. Since it is theoretically possible to run multiple hypervisors at the same time, there would even be a use case for this. If the assignment of CIDs is made unique across all transports, a connection initiated by the host side will get directed to the appropriate transport based on the CID. Any traffic coming from a guest will naturally be using the appropriate transport. Host side applications will have to share the port space as well. This would require tracking CIDs as a common resource across all transports, but make CIDs unique VM addresses on a given host. If we allow multiple host side transports, virtio host side support and vmci should be able to coexist regardless of the order of initialization. Thanks, Jorgen