diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-02-10 02:24:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 02:24:08 -0500 |
commit | bd9fb1a44a5c52a1c322ebacd08f6b7416a40a86 (patch) | |
tree | 0157167dfbecc8377930cb57e71012d9264b7b99 /drivers/net/enic | |
parent | ed8af6b288c0643dfe0ad91f1bfc8c56c0d307cc (diff) |
enic: record all bad FCS errs as frame errors
Report all bad FCS errs as frames errs. This includes frames with bad
FCS on wire detected by MAC and frames which may be truncated due to
ingress FIFO overruns. No longer print a driver msg on bad FCS err.
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 | 10 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index 86b8c15b4d3e..c26cea0b300e 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h | |||
@@ -97,6 +97,7 @@ struct enic { | |||
97 | ____cacheline_aligned struct vnic_rq rq[1]; | 97 | ____cacheline_aligned struct vnic_rq rq[1]; |
98 | unsigned int rq_count; | 98 | unsigned int rq_count; |
99 | int (*rq_alloc_buf)(struct vnic_rq *rq); | 99 | int (*rq_alloc_buf)(struct vnic_rq *rq); |
100 | u64 rq_bad_fcs; | ||
100 | struct napi_struct napi; | 101 | struct napi_struct napi; |
101 | struct net_lro_mgr lro_mgr; | 102 | struct net_lro_mgr lro_mgr; |
102 | struct net_lro_desc lro_desc[ENIC_LRO_MAX_DESC]; | 103 | struct net_lro_desc lro_desc[ENIC_LRO_MAX_DESC]; |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index e9bc79a6f303..798cf506bffd 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -688,7 +688,7 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev) | |||
688 | net_stats->rx_bytes = stats->rx.rx_bytes_ok; | 688 | net_stats->rx_bytes = stats->rx.rx_bytes_ok; |
689 | net_stats->rx_errors = stats->rx.rx_errors; | 689 | net_stats->rx_errors = stats->rx.rx_errors; |
690 | net_stats->multicast = stats->rx.rx_multicast_frames_ok; | 690 | net_stats->multicast = stats->rx.rx_multicast_frames_ok; |
691 | net_stats->rx_crc_errors = stats->rx.rx_crc_errors; | 691 | net_stats->rx_crc_errors = enic->rq_bad_fcs; |
692 | net_stats->rx_dropped = stats->rx.rx_no_bufs; | 692 | net_stats->rx_dropped = stats->rx.rx_no_bufs; |
693 | 693 | ||
694 | return net_stats; | 694 | return net_stats; |
@@ -933,12 +933,8 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq, | |||
933 | 933 | ||
934 | if (packet_error) { | 934 | if (packet_error) { |
935 | 935 | ||
936 | if (bytes_written > 0 && !fcs_ok) { | 936 | if (bytes_written > 0 && !fcs_ok) |
937 | if (net_ratelimit()) | 937 | enic->rq_bad_fcs++; |
938 | printk(KERN_ERR PFX | ||
939 | "%s: packet error: bad FCS\n", | ||
940 | netdev->name); | ||
941 | } | ||
942 | 938 | ||
943 | dev_kfree_skb_any(skb); | 939 | dev_kfree_skb_any(skb); |
944 | 940 | ||