Commit bd9fb1a4 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

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: default avatarScott Feldman <scofeldm@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed8af6b2
...@@ -97,6 +97,7 @@ struct enic { ...@@ -97,6 +97,7 @@ struct enic {
____cacheline_aligned struct vnic_rq rq[1]; ____cacheline_aligned struct vnic_rq rq[1];
unsigned int rq_count; unsigned int rq_count;
int (*rq_alloc_buf)(struct vnic_rq *rq); int (*rq_alloc_buf)(struct vnic_rq *rq);
u64 rq_bad_fcs;
struct napi_struct napi; struct napi_struct napi;
struct net_lro_mgr lro_mgr; struct net_lro_mgr lro_mgr;
struct net_lro_desc lro_desc[ENIC_LRO_MAX_DESC]; struct net_lro_desc lro_desc[ENIC_LRO_MAX_DESC];
......
...@@ -688,7 +688,7 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev) ...@@ -688,7 +688,7 @@ static struct net_device_stats *enic_get_stats(struct net_device *netdev)
net_stats->rx_bytes = stats->rx.rx_bytes_ok; net_stats->rx_bytes = stats->rx.rx_bytes_ok;
net_stats->rx_errors = stats->rx.rx_errors; net_stats->rx_errors = stats->rx.rx_errors;
net_stats->multicast = stats->rx.rx_multicast_frames_ok; net_stats->multicast = stats->rx.rx_multicast_frames_ok;
net_stats->rx_crc_errors = stats->rx.rx_crc_errors; 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;
return net_stats; return net_stats;
...@@ -933,12 +933,8 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq, ...@@ -933,12 +933,8 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,
if (packet_error) { if (packet_error) {
if (bytes_written > 0 && !fcs_ok) { if (bytes_written > 0 && !fcs_ok)
if (net_ratelimit()) enic->rq_bad_fcs++;
printk(KERN_ERR PFX
"%s: packet error: bad FCS\n",
netdev->name);
}
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment