net: stmmac: Add a counter for Split Header packets
authorJose Abreu <Jose.Abreu@synopsys.com>
Sat, 17 Aug 2019 18:54:44 +0000 (20:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Aug 2019 19:43:59 +0000 (12:43 -0700)
Add a counter that increments each time a packet with split header is
received.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 527f961579f4080a48f8fc46588030b8c2014642..1303ec81fd3d2d5d8b24ac98d1d031d2f3710485 100644 (file)
@@ -75,6 +75,7 @@ struct stmmac_extra_stats {
        unsigned long rx_missed_cntr;
        unsigned long rx_overflow_cntr;
        unsigned long rx_vlan;
+       unsigned long rx_split_hdr_pkt_n;
        /* Tx/Rx IRQ error info */
        unsigned long tx_undeflow_irq;
        unsigned long tx_process_stopped_irq;
index 2423160ab582889178de087f7285ad720b3be886..eb784fdb6d32ea70176b9820b8020d0528b44274 100644 (file)
@@ -65,6 +65,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
        STMMAC_STAT(rx_missed_cntr),
        STMMAC_STAT(rx_overflow_cntr),
        STMMAC_STAT(rx_vlan),
+       STMMAC_STAT(rx_split_hdr_pkt_n),
        /* Tx/Rx IRQ error info */
        STMMAC_STAT(tx_undeflow_irq),
        STMMAC_STAT(tx_process_stopped_irq),
index 60e5f35847902eb5ca009a0569538d1c90a1d32d..f2a198eda20bd247ecf71242319b55c8abe26e56 100644 (file)
@@ -3503,6 +3503,7 @@ read_again:
                                len = hlen;
 
                                prefetch(page_address(buf->sec_page));
+                               priv->xstats.rx_split_hdr_pkt_n++;
                        }
 
                        skb = napi_alloc_skb(&ch->rx_napi, len);