| Submitter | Michael Breuer |
|---|---|
| Date | Feb. 3, 2010, 4:56 p.m. |
| Message ID | <4B69AAA9.20505@majjas.com> |
| Download | mbox | patch |
| Permalink | /patch/44392/ |
| State | Changes Requested |
| Delegated to: | David Miller |
| Headers | show |
Comments
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
Patch
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; }