From: Eric Dumazet <eric.dumazet@gmail.com>
To: igorm@etf.rs
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Realtek linux nic maintainers <nic_swsd@realtek.com>,
Francois Romieu <romieu@fr.zoreil.com>,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next] r8169: Support for byte queue limits
Date: Fri, 02 Dec 2011 16:11:27 +0100 [thread overview]
Message-ID: <1322838687.2762.18.camel@edumazet-laptop> (raw)
In-Reply-To: <CAFdo_mVwRgB3OEBA7=nMcemr1x1WLkXC05UAnDW_n5gyYy9W=A@mail.gmail.com>
Le vendredi 02 décembre 2011 à 15:54 +0100, Igor Maravić a écrit :
> > Hmm... What about rtl8169_tx_clear_range() or rtl8169_tx_clear() ?
> >
>
> You mean we should put netdev_reset_queue() in those functions?
>
> I think that we shouldn't put any thing in these functions.
>
> When ever they are called, they are precede/followed by function
> rtl8169_hw_reset() which calls rtl_hw_reset() which calls
> rtl8169_init_ring_indexes() in which I've put netdev_reset_queue()
>
> Only time when rtl8169_tx_clear_range() isn't preceded/followed by
> rtl8169_hw_reset() is in function rtl8169_xmit_frags(). In that
> function it's
> called only in case there's an error. In case there was an error in that
> function, netdev_sent_queue() will never be called, so we are going to have
> accurate length of queue.
Quite frankly, any queued skb is eventually freed, so
netdev_reset_queue() could be avoided.
r8169 driver has some problems (see current threads on netdev about it),
and its not very clear that BQL locking requirements are going to be
respected. This can lead to inaccurate BQL counts and a txqueue freeze.
(In particular, a chip reset can be triggered by an IRQ, while another
cpu is currently sending an skb through ndo_start_xmit())
So I advise not using netdev_reset_queue() in this driver, only
netdev_completed_queue(), and make sure that their calls are serialized
under a given lock (see include/linux/dynamic_queue_limits.h comments)
next prev parent reply other threads:[~2011-12-02 15:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 13:09 [PATCH net-next] r8169: Support for byte queue limits igorm
2011-12-02 14:29 ` Eric Dumazet
2011-12-02 14:54 ` Igor Maravić
2011-12-02 15:11 ` Eric Dumazet [this message]
2011-12-02 16:31 ` "Igor Maravić"
2011-12-02 16:47 ` Eric Dumazet
2011-12-02 17:00 ` Igor Maravić
2011-12-02 17:12 ` Eric Dumazet
2011-12-02 21:54 ` Igor Maravić
2011-12-03 6:48 ` Eric Dumazet
2011-12-03 0:20 ` Francois Romieu
-- strict thread matches above, loose matches on Subject: below --
2011-12-06 9:13 igorm
2011-12-06 9:15 ` Igor Maravić
2011-12-06 18:13 ` David Miller
2011-12-06 21:36 ` Igor Maravić
2011-12-06 21:41 ` David Miller
2011-12-12 13:00 igorm
2011-12-16 21:15 ` David Miller
2011-12-16 21:30 ` Eric Dumazet
2011-12-17 17:28 ` Igor Maravić
2011-12-19 9:27 igorm
2011-12-19 9:29 ` Igor Maravić
2011-12-19 9:46 ` Eric Dumazet
2011-12-19 9:53 ` Igor Maravić
2011-12-19 10:09 igorm
2011-12-19 10:19 ` Eric Dumazet
2011-12-19 10:28 igorm
2011-12-19 19:18 ` David Miller
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=1322838687.2762.18.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=igorm@etf.rs \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=romieu@fr.zoreil.com \
--cc=therbert@google.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