From: Stephen Hemminger <shemminger@vyatta.com>
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 09:10:50 -0800 [thread overview]
Message-ID: <20100203091050.2a734a3e@nehalam> (raw)
In-Reply-To: <4B69AAA9.20505@majjas.com>
On Wed, 03 Feb 2010 11:56:09 -0500
Michael Breuer <mbreuer@majjas.com> wrote:
> 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;
> }
>
Since FC should be absorbed by MAC, it would be better to never receive
send them up stream. I'll make a patch for that
--
next prev parent reply other threads:[~2010-02-03 17:11 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 [this message]
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=20100203091050.2a734a3e@nehalam \
--to=shemminger@vyatta.com \
--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).