Subject: Re: [PATCH -next] tun: stop tx queue when limit is hit

From: Florian Westphal <[email-masked]>
Date: Mon, 21 Jul 2014 11:19:13 +0200

Eric Dumazet <[email-masked]> wrote:
> On Mon, 2014-07-21 at 10:31 +0200, Florian Westphal wrote:
> > Michael, do you think we could restore the 'stop queue' default
> > behaviour?
> > 
> > Looking at your changelog, the only concern seems to be the
> > 'packets never consumed'/'receiver is stuck forever' case.
> > 
> > What about reverting 5d097109257c03a7184, and then adding some
> > type of tun watchdog that will zap the rcv queue + tx queue wakeup?
> > 
> > That should be quite noisy if we combine it with the WARN_ON
> > you usually get when (physical) NIC driver detect stalled tx unit.
> > 
> > What do you think?
> 
> Note that this patch had the ability to choose the behavior (drop or
> back pressure)
> 
>  http://patchwork.ozlabs.org/patch/338951/ ?

Eric, many thanks for this pointer.  In fact, the related discussions
in v2 of the patchset (http://patchwork.ozlabs.org/patch/338803/)
also answers my questions above.

[ the concern is with applications that can get stuck just because
  packet they sent is queued forever ]

I need to think about this some more, but in any case Michael outlined
a possible solution (limit queue delay) in the thread above.

Thanks,
Florian