netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Breuer <mbreuer@majjas.com>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Subject: [PATCH] sky2: Flow control frames recorded as dropped packets
Date: Wed, 03 Feb 2010 11:56:09 -0500	[thread overview]
Message-ID: <4B69AAA9.20505@majjas.com> (raw)

When a flow control packet is received, sky2_receive resubmits the i/o. 
Upon exit, sky2_status_intr counts these as dropped packets.

This fix just skips the rx_dropped accounting in this one case. It 
didn't seem worthwhile to change sky2_receive to deal differently.

This is my first patch submission - comments more than welcome.

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 95fd10f..bcb035c 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2525,7 +2517,8 @@ static int sky2_status_intr(struct sky2_hw *hw, 
int to_do, u16 idx)
                         total_bytes[port] += length;
                         skb = sky2_receive(dev, length, status);
                         if (unlikely(!skb)) {
-                               dev->stats.rx_dropped++;
+                               if (!(status & GMR_FS_GOOD_FC) )
+                                       dev->stats.rx_dropped++;
                                 break;
                         }


             reply	other threads:[~2010-02-03 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 16:56 Michael Breuer [this message]
2010-02-03 17:10 ` [PATCH] sky2: Flow control frames recorded as dropped packets Stephen Hemminger
2010-02-03 18:31 ` Stephen Hemminger

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=4B69AAA9.20505@majjas.com \
    --to=mbreuer@majjas.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).