When driver can't allocate receive buffer it drops incoming
packet. Keep a counter.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
---
drivers/net/sky2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- 2.6.21-rc1.orig/drivers/net/sky2.c 2007-05-14 12:10:13.000000000 -0700
+++ 2.6.21-rc1/drivers/net/sky2.c 2007-05-14 12:10:16.000000000 -0700
@@ -2141,8 +2141,10 @@ static int sky2_status_intr(struct sky2_
switch (le->opcode & ~HW_OWNER) {
case OP_RXSTAT:
skb = sky2_receive(dev, length, status);
- if (!skb)
+ if (unlikely(!skb)) {
+ sky2->net_stats.rx_dropped++;
goto force_update;
+ }
skb->protocol = eth_type_trans(skb, dev);
sky2->net_stats.rx_packets++;
--
Stephen Hemminger <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html