X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc.h;h=30679014e385fccbaf0d86bbdca51f58c906d4b8;hb=63abf8d29225;hp=972d32606df492dae6b1388a8c9b1b9c486a5b77;hpb=7d466e5fd8d13def57538d80a2f759c2c436dba0;p=dpdk.git diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index 972d32606d..30679014e3 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -30,6 +30,7 @@ #include "sfc_sriov.h" #include "sfc_mae.h" #include "sfc_dp.h" +#include "sfc_sw_stats.h" #ifdef __cplusplus extern "C" { @@ -217,6 +218,30 @@ struct sfc_counter_rxq { struct rte_mempool *mp; }; +struct sfc_sw_stat_data { + const struct sfc_sw_stat_descr *descr; + /* Cache fragment */ + uint64_t *cache; +}; + +struct sfc_sw_stats { + /* Number extended statistics provided by SW stats */ + unsigned int xstats_count; + /* Supported SW statistics */ + struct sfc_sw_stat_data *supp; + unsigned int supp_count; + + /* Cache for all supported SW statistics */ + uint64_t *cache; + unsigned int cache_count; + + uint64_t *reset_vals; + + rte_spinlock_t queues_bitmap_lock; + void *queues_bitmap_mem; + struct rte_bitmap *queues_bitmap; +}; + /* Adapter private data */ struct sfc_adapter { /* @@ -249,6 +274,7 @@ struct sfc_adapter { struct sfc_sriov sriov; struct sfc_intr intr; struct sfc_port port; + struct sfc_sw_stats sw_stats; struct sfc_filter filter; struct sfc_mae mae; @@ -422,7 +448,11 @@ int sfc_port_start(struct sfc_adapter *sa); void sfc_port_stop(struct sfc_adapter *sa); void sfc_port_link_mode_to_info(efx_link_mode_t link_mode, struct rte_eth_link *link_info); -int sfc_port_update_mac_stats(struct sfc_adapter *sa); +int sfc_port_update_mac_stats(struct sfc_adapter *sa, boolean_t manual_update); +int sfc_port_get_mac_stats(struct sfc_adapter *sa, struct rte_eth_xstat *xstats, + unsigned int xstats_count, unsigned int *nb_written); +int sfc_port_get_mac_stats_by_id(struct sfc_adapter *sa, const uint64_t *ids, + uint64_t *values, unsigned int n); int sfc_port_reset_mac_stats(struct sfc_adapter *sa); int sfc_set_rx_mode(struct sfc_adapter *sa); int sfc_set_rx_mode_unchecked(struct sfc_adapter *sa);