From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Michael Breuer <mbreuer@majjas.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] sky2: Flow control frames recorded as dropped packets
Date: Wed, 3 Feb 2010 10:31:12 -0800 [thread overview]
Message-ID: <20100203103112.091b1b14@nehalam> (raw)
In-Reply-To: <4B69AAA9.20505@majjas.com>
Thanks for your patch. A more general solution would be to move the
rx_dropped up into sky2_receive.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/sky2.c 2010-02-03 09:10:27.863367226 -0800
+++ b/drivers/net/sky2.c 2010-02-03 09:17:01.602741445 -0800
@@ -2404,6 +2404,9 @@ okay:
skb = receive_copy(sky2, re, length);
else
skb = receive_new(sky2, re, length);
+
+ dev->stats.rx_dropped += (skb == NULL);
+
resubmit:
sky2_rx_submit(sky2, re);
@@ -2515,11 +2518,10 @@ static int sky2_status_intr(struct sky2_
case OP_RXSTAT:
total_packets[port]++;
total_bytes[port] += length;
+
skb = sky2_receive(dev, length, status);
- if (unlikely(!skb)) {
- dev->stats.rx_dropped++;
+ if (!skb)
break;
- }
/* This chip reports checksum status differently */
if (hw->flags & SKY2_HW_NEW_LE) {
prev parent reply other threads:[~2010-02-03 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 16:56 [PATCH] sky2: Flow control frames recorded as dropped packets Michael Breuer
2010-02-03 17:10 ` Stephen Hemminger
2010-02-03 18:31 ` Stephen Hemminger [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=20100203103112.091b1b14@nehalam \
--to=shemminger@linux-foundation.org \
--cc=mbreuer@majjas.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;
as well as URLs for NNTP newsgroup(s).