From e470355bd96ad50c634e0e31d27be41f93440f60 Mon Sep 17 00:00:00 2001 From: Shannon Nelson Date: Tue, 3 Sep 2019 15:28:19 -0700 Subject: ionic: Add driver stats Add in the detailed statistics for ethtool -S that the driver keeps as it processes packets. Display of the additional debug statistics can be enabled through the ethtool priv-flags feature. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller --- drivers/net/ethernet/pensando/ionic/ionic_lif.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/pensando/ionic/ionic_lif.h') diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h index db6d5e016607..4e0b65ddd8e0 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h @@ -12,7 +12,7 @@ #define IONIC_MAX_NUM_NAPI_CNTR (NAPI_POLL_WEIGHT + 1) #define IONIC_MAX_NUM_SG_CNTR (IONIC_TX_MAX_SG_ELEMS + 1) -#define IONIC_RX_COPYBREAK_DEFAULT 256 +#define IONIC_RX_COPYBREAK_DEFAULT 256 struct ionic_tx_stats { u64 dma_map_err; @@ -106,8 +106,22 @@ struct ionic_deferred { struct work_struct work; }; +struct ionic_lif_sw_stats { + u64 tx_packets; + u64 tx_bytes; + u64 rx_packets; + u64 rx_bytes; + u64 tx_tso; + u64 tx_no_csum; + u64 tx_csum; + u64 rx_csum_none; + u64 rx_csum_complete; + u64 rx_csum_error; +}; + enum ionic_lif_state_flags { IONIC_LIF_INITED, + IONIC_LIF_SW_DEBUG_STATS, IONIC_LIF_UP, IONIC_LIF_LINK_CHECK_REQUESTED, IONIC_LIF_QUEUE_RESET, -- cgit