From: David Woodhouse <dwmw2@infradead.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Paul Moore <paul.moore@hp.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Qemu-devel] [PATCH] tun: orphan an skb on tx
Date: Sun, 01 Feb 2015 11:20:33 +0000 [thread overview]
Message-ID: <1422789633.11044.18.camel@infradead.org> (raw)
In-Reply-To: <20100414005822.GD18044@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]
On Wed, 2010-04-14 at 08:58 +0800, Herbert Xu wrote:
> On Tue, Apr 13, 2010 at 08:31:03PM +0200, Eric Dumazet wrote:
> >
> > Herbert Acked your patch, so I guess its OK, but I think it can be
> > dangerous.
>
> The tun socket accounting was never designed to stop it from
> flooding another tun interface. It's there to stop it from
> transmitting above a destination interface TX bandwidth and
> cause unnecessary packet drops. It also limits the total amount
> of kernel memory that can be pinned down by a single tun interface.
>
> In this case, all we're doing is shifting the accounting from the
> "hardware" queue to the qdisc queue.
>
> So your ability to flood a tun interface is essentially unchanged.
I've just been looking at VPN performance, using netperf to flood an
openconnect/ocserv connection over GigE and profiling my VPN client.
If I run netperf over the *unencrypted* link, it only sends 1Gb/s of
packets — because the packets are correctly accounted to netperf's UDP
socket until the moment they're actually transmitted on the wire, and
the backpressure works correctly.
When I run over the VPN, netperf thinks it sent 2½ times the amount of
TX traffic. Packets are being dropped by the tun device before even
feeding them up to the VPN client to be sent — presumably because of
this skb_orphan() call. (The client itself should do the right thing,
and only suck packets out of the tun at the rate it can shove them out
*its* UDP socket.)
Did we ever look at the alternative solution of taking ownership only
after a timeout, or on demand when we need to shut down the device?
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]
next prev parent reply other threads:[~2015-02-01 11:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 14:59 [Qemu-devel] [PATCH] tun: orphan an skb on tx Michael S. Tsirkin
2010-04-13 15:12 ` [Qemu-devel] " Herbert Xu
2010-04-13 15:36 ` Jan Kiszka
2010-04-13 16:40 ` Eric Dumazet
2010-04-13 16:52 ` Jan Kiszka
2010-04-13 17:39 ` Michael S. Tsirkin
2010-04-13 18:31 ` Eric Dumazet
2010-04-13 20:25 ` Michael S. Tsirkin
2010-04-13 20:38 ` Eric Dumazet
2010-04-13 20:43 ` Michael S. Tsirkin
2010-04-14 0:58 ` Herbert Xu
2010-04-14 11:55 ` David Miller
2015-02-01 11:20 ` David Woodhouse [this message]
2015-02-01 12:26 ` [Qemu-devel] " Michael S. Tsirkin
2015-02-01 13:33 ` David Woodhouse
2015-02-01 20:19 ` David Miller
2015-02-01 21:29 ` David Woodhouse
2015-02-02 5:07 ` David Miller
2015-02-02 7:27 ` David Woodhouse
2015-02-02 8:24 ` Steffen Klassert
2015-02-02 15:30 ` David Woodhouse
2015-02-02 15:23 ` Phil Sutter
2015-02-02 15:47 ` David Woodhouse
2015-02-04 0:19 ` David Miller
2015-02-04 6:35 ` David Woodhouse
2010-04-21 11:35 ` [Qemu-devel] " Michael S. Tsirkin
2010-04-21 11:46 ` Jan Kiszka
2010-04-21 11:45 ` Michael S. Tsirkin
2010-04-21 19:16 ` [Qemu-devel] Re: [stable] " Greg KH
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=1422789633.11044.18.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.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).