From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: paul.moore@hp.com, David.Woodhouse@intel.com,
eric.dumazet@gmail.com, mst@redhat.com, jan.kiszka@siemens.com,
linux-kernel@vger.kernel.org, qemu-devel@nongnu.org,
netdev@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] tun: orphan an skb on tx
Date: Wed, 14 Apr 2010 04:55:06 -0700 (PDT) [thread overview]
Message-ID: <20100414.045506.52212061.davem@davemloft.net> (raw)
In-Reply-To: <20100414005822.GD18044@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 14 Apr 2010 08:58:22 +0800
> 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.
>
> BTW we do the same thing in a number of hardware drivers, as well
> as virtio-net.
Right. Although this reminds me about the whole SKB
orphaning on xmit issue that keeps coming back to haunt
us.
If there weren't odd references to the SKB's socket in
the packet scheduler et al. we could just orphan these
things right upon entry to the qdisc and not have to
add hacks like this to every driver.
In fact... maybe we can just do it in dev_hard_queue_xmit()
since we are out of the qdisc at that point.... but I guess
there might be weird drivers that want the SKB socket in
their ->xmit routine... Ho hum.
In any event that's net-next-2.6 exploratory material, and I've
applied this patch to net-2.6, thanks!
next prev parent reply other threads:[~2010-04-14 12:34 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 [this message]
2015-02-01 11:20 ` [Qemu-devel] " David Woodhouse
2015-02-01 12:26 ` 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=20100414.045506.52212061.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Woodhouse@intel.com \
--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).