Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 350991e1 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller
Browse files

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: default avatarScott Feldman <scofeldm@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56ac88b3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+8 −3
Original line number Diff line number Diff line
@@ -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)
		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);