diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-09-03 13:02:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-03 23:19:18 -0400 |
commit | 350991e12ac1ac407850169a0d65f522a7fd029e (patch) | |
tree | 68a3553d8de4cc55173dd15e392f42616ca19d8f /drivers/net/enic/enic_main.c | |
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/enic_main.c')
-rw-r--r-- | drivers/net/enic/enic_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
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) | |||
738 | net_stats->rx_bytes = stats->rx.rx_bytes_ok; | 738 | net_stats->rx_bytes = stats->rx.rx_bytes_ok; |
739 | net_stats->rx_errors = stats->rx.rx_errors; | 739 | net_stats->rx_errors = stats->rx.rx_errors; |
740 | net_stats->multicast = stats->rx.rx_multicast_frames_ok; | 740 | net_stats->multicast = stats->rx.rx_multicast_frames_ok; |
741 | net_stats->rx_over_errors = enic->rq_truncated_pkts; | ||
741 | net_stats->rx_crc_errors = enic->rq_bad_fcs; | 742 | net_stats->rx_crc_errors = enic->rq_bad_fcs; |
742 | net_stats->rx_dropped = stats->rx.rx_no_bufs; | 743 | net_stats->rx_dropped = stats->rx.rx_no_bufs + stats->rx.rx_drop; |
743 | 744 | ||
744 | return net_stats; | 745 | return net_stats; |
745 | } | 746 | } |
@@ -1029,8 +1030,12 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq, | |||
1029 | 1030 | ||
1030 | if (packet_error) { | 1031 | if (packet_error) { |
1031 | 1032 | ||
1032 | if (bytes_written > 0 && !fcs_ok) | 1033 | if (!fcs_ok) { |
1033 | enic->rq_bad_fcs++; | 1034 | if (bytes_written > 0) |
1035 | enic->rq_bad_fcs++; | ||
1036 | else if (bytes_written == 0) | ||
1037 | enic->rq_truncated_pkts++; | ||
1038 | } | ||
1034 | 1039 | ||
1035 | dev_kfree_skb_any(skb); | 1040 | dev_kfree_skb_any(skb); |
1036 | 1041 | ||