From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0C6BF1F5 for ; Thu, 18 Dec 2014 18:17:44 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 Dec 2014 09:16:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,601,1413270000"; d="scan'208";a="649986634" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by fmsmga002.fm.intel.com with ESMTP; 18 Dec 2014 09:16:42 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 19 Dec 2014 01:16:41 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Fri, 19 Dec 2014 01:16:34 +0800 From: "Xie, Huawei" To: "Loftus, Ciara" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] vhost: add interface name to virtio-net struct Thread-Index: AQHQGtLEcjdlFXE5jESNg2FD7ncNQpyVejoAgAAYGeCAAAKLAA== Date: Thu, 18 Dec 2014 17:16:33 +0000 Message-ID: References: <1418914523-24530-1-git-send-email-ciara.loftus@intel.com> <2861628.6qtiPmT13X@xps13> <74F120C019F4A64C9B78E802F6AD4CC212578FCB@IRSMSX106.ger.corp.intel.com> In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC212578FCB@IRSMSX106.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , Anthony Fee Subject: Re: [dpdk-dev] [PATCH] vhost: add interface name to virtio-net struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 17:17:45 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Loftus, Ciara > Sent: Thursday, December 18, 2014 10:02 AM > To: Thomas Monjalon > Cc: dev@dpdk.org; Anthony Fee > Subject: Re: [dpdk-dev] [PATCH] vhost: add interface name to virtio-net s= truct >=20 > Hi Thomas, >=20 > A basic vHost use case will work, for example a single Virtual Machine wi= th a > vHost port. However normal vSwitching use cases will require the use of m= ultiple > vHost ports and multiple VMs. With that in mind, it is essential that the= vSwitch > has some way of knowing which vHost port it is sending to and receiving p= ackets > from. This patch resolves this issue by exposing the tap device name of t= he > vHost device. Without that information we cannot determine the particular > vHost port to send/receive from, which in the context of switching, is a = critical > problem. For example, in qemu command line, we specify tap device "tap1" for virtio = device in "VM1", and "tap2" for virtio device in "VM2". vSwitch wants to expose the tap device name in the virtio_net device struct= ure otherwise it doesn't know the virtio_device it gets is for which VM. The mac address isn't enough for vSwitch. The problem is for vhost-user, we have no such kind of identity, unless we = create socket for each virtio device, and use the socket path string. >=20 > Thanks, > Ciara >=20 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, December 18, 2014 3:33 PM > To: Loftus, Ciara > Cc: dev@dpdk.org; Anthony Fee > Subject: Re: [dpdk-dev] [PATCH] vhost: add interface name to virtio-net s= truct >=20 > 2014-12-18 14:55, ciara.loftus@intel.com: > > This patch fixes the issue whereby when using userspace vhost ports in > > the context of vSwitching, the name provided to the hypervisor/QEMU of > > the vhost tap device needs to be exposed in the library, in order for > > the vSwitch to be able to direct packets to the correct device. >=20 > Do you mean that vhost was not working at all? > Please precise the context and how it is critical. > More informations are needed to understand wether it should be merged in > release 1.8.0 or not. >=20 > > --- a/lib/librte_vhost/rte_virtio_net.h > > +++ b/lib/librte_vhost/rte_virtio_net.h > > @@ -96,6 +96,7 @@ struct virtio_net { > > uint64_t features; /**< Negotiated feature set. > */ > > uint64_t device_fh; /**< device identifier. */ > > uint32_t flags; /**< Device flags. Only used to > check if device is running on data core. */ > > + char ifname[32]; /** Name of the tap device > **/ >=20 > Wrong comment style. >=20 > -- > Thomas=20