diff options
Diffstat (limited to 'sys/dev/pci/if_icevar.h')
-rw-r--r-- | sys/dev/pci/if_icevar.h | 79 |
1 files changed, 78 insertions, 1 deletions
diff --git a/sys/dev/pci/if_icevar.h b/sys/dev/pci/if_icevar.h index 1a59040aa72..28725a5ac32 100644 --- a/sys/dev/pci/if_icevar.h +++ b/sys/dev/pci/if_icevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_icevar.h,v 1.2 2024/11/15 15:41:10 stsp Exp $ */ +/* $OpenBSD: if_icevar.h,v 1.3 2024/11/19 09:41:32 stsp Exp $ */ /* Copyright (c) 2024, Intel Corporation * All rights reserved. @@ -4133,6 +4133,83 @@ struct ice_vsi_hw_stats { bool offsets_loaded; }; +/* Statistics collected by the MAC */ +struct ice_hw_port_stats { + /* eth stats collected by the port */ + struct ice_eth_stats eth; + /* additional port specific stats */ + uint64_t tx_dropped_link_down; /* tdold */ + uint64_t crc_errors; /* crcerrs */ + uint64_t illegal_bytes; /* illerrc */ + uint64_t error_bytes; /* errbc */ + uint64_t mac_local_faults; /* mlfc */ + uint64_t mac_remote_faults; /* mrfc */ + uint64_t rx_len_errors; /* rlec */ + uint64_t link_xon_rx; /* lxonrxc */ + uint64_t link_xoff_rx; /* lxoffrxc */ + uint64_t link_xon_tx; /* lxontxc */ + uint64_t link_xoff_tx; /* lxofftxc */ + uint64_t priority_xon_rx[8]; /* pxonrxc[8] */ + uint64_t priority_xoff_rx[8]; /* pxoffrxc[8] */ + uint64_t priority_xon_tx[8]; /* pxontxc[8] */ + uint64_t priority_xoff_tx[8]; /* pxofftxc[8] */ + uint64_t priority_xon_2_xoff[8];/* pxon2offc[8] */ + uint64_t rx_size_64; /* prc64 */ + uint64_t rx_size_127; /* prc127 */ + uint64_t rx_size_255; /* prc255 */ + uint64_t rx_size_511; /* prc511 */ + uint64_t rx_size_1023; /* prc1023 */ + uint64_t rx_size_1522; /* prc1522 */ + uint64_t rx_size_big; /* prc9522 */ + uint64_t rx_undersize; /* ruc */ + uint64_t rx_fragments; /* rfc */ + uint64_t rx_oversize; /* roc */ + uint64_t rx_jabber; /* rjc */ + uint64_t tx_size_64; /* ptc64 */ + uint64_t tx_size_127; /* ptc127 */ + uint64_t tx_size_255; /* ptc255 */ + uint64_t tx_size_511; /* ptc511 */ + uint64_t tx_size_1023; /* ptc1023 */ + uint64_t tx_size_1522; /* ptc1522 */ + uint64_t tx_size_big; /* ptc9522 */ + uint64_t mac_short_pkt_dropped; /* mspdc */ + /* EEE LPI */ + uint32_t tx_lpi_status; + uint32_t rx_lpi_status; + uint64_t tx_lpi_count; /* etlpic */ + uint64_t rx_lpi_count; /* erlpic */ +}; + +/** + * @struct ice_pf_hw_stats + * @brief hardware statistics for a PF + * + * Stores statistics that are generated by hardware for each PF. + */ +struct ice_pf_hw_stats { + struct ice_hw_port_stats prev; + struct ice_hw_port_stats cur; + bool offsets_loaded; +}; + +/** + * @struct ice_pf_sw_stats + * @brief software statistics for a PF + * + * Contains software generated statistics relevant to a PF. + */ +struct ice_pf_sw_stats { + /* # of reset events handled, by type */ + uint32_t corer_count; + uint32_t globr_count; + uint32_t empr_count; + uint32_t pfr_count; + + /* # of detected MDD events for Tx and Rx */ + uint32_t tx_mdd_count; + uint32_t rx_mdd_count; +}; + struct ice_tx_map { struct mbuf *txm_m; bus_dmamap_t txm_map; |