From: David Miller <davem@davemloft.net>
To: mst@redhat.com
Cc: netdev@vger.kernel.org, jasowang@redhat.com,
nhorman@tuxdriver.com, ramirose@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tun: only queue packets on device
Date: Mon, 03 Dec 2012 13:41:32 -0500 (EST) [thread overview]
Message-ID: <20121203.134132.558381056546064453.davem@davemloft.net> (raw)
In-Reply-To: <20121203131942.GA27953@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 3 Dec 2012 15:19:43 +0200
> Historically tun supported two modes of operation:
> - in default mode, a small number of packets would get queued
> at the device, the rest would be queued in qdisc
> - in one queue mode, all packets would get queued at the device
>
> This might have made sense up to a point where we made the
> queue depth for both modes the same and set it to
> a huge value (500) so unless the consumer
> is stuck the chance of losing packets is small.
>
> Thus in practice both modes behave the same, but the
> default mode has some problems:
> - if packets are never consumed, fragments are never orphaned
> which cases a DOS for sender using zero copy transmit
> - overrun errors are hard to diagnose: fifo error is incremented
> only once so you can not distinguish between
> userspace that is stuck and a transient failure,
> tcpdump on the device does not show any traffic
>
> Userspace solves this simply by enabling IFF_ONE_QUEUE
> but there seems to be little point in not doing the
> right thing for everyone, by default.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Now that TUN_NO_QUEUE has no real effect and is a NOP, please document
it as such both in if_tun.h and the places in the driver that flip the
bit based upon userspace requests.
Thanks.
prev parent reply other threads:[~2012-12-03 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 13:19 [PATCH] tun: only queue packets on device Michael S. Tsirkin
2012-12-03 18:41 ` David Miller [this message]
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=20121203.134132.558381056546064453.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=ramirose@gmail.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).