From: Max Krasnyansky <maxk@qualcomm.com>
To: David Miller <davem@davemloft.net>
Cc: borntraeger@de.ibm.com, netdev@vger.kernel.org
Subject: Re: [PATCH] tun: Persistent devices can get stuck in xoff state
Date: Thu, 10 Jul 2008 17:53:34 -0700 [thread overview]
Message-ID: <4876AF0E.507@qualcomm.com> (raw)
In-Reply-To: <20080710.170007.68764077.davem@davemloft.net>
David Miller wrote:
> From: Max Krasnyansky <maxk@qualcomm.com>
> Date: Wed, 09 Jul 2008 14:19:28 -0700
>
>> Christian Borntraeger wrote:
>>> Am Mittwoch, 9. Juli 2008 schrieb Max Krasnyansky:
>>>> The scenario goes like this. App stops reading from tun/tap.
>>>> TX queue gets full and driver does netif_stop_queue().
>>>> App closes fd and TX queue gets flushed as part of the cleanup.
>>>> Next time the app opens tun/tap and starts reading from it but
>>>> the xoff state is not cleared. We're stuck.
>>>> Normally xoff state is cleared when netdev is brought up. But
>>>> in the case of persistent devices this happens only during
>>>> initial setup.
>>> I was able to reproduce the problem. The patch seems to fix it.
>>>
>>> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> Oh it definitely fixes that problem. It's very easy to reproduce by just
>> suspending (ctrl-z) an app that is ready from the tun, waiting a bit for
>> the queue to fill up and then killing the app. I have a simple test app
>> that simulates this. It's just that in real life that does not happen
>> very often. ie Applications either constantly read from tun or they
>> close it.
>>
>> Thanks a lot for testing and confirming.
>
> I've applied this, thanks.
>
> But I had to apply it by hand. You made this against an older
> tree, because in the current code there is a get_net() call
> right before the new lines you added but in your patch context
> it isn't there.
Hmm, I though I used latest git tree. Oh, turns out it was 2.6.25.4.
Sorry. Thanx for fixing it.
Max
prev parent reply other threads:[~2008-07-11 0:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 6:24 [PATCH] tun: Persistent devices can get stuck in xoff state Max Krasnyansky
2008-07-09 15:15 ` Christian Borntraeger
2008-07-09 21:15 ` Max Krasnyansky
2008-07-09 15:59 ` Christian Borntraeger
2008-07-09 21:19 ` Max Krasnyansky
2008-07-11 0:00 ` David Miller
2008-07-11 0:53 ` Max Krasnyansky [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=4876AF0E.507@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=borntraeger@de.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.