diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-09-03 17:02:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-03 20:19:18 -0700 |
commit | 350991e12ac1ac407850169a0d65f522a7fd029e (patch) | |
tree | 68a3553d8de4cc55173dd15e392f42616ca19d8f /drivers/net/enic | |
parent | 56ac88b38e5918d92bdfc97c528068e45ff4581c (diff) |
enic: bug fix: included MAC drops in rx_dropped netstat
Bug fix: included MAC drops in rx_dropped netstat. Also track Rx trunctations
stat at the MAC
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic.h | 1 | ||||
-rw-r--r-- | drivers/net/enic/enic_main.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index cfe94b2e03af..f7c5b334bc79 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h @@ -99,6 +99,7 @@ struct enic { ____cacheline_aligned struct vnic_rq rq[1]; unsigned int rq_count; int (*rq_alloc_buf)(struct vnic_rq *rq); + u64 rq_truncated_pkts; u64 rq_bad_fcs; struct napi_struct napi; struct net_lro_mgr lro_mgr; diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 36cf0fcc66fe..b265b103c210 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -738,8 +738,9 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev) net_stats->rx_bytes = stats->rx.rx_bytes_ok; net_stats->rx_errors = stats->rx.rx_errors; net_stats->multicast = stats->rx.rx_multicast_frames_ok; + net_stats->rx_over_errors = enic->rq_truncated_pkts; net_stats->rx_crc_errors = enic->rq_bad_fcs; - net_stats->rx_dropped = stats->rx.rx_no_bufs; + net_stats->rx_dropped = stats->rx.rx_no_bufs + stats->rx.rx_drop; return net_stats; } @@ -1029,8 +1030,12 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq, if (packet_error) { - if (bytes_written > 0 && !fcs_ok) - enic->rq_bad_fcs++; + if (!fcs_ok) { + if (bytes_written > 0) + enic->rq_bad_fcs++; + else if (bytes_written == 0) + enic->rq_truncated_pkts++; + } dev_kfree_skb_any(skb); |