All of lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@voltaire.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Herbert Xu <herbert.xu@redhat.com>,
	Jan Kiszka <jan.kiszka@web.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: add raw backend
Date: Wed, 08 Jul 2009 17:45:05 +0300	[thread overview]
Message-ID: <4A54B0F1.3070201@voltaire.com> (raw)
In-Reply-To: <20090707145739.GB14392@shareable.org>

Jamie Lokier wrote:
> The problem is simply what the guest sends goes out on the network and is not looped backed to the host network stack, and vice versa. So if your host is 192.168.1.1 and is running a DNS server (say), and the guest is 192.168.1.2, when the guest sends queries to 192.168.1.1 the host won't see those queries.  Same if you're running an FTP server on the host and the guest wants to connect to it, etc. It also means multiple guests can't see each other, for the same reason. So it's much less useful than bridging, where the guests and host can all see each other and connect to each other.
I wasn't sure to follow if your example refers to the case when 
networking uses the bridge or NAT. If its bridge, then through which 
bridge interface the packet arrives the host stack? say you have a 
bridge whose attached interfaces are tap1(VM1), tap2(VM2) and eth0(NIC), 
in your example did you mean that the host IP address is assigned to the 
bridge interface? or you were referring a NAT based scheme?


> Unfortunately, bridging is a pain to set up, if your host has any complicated or automatic network configuration already.
As you said bridging requires more configuration, but not less important 
the performance (packets per second and cpu utilization) one can get 
with bridge+tap is much lower vs what you get with the raw mode 
approach. All in all, its clear that with this approach VM/VM and 
VM/Host communication would have to get switched either at the NIC (e.g 
SR/IOV capable NICs supporting a virtual bridge) or at an external 
switch and make a U turn. There's a bunch of reasons why people would 
like to do that, among them performance boost, the ability to shape, 
manage and monitor VM/VM traffic in external switches and more.

> It would be really nice to find a way which has the advantages of both.  Either by adding a different bridging mode to Linux, where host interfaces can be configured for IP and the bridge hangs off the host interface, or by a modified tap interface, or by an alternative
> pcap/packet-like interface which forwards packets in a similar way to bridging.  
It seems that this will not yield  the performance improvement we can 
get with going directly to the NIC. But if someone comes up and makes 
such a mode working, it can be merged into qemu as well along with the 
raw mode.

Or.

  reply	other threads:[~2009-07-08 14:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 15:46 [Qemu-devel] [PATCH] net: add raw backend Or Gerlitz
2009-07-01 16:21 ` Jamie Lokier
2009-07-02 12:25   ` Or Gerlitz
2009-07-03  2:39     ` Jamie Lokier
2009-07-07 13:33       ` Or Gerlitz
2009-07-07 14:57         ` Jamie Lokier
2009-07-08 14:45           ` Or Gerlitz [this message]
2009-07-14 13:54             ` Or Gerlitz
2009-07-15 20:38             ` Jamie Lokier
2009-07-15 21:06               ` Jan Kiszka
2009-07-15 21:52                 ` Jamie Lokier
2009-07-16  8:29               ` Or Gerlitz
2009-07-20 14:13               ` [Qemu-devel] [PATCH] net: add raw backend - some performance measurements Or Gerlitz
2009-07-20 15:53                 ` Herbert Xu
2009-07-20 18:20                   ` Michael S. Tsirkin
2009-07-21  1:46                     ` Herbert Xu
2009-07-21  7:03                   ` Or Gerlitz
2009-07-21  7:25                     ` Herbert Xu
2009-07-21  7:25                       ` Herbert Xu
2009-07-21 10:17                       ` Or Gerlitz
2009-07-21 10:17                         ` Or Gerlitz
2009-07-21 10:27                       ` Michael S. Tsirkin
2009-07-21 10:27                         ` Michael S. Tsirkin
2009-07-21 11:05                         ` Or Gerlitz
2009-07-21 11:05                           ` Or Gerlitz
2009-07-21 12:01                           ` Michael S. Tsirkin
2009-07-21 12:01                             ` Michael S. Tsirkin
2009-07-21 12:14                             ` Herbert Xu
2009-07-21 12:14                               ` Herbert Xu
2009-07-21 13:41                               ` Or Gerlitz
2009-07-21 13:41                                 ` Or Gerlitz
     [not found] ` <5b31733c0907011250i7afcdbcdnb844290de4ad64f2@mail.gmail.com>
2009-07-02 12:08   ` [Qemu-devel] [PATCH] net: add raw backend Or Gerlitz
2009-07-02 15:43 ` Michael S. Tsirkin
2009-07-07 14:45   ` Or Gerlitz
2009-07-07 14:49     ` Michael S. Tsirkin
2009-07-08 14:46       ` Or Gerlitz
2009-07-08 15:06       ` Or Gerlitz

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=4A54B0F1.3070201@voltaire.com \
    --to=ogerlitz@voltaire.com \
    --cc=herbert.xu@redhat.com \
    --cc=jamie@shareable.org \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.