Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: netdev <netdev@vger.kernel.org>
Cc: linux-net-drivers <linux-net-drivers@solarflare.com>
Subject: TX watchdog vs link-layer flow control
Date: Thu, 02 Jun 2011 21:48:40 +0100	[thread overview]
Message-ID: <1307047720.2812.59.camel@bwh-desktop> (raw)

The TX watchdog will fire if and only if a TX queue remains stopped for
a certain period for no apparent reason.  Specifically, it requires
netif_device_present(dev) && netif_running(dev) &&
netif_carrier_ok(dev).

However, even if the link is up it can still be blocked by link-layer
flow control.  A customer report (which has not yet been reproduced
here) suggests that when Ethernet flow control is enabled a switch may
in some circumstances throttle the TX packet rate to the extent that a
TX queue cannot be unblocked before the watchdog fires.  It is certainly
possible for a misbehaving link partner to do this, and this should
probably not be considered as a bug in the local hardware or driver!

TX may also be blocked by a 'remote fault' indication.  This should
possibly be translated into netif_carrier_off(), but I'm not sure that
all drivers will be able to detect remote fault without polling.

Perhaps dev_watchdog() should support a driver operation to poll for
cases like this before it decides that the local device is actually
misbehaving?

Even then, I can't think of a reliable way to detect a pause frame
flood.  Also, drivers might well require process context for such an
operation.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


             reply	other threads:[~2011-06-02 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 20:48 Ben Hutchings [this message]
2011-06-02 20:55 ` TX watchdog vs link-layer flow control David Miller
2011-06-02 21:01 ` Ben Hutchings

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=1307047720.2812.59.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=linux-net-drivers@solarflare.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox