diff --git a/include/ivc_core.h b/include/ivc_core.h index 9392699..2be9f17 100644 --- a/include/ivc_core.h +++ b/include/ivc_core.h @@ -35,14 +35,6 @@ */ #define MAX_ARGS 10 -/* - *@brief All Stats - */ -struct osi_stats { - struct osi_mmc_counters mmc_s; - struct osi_tsn_stats tsn_s; -}; - /** * @brief IVC commands between OSD & OSI. */ @@ -151,13 +143,13 @@ typedef struct ivc_msg_common { /** OSI HW features */ struct osi_hw_features hw_feat; /** MMC counters */ - struct osi_mmc_counters mmc; + struct osi_mmc_counters mmc_s; + /** OSI stats counters */ + struct osi_stats stats_s; /** core argument structure */ ivc_core_args init_args; /** ioctl command structure */ struct osi_ioctl ioctl_data; - /** All stats */ - struct osi_stats eth_stats; #ifdef MACSEC_SUPPORT /** lut config */ struct osi_macsec_lut_config lut_config; diff --git a/include/mmc.h b/include/mmc.h index ef45f66..3b0a864 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -26,42 +26,6 @@ #include #include "osi_common.h" -#ifndef OSI_STRIPPED_LIB -/** - * @brief osi_xtra_stat_counters - OSI core extra stat counters - */ -struct osi_xtra_stat_counters { - /** RX buffer unavailable irq count */ - nveu64_t rx_buf_unavail_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** Transmit Process Stopped irq count */ - nveu64_t tx_proc_stopped_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** Transmit Buffer Unavailable irq count */ - nveu64_t tx_buf_unavail_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** Receive Process Stopped irq count */ - nveu64_t rx_proc_stopped_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** Receive Watchdog Timeout irq count */ - nveu64_t rx_watchdog_irq_n; - /** Fatal Bus Error irq count */ - nveu64_t fatal_bus_error_irq_n; - /** rx skb allocation failure count */ - nveu64_t re_alloc_rxbuf_failed[OSI_MGBE_MAX_NUM_QUEUES]; - /** TX per channel interrupt count */ - nveu64_t tx_normal_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** TX per channel SW timer callback count */ - nveu64_t tx_usecs_swtimer_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** RX per channel interrupt count */ - nveu64_t rx_normal_irq_n[OSI_MGBE_MAX_NUM_QUEUES]; - /** link connect count */ - nveu64_t link_connect_count; - /** link disconnect count */ - nveu64_t link_disconnect_count; - /** lock fail count node addition */ - nveu64_t ts_lock_add_fail; - /** lock fail count node removal */ - nveu64_t ts_lock_del_fail; -}; -#endif /* !OSI_STRIPPED_LIB */ - #ifdef MACSEC_SUPPORT /** * @brief The structure hold macsec statistics counters diff --git a/include/nvethernetrm_export.h b/include/nvethernetrm_export.h index 1dbbfb6..abecbbd 100644 --- a/include/nvethernetrm_export.h +++ b/include/nvethernetrm_export.h @@ -56,6 +56,9 @@ #define OSI_MTL_QUEUE_AVB 0x1U #define OSI_MTL_QUEUE_ENABLE 0x2U #define OSI_MTL_QUEUE_MODEMAX 0x3U +#ifndef OSI_STRIPPED_LIB +#define OSI_MTL_MAX_NUM_QUEUES 10U +#endif /** @} */ /** @@ -181,9 +184,9 @@ struct osi_fpe_config { }; /** - * @brief OSI Core TSN error stats structure + * @brief OSI Core error stats structure */ -struct osi_tsn_stats { +struct osi_stats { /** Constant Gate Control Error */ nveu64_t const_gate_ctr_err; /** Head-Of-Line Blocking due to Scheduling */ @@ -198,6 +201,32 @@ struct osi_tsn_stats { nveu64_t base_time_reg_err; /** Switch to Software Owned List Complete */ nveu64_t sw_own_list_complete; +#ifndef OSI_STRIPPED_LIB + /** IP Header Error */ + nveu64_t mgbe_ip_header_err; + /** Jabber time out Error */ + nveu64_t mgbe_jabber_timeout_err; + /** Payload Checksum Error */ + nveu64_t mgbe_payload_cs_err; + /** Under Flow Error */ + nveu64_t mgbe_tx_underflow_err; + /** RX buffer unavailable irq count */ + nveu64_t rx_buf_unavail_irq_n[OSI_MTL_MAX_NUM_QUEUES]; + /** Transmit Process Stopped irq count */ + nveu64_t tx_proc_stopped_irq_n[OSI_MTL_MAX_NUM_QUEUES]; + /** Transmit Buffer Unavailable irq count */ + nveu64_t tx_buf_unavail_irq_n[OSI_MTL_MAX_NUM_QUEUES]; + /** Receive Process Stopped irq count */ + nveu64_t rx_proc_stopped_irq_n[OSI_MTL_MAX_NUM_QUEUES]; + /** Receive Watchdog Timeout irq count */ + nveu64_t rx_watchdog_irq_n; + /** Fatal Bus Error irq count */ + nveu64_t fatal_bus_error_irq_n; + /** lock fail count node addition */ + nveu64_t ts_lock_add_fail; + /** lock fail count node removal */ + nveu64_t ts_lock_del_fail; +#endif }; /** diff --git a/include/osi_core.h b/include/osi_core.h index 25d2aa2..e54921e 100644 --- a/include/osi_core.h +++ b/include/osi_core.h @@ -276,6 +276,7 @@ typedef my_lint_64 nvel64_t; #ifdef HSI_SUPPORT #define OSI_CMD_HSI_INJECT_ERR 55U #endif +#define OSI_CMD_READ_STATS 56U /** @} */ /** @@ -1216,22 +1217,6 @@ struct core_padctrl { nveu32_t pad_calibration_enable; }; -#ifndef OSI_STRIPPED_LIB -/** - * @brief OSI CORE packet error stats - */ -struct osi_core_pkt_err_stats { - /** IP Header Error */ - nveu64_t mgbe_ip_header_err; - /** Jabber time out Error */ - nveu64_t mgbe_jabber_timeout_err; - /** Payload Checksum Error */ - nveu64_t mgbe_payload_cs_err; - /** Under Flow Error */ - nveu64_t mgbe_tx_underflow_err; -}; -#endif - #ifdef HSI_SUPPORT /** * @brief The OSI Core HSI private data structure. @@ -1352,8 +1337,6 @@ struct osi_core_priv_data { /** TQ:TC mapping */ nveu32_t tc[OSI_MGBE_MAX_NUM_CHANS]; #ifndef OSI_STRIPPED_LIB - /** xtra sw error counters */ - struct osi_xtra_stat_counters xstats; /** Memory mapped base address of HV window */ void *hv_base; /** csr clock is to program LPI 1 us tick timer register. @@ -1382,8 +1365,8 @@ struct osi_core_priv_data { * 1- Successful and can be used between P2P device */ nveu32_t fpe_ready; - /** TSN stats counters */ - struct osi_tsn_stats tsn_stats; + /** MAC stats counters */ + struct osi_stats stats; /** eqos pad control structure */ struct core_padctrl padctrl; /** MDC clock rate */ @@ -1409,10 +1392,6 @@ struct osi_core_priv_data { nveu32_t phy_iface_mode; /** MGBE MAC instance ID's */ nveu32_t instance_id; -#ifndef OSI_STRIPPED_LIB - /** Packet error stats */ - struct osi_core_pkt_err_stats pkt_err_stats; -#endif /** Ethernet controller MAC to MAC Time sync role * 1 - Primary interface, 2 - secondary interface, 0 - inactive interface */ diff --git a/osi/core/eqos_core.c b/osi/core/eqos_core.c index d6ecb12..3239d9e 100644 --- a/osi/core/eqos_core.c +++ b/osi/core/eqos_core.c @@ -1561,33 +1561,33 @@ static inline void update_dma_sr_stats( nveu64_t val; if ((dma_sr & EQOS_DMA_CHX_STATUS_RBU) == EQOS_DMA_CHX_STATUS_RBU) { - val = osi_core->xstats.rx_buf_unavail_irq_n[qinx]; - osi_core->xstats.rx_buf_unavail_irq_n[qinx] = + val = osi_core->stats.rx_buf_unavail_irq_n[qinx]; + osi_core->stats.rx_buf_unavail_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & EQOS_DMA_CHX_STATUS_TPS) == EQOS_DMA_CHX_STATUS_TPS) { - val = osi_core->xstats.tx_proc_stopped_irq_n[qinx]; - osi_core->xstats.tx_proc_stopped_irq_n[qinx] = + val = osi_core->stats.tx_proc_stopped_irq_n[qinx]; + osi_core->stats.tx_proc_stopped_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & EQOS_DMA_CHX_STATUS_TBU) == EQOS_DMA_CHX_STATUS_TBU) { - val = osi_core->xstats.tx_buf_unavail_irq_n[qinx]; - osi_core->xstats.tx_buf_unavail_irq_n[qinx] = + val = osi_core->stats.tx_buf_unavail_irq_n[qinx]; + osi_core->stats.tx_buf_unavail_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & EQOS_DMA_CHX_STATUS_RPS) == EQOS_DMA_CHX_STATUS_RPS) { - val = osi_core->xstats.rx_proc_stopped_irq_n[qinx]; - osi_core->xstats.rx_proc_stopped_irq_n[qinx] = + val = osi_core->stats.rx_proc_stopped_irq_n[qinx]; + osi_core->stats.rx_proc_stopped_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & EQOS_DMA_CHX_STATUS_RWT) == EQOS_DMA_CHX_STATUS_RWT) { - val = osi_core->xstats.rx_watchdog_irq_n; - osi_core->xstats.rx_watchdog_irq_n = + val = osi_core->stats.rx_watchdog_irq_n; + osi_core->stats.rx_watchdog_irq_n = osi_update_stats_counter(val, 1U); } if ((dma_sr & EQOS_DMA_CHX_STATUS_FBE) == EQOS_DMA_CHX_STATUS_FBE) { - val = osi_core->xstats.fatal_bus_error_irq_n; - osi_core->xstats.fatal_bus_error_irq_n = + val = osi_core->stats.fatal_bus_error_irq_n; + osi_core->stats.fatal_bus_error_irq_n = osi_update_stats_counter(val, 1U); } } @@ -1634,15 +1634,15 @@ static void eqos_handle_mtl_intrs(struct osi_core_priv_data *osi_core) /* increase counter write 1 back will clear */ if ((val & EQOS_MTL_EST_STATUS_CGCE) == EQOS_MTL_EST_STATUS_CGCE) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.const_gate_ctr_err; - osi_core->tsn_stats.const_gate_ctr_err = + stat_val = osi_core->stats.const_gate_ctr_err; + osi_core->stats.const_gate_ctr_err = osi_update_stats_counter(stat_val, 1U); } if ((val & EQOS_MTL_EST_STATUS_HLBS) == EQOS_MTL_EST_STATUS_HLBS) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.head_of_line_blk_sch; - osi_core->tsn_stats.head_of_line_blk_sch = + stat_val = osi_core->stats.head_of_line_blk_sch; + osi_core->stats.head_of_line_blk_sch = osi_update_stats_counter(stat_val, 1U); /* Need to read MTL_EST_Sch_Error register and cleared */ sch_err = osi_readla(osi_core, (nveu8_t *)osi_core->base + @@ -1651,8 +1651,8 @@ static void eqos_handle_mtl_intrs(struct osi_core_priv_data *osi_core) temp = OSI_ENABLE; temp = temp << i; if ((sch_err & temp) == temp) { - stat_val = osi_core->tsn_stats.hlbs_q[i]; - osi_core->tsn_stats.hlbs_q[i] = + stat_val = osi_core->stats.hlbs_q[i]; + osi_core->stats.hlbs_q[i] = osi_update_stats_counter(stat_val, 1U); } } @@ -1675,8 +1675,8 @@ static void eqos_handle_mtl_intrs(struct osi_core_priv_data *osi_core) if ((val & EQOS_MTL_EST_STATUS_HLBF) == EQOS_MTL_EST_STATUS_HLBF) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.head_of_line_blk_frm; - osi_core->tsn_stats.head_of_line_blk_frm = + stat_val = osi_core->stats.head_of_line_blk_frm; + osi_core->stats.head_of_line_blk_frm = osi_update_stats_counter(stat_val, 1U); /* Need to read MTL_EST_Frm_Size_Error register and cleared */ frm_err = osi_readla(osi_core, (nveu8_t *)osi_core->base + @@ -1685,8 +1685,8 @@ static void eqos_handle_mtl_intrs(struct osi_core_priv_data *osi_core) temp = OSI_ENABLE; temp = temp << i; if ((frm_err & temp) == temp) { - stat_val = osi_core->tsn_stats.hlbf_q[i]; - osi_core->tsn_stats.hlbf_q[i] = + stat_val = osi_core->stats.hlbf_q[i]; + osi_core->stats.hlbf_q[i] = osi_update_stats_counter(stat_val, 1U); } } @@ -1713,15 +1713,15 @@ static void eqos_handle_mtl_intrs(struct osi_core_priv_data *osi_core) EQOS_MTL_EST_STATUS_BTRE) { osi_core->est_ready = OSI_ENABLE; } - stat_val = osi_core->tsn_stats.sw_own_list_complete; - osi_core->tsn_stats.sw_own_list_complete = + stat_val = osi_core->stats.sw_own_list_complete; + osi_core->stats.sw_own_list_complete = osi_update_stats_counter(stat_val, 1U); } if ((val & EQOS_MTL_EST_STATUS_BTRE) == EQOS_MTL_EST_STATUS_BTRE) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.base_time_reg_err; - osi_core->tsn_stats.base_time_reg_err = + stat_val = osi_core->stats.base_time_reg_err; + osi_core->stats.base_time_reg_err = osi_update_stats_counter(stat_val, 1U); osi_core->est_ready = OSI_DISABLE; } @@ -1818,7 +1818,8 @@ static void eqos_handle_hsi_intr(struct osi_core_priv_data *const osi_core) * Algorithm: * - Reads DMA ISR register * - Returns if calue is 0. - * - Handle Non-TI/RI interrupts for all MTL queues and increments #osi_core_priv_data->xstats + * - Handle Non-TI/RI interrupts for all MTL queues and + * increments #osi_core_priv_data->stats * based on error detected per cahnnel. * - Calls eqos_handle_mac_intrs() to handle MAC interrupts. * - Refer to EQOS column of <> for API details. diff --git a/osi/core/ivc_core.c b/osi/core/ivc_core.c index 936f290..da9c5a7 100644 --- a/osi/core/ivc_core.c +++ b/osi/core/ivc_core.c @@ -64,18 +64,26 @@ static nve32_t ivc_handle_ioctl(struct osi_core_priv_data *osi_core, ret = osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg)); - if (data->cmd == OSI_CMD_READ_MMC) { + switch (data->cmd) { + case OSI_CMD_READ_MMC: (void)osi_memcpy((void *)&osi_core->mmc, - (void *)&msg.data.mmc, + (void *)&msg.data.mmc_s, sizeof(struct osi_mmc_counters)); - (void)osi_memcpy((void *)&osi_core->tsn_stats, - (void *)&msg.data.eth_stats.tsn_s, - sizeof(struct osi_tsn_stats)); - } else { + break; + + case OSI_CMD_READ_STATS: + (void)osi_memcpy((void *)&osi_core->stats, + (void *)&msg.data.stats_s, + sizeof(struct osi_stats)); + break; + + default: (void)osi_memcpy((void *)data, (void *)&msg.data.ioctl_data, sizeof(struct osi_ioctl)); + break; } + return ret; } diff --git a/osi/core/mgbe_core.c b/osi/core/mgbe_core.c index 955320b..84dcd12 100644 --- a/osi/core/mgbe_core.c +++ b/osi/core/mgbe_core.c @@ -2771,23 +2771,23 @@ static void mgbe_handle_mac_intrs(struct osi_core_priv_data *osi_core, MGBE_MAC_RX_TX_STS); if ((tx_errors & MGBE_MAC_TX_TJT) == MGBE_MAC_TX_TJT) { /* increment Tx Jabber timeout stats */ - osi_core->pkt_err_stats.mgbe_jabber_timeout_err = + osi_core->stats.mgbe_jabber_timeout_err = osi_update_stats_counter( - osi_core->pkt_err_stats.mgbe_jabber_timeout_err, + osi_core->stats.mgbe_jabber_timeout_err, 1UL); } if ((tx_errors & MGBE_MAC_TX_IHE) == MGBE_MAC_TX_IHE) { /* IP Header Error */ - osi_core->pkt_err_stats.mgbe_ip_header_err = + osi_core->stats.mgbe_ip_header_err = osi_update_stats_counter( - osi_core->pkt_err_stats.mgbe_ip_header_err, + osi_core->stats.mgbe_ip_header_err, 1UL); } if ((tx_errors & MGBE_MAC_TX_PCE) == MGBE_MAC_TX_PCE) { /* Payload Checksum error */ - osi_core->pkt_err_stats.mgbe_payload_cs_err = + osi_core->stats.mgbe_payload_cs_err = osi_update_stats_counter( - osi_core->pkt_err_stats.mgbe_payload_cs_err, + osi_core->stats.mgbe_payload_cs_err, 1UL); } } @@ -2800,9 +2800,9 @@ static void mgbe_handle_mac_intrs(struct osi_core_priv_data *osi_core, /* mask return as initial value is returned always */ (void)__sync_fetch_and_sub(&l_core->ts_lock, 1); #ifndef OSI_STRIPPED_LIB - osi_core->xstats.ts_lock_add_fail = + osi_core->stats.ts_lock_add_fail = osi_update_stats_counter( - osi_core->xstats.ts_lock_add_fail, 1U); + osi_core->stats.ts_lock_add_fail, 1U); #endif /* !OSI_STRIPPED_LIB */ goto done; } @@ -2873,28 +2873,28 @@ static inline void mgbe_update_dma_sr_stats(struct osi_core_priv_data *osi_core, nveu64_t val; if ((dma_sr & MGBE_DMA_CHX_STATUS_RBU) == MGBE_DMA_CHX_STATUS_RBU) { - val = osi_core->xstats.rx_buf_unavail_irq_n[qinx]; - osi_core->xstats.rx_buf_unavail_irq_n[qinx] = + val = osi_core->stats.rx_buf_unavail_irq_n[qinx]; + osi_core->stats.rx_buf_unavail_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & MGBE_DMA_CHX_STATUS_TPS) == MGBE_DMA_CHX_STATUS_TPS) { - val = osi_core->xstats.tx_proc_stopped_irq_n[qinx]; - osi_core->xstats.tx_proc_stopped_irq_n[qinx] = + val = osi_core->stats.tx_proc_stopped_irq_n[qinx]; + osi_core->stats.tx_proc_stopped_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & MGBE_DMA_CHX_STATUS_TBU) == MGBE_DMA_CHX_STATUS_TBU) { - val = osi_core->xstats.tx_buf_unavail_irq_n[qinx]; - osi_core->xstats.tx_buf_unavail_irq_n[qinx] = + val = osi_core->stats.tx_buf_unavail_irq_n[qinx]; + osi_core->stats.tx_buf_unavail_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & MGBE_DMA_CHX_STATUS_RPS) == MGBE_DMA_CHX_STATUS_RPS) { - val = osi_core->xstats.rx_proc_stopped_irq_n[qinx]; - osi_core->xstats.rx_proc_stopped_irq_n[qinx] = + val = osi_core->stats.rx_proc_stopped_irq_n[qinx]; + osi_core->stats.rx_proc_stopped_irq_n[qinx] = osi_update_stats_counter(val, 1U); } if ((dma_sr & MGBE_DMA_CHX_STATUS_FBE) == MGBE_DMA_CHX_STATUS_FBE) { - val = osi_core->xstats.fatal_bus_error_irq_n; - osi_core->xstats.fatal_bus_error_irq_n = + val = osi_core->stats.fatal_bus_error_irq_n; + osi_core->stats.fatal_bus_error_irq_n = osi_update_stats_counter(val, 1U); } } @@ -3196,9 +3196,9 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, /* Transmit Queue Underflow Interrupt Status */ if ((qstatus & MGBE_MTL_QINT_TXUNIFS) == MGBE_MTL_QINT_TXUNIFS) { #ifndef OSI_STRIPPED_LIB - osi_core->pkt_err_stats.mgbe_tx_underflow_err = + osi_core->stats.mgbe_tx_underflow_err = osi_update_stats_counter( - osi_core->pkt_err_stats.mgbe_tx_underflow_err, + osi_core->stats.mgbe_tx_underflow_err, 1UL); #endif /* !OSI_STRIPPED_LIB */ } @@ -3226,15 +3226,15 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, /* increase counter write 1 back will clear */ if ((val & MGBE_MTL_EST_STATUS_CGCE) == MGBE_MTL_EST_STATUS_CGCE) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.const_gate_ctr_err; - osi_core->tsn_stats.const_gate_ctr_err = + stat_val = osi_core->stats.const_gate_ctr_err; + osi_core->stats.const_gate_ctr_err = osi_update_stats_counter(stat_val, 1U); } if ((val & MGBE_MTL_EST_STATUS_HLBS) == MGBE_MTL_EST_STATUS_HLBS) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.head_of_line_blk_sch; - osi_core->tsn_stats.head_of_line_blk_sch = + stat_val = osi_core->stats.head_of_line_blk_sch; + osi_core->stats.head_of_line_blk_sch = osi_update_stats_counter(stat_val, 1U); /* Need to read MTL_EST_Sch_Error register and cleared */ sch_err = osi_readla(osi_core, (nveu8_t *)osi_core->base + @@ -3243,8 +3243,8 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, temp = OSI_ENABLE; temp = temp << i; if ((sch_err & temp) == temp) { - stat_val = osi_core->tsn_stats.hlbs_q[i]; - osi_core->tsn_stats.hlbs_q[i] = + stat_val = osi_core->stats.hlbs_q[i]; + osi_core->stats.hlbs_q[i] = osi_update_stats_counter(stat_val, 1U); } } @@ -3263,8 +3263,8 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, if ((val & MGBE_MTL_EST_STATUS_HLBF) == MGBE_MTL_EST_STATUS_HLBF) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.head_of_line_blk_frm; - osi_core->tsn_stats.head_of_line_blk_frm = + stat_val = osi_core->stats.head_of_line_blk_frm; + osi_core->stats.head_of_line_blk_frm = osi_update_stats_counter(stat_val, 1U); /* Need to read MTL_EST_Frm_Size_Error register and cleared */ frm_err = osi_readla(osi_core, (nveu8_t *)osi_core->base + @@ -3273,8 +3273,8 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, temp = OSI_ENABLE; temp = temp << i; if ((frm_err & temp) == temp) { - stat_val = osi_core->tsn_stats.hlbf_q[i]; - osi_core->tsn_stats.hlbf_q[i] = + stat_val = osi_core->stats.hlbf_q[i]; + osi_core->stats.hlbf_q[i] = osi_update_stats_counter(stat_val, 1U); } } @@ -3302,15 +3302,15 @@ static void mgbe_handle_mtl_intrs(struct osi_core_priv_data *osi_core, MGBE_MTL_EST_STATUS_BTRE) { osi_core->est_ready = OSI_ENABLE; } - stat_val = osi_core->tsn_stats.sw_own_list_complete; - osi_core->tsn_stats.sw_own_list_complete = + stat_val = osi_core->stats.sw_own_list_complete; + osi_core->stats.sw_own_list_complete = osi_update_stats_counter(stat_val, 1U); } if ((val & MGBE_MTL_EST_STATUS_BTRE) == MGBE_MTL_EST_STATUS_BTRE) { osi_core->est_ready = OSI_DISABLE; - stat_val = osi_core->tsn_stats.base_time_reg_err; - osi_core->tsn_stats.base_time_reg_err = + stat_val = osi_core->stats.base_time_reg_err; + osi_core->stats.base_time_reg_err = osi_update_stats_counter(stat_val, 1U); osi_core->est_ready = OSI_DISABLE; } diff --git a/osi/core/osi_hal.c b/osi/core/osi_hal.c index 8fff81e..9d0f383 100644 --- a/osi/core/osi_hal.c +++ b/osi/core/osi_hal.c @@ -1537,9 +1537,9 @@ static inline nve32_t get_tx_ts(struct osi_core_priv_data *osi_core, /* mask return as initial value is returned always */ (void)__sync_fetch_and_sub(&l_core->ts_lock, 1); #ifndef OSI_STRIPPED_LIB - osi_core->xstats.ts_lock_del_fail = + osi_core->stats.ts_lock_del_fail = osi_update_stats_counter( - osi_core->xstats.ts_lock_del_fail, 1U); + osi_core->stats.ts_lock_del_fail, 1U); #endif goto done; }