Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

3C509: rx_bytes should not be increased when alloc_skb failed

If alloc_skb failed, the recieved packet will be dropped. Do not increase
rx_bytes for dropped packet.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

Wang Chen and committed by
Jeff Garzik
f7f312a0 56cfe5d0

+1 -1
+1 -1
drivers/net/3c509.c
··· 1063 1063 struct sk_buff *skb; 1064 1064 1065 1065 skb = dev_alloc_skb(pkt_len+5); 1066 - dev->stats.rx_bytes += pkt_len; 1067 1066 if (el3_debug > 4) 1068 1067 printk("Receiving packet size %d status %4.4x.\n", 1069 1068 pkt_len, rx_status); ··· 1077 1078 skb->protocol = eth_type_trans(skb,dev); 1078 1079 netif_rx(skb); 1079 1080 dev->last_rx = jiffies; 1081 + dev->stats.rx_bytes += pkt_len; 1080 1082 dev->stats.rx_packets++; 1081 1083 continue; 1082 1084 }