提交 90c30335 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

sky2: Flow control frames recorded as dropped packets

Thanks for your patch.  A more general solution would be to move the
rx_dropped up into sky2_receive.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3fbd9187
...@@ -2404,6 +2404,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, ...@@ -2404,6 +2404,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
skb = receive_copy(sky2, re, length); skb = receive_copy(sky2, re, length);
else else
skb = receive_new(sky2, re, length); skb = receive_new(sky2, re, length);
dev->stats.rx_dropped += (skb == NULL);
resubmit: resubmit:
sky2_rx_submit(sky2, re); sky2_rx_submit(sky2, re);
...@@ -2515,11 +2518,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) ...@@ -2515,11 +2518,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
case OP_RXSTAT: case OP_RXSTAT:
total_packets[port]++; total_packets[port]++;
total_bytes[port] += length; total_bytes[port] += length;
skb = sky2_receive(dev, length, status); skb = sky2_receive(dev, length, status);
if (unlikely(!skb)) { if (!skb)
dev->stats.rx_dropped++;
break; break;
}
/* This chip reports checksum status differently */ /* This chip reports checksum status differently */
if (hw->flags & SKY2_HW_NEW_LE) { if (hw->flags & SKY2_HW_NEW_LE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册