From: "Michael S. Tsirkin" <mst@redhat.com>
To: Or Gerlitz <ogerlitz@voltaire.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Jamie Lokier <jamie@shareable.org>,
Anthony Liguori <anthony@codemonkey.ws>,
qemu-devel@nongnu.org, Jan Kiszka <jan.kiszka@web.de>,
Mark McLoughlin <markmc@redhat.com>, Dor Laor <dlaor@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH] net: add raw backend - some performance measurements
Date: Tue, 21 Jul 2009 15:01:42 +0300 [thread overview]
Message-ID: <20090721120142.GA23439@redhat.com> (raw)
In-Reply-To: <4A65A0FC.6090204@Voltaire.com>
On Tue, Jul 21, 2009 at 02:05:32PM +0300, Or Gerlitz wrote:
> Michael S. Tsirkin wrote:
> > With raw sockets, send will block or fail if the TX queue for device is
> > full. With tap+bridge, the buffer in tap has to fill up instead, which
> > is not the same. I'm not sure this is the issue here, but could be: the
> > benchmark is UDP, isn't it?
>
> Michael,
>
> What/where is this tap buffer?
> we're talking on VM TX, so looking on tun_get_user I see a call to
> skb_copy_datagram_from_iovec() to copy from the user buffer to an skb, then a call to netif_rx_ni() and that's it... As for your question, indeed udp, the VM runs netperf/UDP_STREAM
>
> Or.
Queue is not the right word, sorry.
I was referring to the fact that, when bridge floods a packet to
multiple interfaces, it clones the skb and frees the original, which
breaks the send buffer accounting in tun and might let you overrun the
tx queue in one of the devices. This does not usually happen with raw
sockets. This is the code in question:
if (prev != NULL) {
struct sk_buff *skb2;
if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) {
br->dev->stats.tx_dropped++;
kfree_skb(skb);
return;
}
__packet_hook(prev, skb2);
}
the thing to check then would be that some kind of misconfiguration
does not cause the bridge to flood your packets to multiple interfaces.
--
MST
next prev parent reply other threads:[~2009-07-21 12:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090701162115.GA4555@shareable.org>
[not found] ` <4A4CA747.1050509@Voltaire.com>
[not found] ` <20090703023911.GD938@shareable.org>
[not found] ` <4A534EC4.5030209@voltaire.com>
[not found] ` <20090707145739.GB14392@shareable.org>
[not found] ` <4A54B0F1.3070201@voltaire.com>
[not found] ` <20090715203806.GF3056@shareable.org>
[not found] ` <4A647B72.5090404@Voltaire.com>
[not found] ` <20090720155308.GA9327@gondor.apana.org.au>
[not found] ` <4A656824.7070100@Voltaire.com>
2009-07-21 7:25 ` [Qemu-devel] [PATCH] net: add raw backend - some performance measurements Herbert Xu
2009-07-21 10:17 ` Or Gerlitz
2009-07-21 10:27 ` Michael S. Tsirkin
2009-07-21 11:05 ` Or Gerlitz
2009-07-21 12:01 ` Michael S. Tsirkin [this message]
2009-07-21 12:14 ` Herbert Xu
2009-07-21 13:41 ` 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=20090721120142.GA23439@redhat.com \
--to=mst@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=dlaor@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=jamie@shareable.org \
--cc=jan.kiszka@web.de \
--cc=markmc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@voltaire.com \
--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 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).