qede: Add support for capturing additional stats in ethtool-stats display.
authorSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Tue, 16 Aug 2016 14:51:01 +0000 (10:51 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 04:11:45 +0000 (21:11 -0700)
The patch adds driver support for capturing stats ttl0_discard and
packet_too_big_discard in "ethtool -S" display.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede.h
drivers/net/ethernet/qlogic/qede/qede_ethtool.c
drivers/net/ethernet/qlogic/qede/qede_main.c

index 02b06d4e40ae17db233ef807ebf37df1b29f1e00..9060c2ad9d6220ea24a1699e9fcf4a21758f15a7 100644 (file)
@@ -36,6 +36,8 @@
 
 struct qede_stats {
        u64 no_buff_discards;
+       u64 packet_too_big_discard;
+       u64 ttl0_discard;
        u64 rx_ucast_bytes;
        u64 rx_mcast_bytes;
        u64 rx_bcast_bytes;
index 427e043a033f961a256047228bff7e808a59ee83..c035e3c2349d8ca98c8b9b859cf2fa8326cb9b96 100644 (file)
@@ -107,6 +107,8 @@ static const struct {
        QEDE_PF_STAT(mftag_filter_discards),
        QEDE_PF_STAT(mac_filter_discards),
        QEDE_STAT(tx_err_drop_pkts),
+       QEDE_STAT(ttl0_discard),
+       QEDE_STAT(packet_too_big_discard),
 
        QEDE_STAT(coalesced_pkts),
        QEDE_STAT(coalesced_events),
index 5ce8a3c9ed6f15617071e6c4741d002daf780ec5..467d0eb043dfbe2900a9356f34717ec94b6ac6d8 100644 (file)
@@ -1694,6 +1694,8 @@ void qede_fill_by_demand_stats(struct qede_dev *edev)
 
        edev->ops->get_vport_stats(edev->cdev, &stats);
        edev->stats.no_buff_discards = stats.no_buff_discards;
+       edev->stats.packet_too_big_discard = stats.packet_too_big_discard;
+       edev->stats.ttl0_discard = stats.ttl0_discard;
        edev->stats.rx_ucast_bytes = stats.rx_ucast_bytes;
        edev->stats.rx_mcast_bytes = stats.rx_mcast_bytes;
        edev->stats.rx_bcast_bytes = stats.rx_bcast_bytes;