DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: "Loftus, Ciara" <ciara.loftus@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Anthony Fee <anthonyx.fee@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: add interface name to virtio-net struct
Date: Thu, 18 Dec 2014 17:16:33 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B0F3288B4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC212578FCB@IRSMSX106.ger.corp.intel.com>

> -----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 struct
> 
> Hi Thomas,
> 
> A basic vHost use case will work, for example a single Virtual Machine with a
> vHost port. However normal vSwitching use cases will require the use of multiple
> 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 packets
> from. This patch resolves this issue by exposing the tap device name of the
> 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 structure 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.

> 
> Thanks,
> Ciara
> 
> -----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 struct
> 
> 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.
> 
> 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.
> 
> > --- 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
> **/
> 
> Wrong comment style.
> 
> --
> Thomas 

  reply	other threads:[~2014-12-18 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 14:55 ciara.loftus
2014-12-18 15:33 ` Thomas Monjalon
2014-12-18 17:01   ` Loftus, Ciara
2014-12-18 17:16     ` Xie, Huawei [this message]
2014-12-18 17:20     ` Czesnowicz, Przemyslaw
2014-12-18 16:20 ` Stephen Hemminger
2014-12-18 16:26   ` Vincent JARDIN
2014-12-18 17:03 ` Ananyev, Konstantin
2014-12-18 18:11   ` Loftus, Ciara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C37D651A908B024F974696C65296B57B0F3288B4@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=anthonyx.fee@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).