pstats
struct pstats pstats;
if (KREAD(kd, (u_long)proc.p_stats, &pstats)) {
kp->ki_start = pstats.p_start;
kp->ki_rusage = pstats.p_ru;
kp->ki_childstime = pstats.p_cru.ru_stime;
kp->ki_childutime = pstats.p_cru.ru_utime;
libusb20_dev_get_stats(struct libusb20_device *pdev, struct libusb20_device_stats *pstats)
error = pdev->methods->get_stats(pdev, pstats);
typedef int (libusb20_get_stats_t)(struct libusb20_device *pdev, struct libusb20_device_stats *pstats);
ugen20_get_stats(struct libusb20_device *pdev, struct libusb20_device_stats *pstats)
memset(pstats, 0, sizeof(*pstats));
pstats->xfer_ok[0] = st.uds_requests_ok[0];
pstats->xfer_ok[1] = st.uds_requests_ok[1];
pstats->xfer_ok[2] = st.uds_requests_ok[2];
pstats->xfer_ok[3] = st.uds_requests_ok[3];
pstats->xfer_fail[0] = st.uds_requests_fail[0];
pstats->xfer_fail[1] = st.uds_requests_fail[1];
pstats->xfer_fail[2] = st.uds_requests_fail[2];
pstats->xfer_fail[3] = st.uds_requests_fail[3];
struct xgbe_mmc_stats *pstats = &pdata->mmc_stats;
return (pstats->rxframecount_gb);
return (pstats->rxframecount_gb -
pstats->rxbroadcastframes_g -
pstats->rxmulticastframes_g -
pstats->rxunicastframes_g);
return (pstats->txframecount_gb);
return (pstats->txframecount_gb - pstats->txframecount_g);
return (pstats->rxoctetcount_gb);
return (pstats->txoctetcount_gb);
struct xgbe_mmc_stats *pstats = &pdata->mmc_stats;
return (pstats->rxframecount_gb);
return (pstats->rxframecount_gb - pstats->rxbroadcastframes_g -
pstats->rxmulticastframes_g - pstats->rxunicastframes_g);
return (pstats->txframecount_gb);
pstats->txframecount_gb - pstats->txframecount_g);
return (pstats->rxoctetcount_gb);
return (pstats->txoctetcount_gb);
struct host_port_stats *pstats;
pstats = BXE_SP(sc, port_stats);
memset(&(pstats->mac_stx[0]), 0, sizeof(struct mac_stx));
struct host_port_stats *pstats = BXE_SP(sc, port_stats);
fwstats->pfc_frames_rx_hi = pstats->pfc_frames_rx_hi;
fwstats->pfc_frames_rx_lo = pstats->pfc_frames_rx_lo;
fwstats->pfc_frames_tx_hi = pstats->pfc_frames_tx_hi;
fwstats->pfc_frames_tx_lo = pstats->pfc_frames_tx_lo;
struct host_port_stats *pstats = BXE_SP(sc, port_stats);
pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
ADD_64(pstats->pfc_frames_tx_hi, fwstats->pfc_frames_tx_hi,
pstats->pfc_frames_tx_lo, fwstats->pfc_frames_tx_lo);
pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
ADD_64(pstats->pfc_frames_rx_hi, fwstats->pfc_frames_rx_hi,
pstats->pfc_frames_rx_lo, fwstats->pfc_frames_rx_lo);
estats->pause_frames_received_hi = pstats->mac_stx[1].rx_stat_mac_xpf_hi;
estats->pause_frames_received_lo = pstats->mac_stx[1].rx_stat_mac_xpf_lo;
estats->pause_frames_sent_hi = pstats->mac_stx[1].tx_stat_outxoffsent_hi;
estats->pause_frames_sent_lo = pstats->mac_stx[1].tx_stat_outxoffsent_lo;
estats->pfc_frames_received_hi = pstats->pfc_frames_rx_hi;
estats->pfc_frames_received_lo = pstats->pfc_frames_rx_lo;
estats->pfc_frames_sent_hi = pstats->pfc_frames_tx_hi;
estats->pfc_frames_sent_lo = pstats->pfc_frames_tx_lo;
struct host_port_stats *pstats = BXE_SP(sc, port_stats);
ADD_64(pstats->pfc_frames_tx_hi, new->stats_tx.tx_gtxpp_hi,
pstats->pfc_frames_tx_lo, new->stats_tx.tx_gtxpp_lo);
ADD_64(pstats->pfc_frames_rx_hi, new->stats_rx.rx_grxpp_hi,
pstats->pfc_frames_rx_lo, new->stats_rx.rx_grxpp_lo);
pstats->mac_stx[1].tx_stat_etherstatspkts1024octetsto1522octets_hi;
pstats->mac_stx[1].tx_stat_etherstatspkts1024octetsto1522octets_lo;
pstats->mac_stx[1].tx_stat_mac_2047_hi;
pstats->mac_stx[1].tx_stat_mac_2047_lo;
pstats->mac_stx[1].tx_stat_mac_4095_hi,
pstats->mac_stx[1].tx_stat_mac_4095_lo);
pstats->mac_stx[1].tx_stat_mac_9216_hi,
pstats->mac_stx[1].tx_stat_mac_9216_lo);
pstats->mac_stx[1].tx_stat_mac_16383_hi,
pstats->mac_stx[1].tx_stat_mac_16383_lo);
estats->pause_frames_received_hi = pstats->mac_stx[1].rx_stat_mac_xpf_hi;
estats->pause_frames_received_lo = pstats->mac_stx[1].rx_stat_mac_xpf_lo;
estats->pause_frames_sent_hi = pstats->mac_stx[1].tx_stat_outxoffsent_hi;
estats->pause_frames_sent_lo = pstats->mac_stx[1].tx_stat_outxoffsent_lo;
estats->pfc_frames_received_hi = pstats->pfc_frames_rx_hi;
estats->pfc_frames_received_lo = pstats->pfc_frames_rx_lo;
estats->pfc_frames_sent_hi = pstats->pfc_frames_tx_hi;
estats->pfc_frames_sent_lo = pstats->pfc_frames_tx_lo;
struct host_port_stats *pstats = BXE_SP(sc, port_stats);
pstats->mac_stx[1].rx_stat_xonpauseframesreceived_hi;
pstats->mac_stx[1].rx_stat_xonpauseframesreceived_lo;
pstats->mac_stx[1].rx_stat_xoffpauseframesreceived_hi,
pstats->mac_stx[1].rx_stat_xoffpauseframesreceived_lo);
pstats->mac_stx[1].tx_stat_outxonsent_hi;
pstats->mac_stx[1].tx_stat_outxonsent_lo;
pstats->mac_stx[1].tx_stat_outxoffsent_hi,
pstats->mac_stx[1].tx_stat_outxoffsent_lo);
struct host_port_stats *pstats = BXE_SP(sc, port_stats);
ADD_EXTEND_64(pstats->brb_drop_hi, pstats->brb_drop_lo,
memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats->mac_stx[1]),
estats->brb_drop_hi = pstats->brb_drop_hi;
estats->brb_drop_lo = pstats->brb_drop_lo;
pstats->host_port_stats_counter++;
DIFF_64(diff.hi, new->s##_hi, pstats->mac_stx[0].t##_hi, \
diff.lo, new->s##_lo, pstats->mac_stx[0].t##_lo); \
pstats->mac_stx[0].t##_hi = new->s##_hi; \
pstats->mac_stx[0].t##_lo = new->s##_lo; \
ADD_64(pstats->mac_stx[1].t##_hi, diff.hi, \
pstats->mac_stx[1].t##_lo, diff.lo); \
ADD_64(pstats->mac_stx[1].t##_hi, new->diff##_hi, \
pstats->mac_stx[1].t##_lo, new->diff##_lo); \
ADD_EXTEND_64(pstats->mac_stx[1].s##_hi, \
pstats->mac_stx[1].s##_lo, \
struct mlx4_en_perf_stats pstats;
memset(&priv->pstats, 0, sizeof(priv->pstats));
&priv->pstats.tx_poll, "TX Poll calls");
&priv->pstats.tx_pktsz_avg, "TX average packet size");
&priv->pstats.inflight_avg, "TX average packets in-flight");
&priv->pstats.tx_coal_avg, "TX average coalesced completions");
&priv->pstats.rx_coal_avg, "RX average coalesced completions");
INC_PERF_COUNTER(priv->pstats.lro_misses);
AVG_PERF_COUNTER(priv->pstats.rx_coal_avg, polled);
INC_PERF_COUNTER(priv->pstats.tx_poll);
AVG_PERF_COUNTER(priv->pstats.inflight_avg,
AVG_PERF_COUNTER(priv->pstats.tx_pktsz_avg, mb->m_pkthdr.len);
*p_addr = p_resp->pfdev_info.stats_info.pstats.address;
*p_len = p_resp->pfdev_info.stats_info.pstats.len;
struct eth_pstorm_per_queue_stat pstats;
OSAL_MEMSET(&pstats, 0, sizeof(pstats));
ecore_memcpy_from(p_hwfn, p_ptt, &pstats,
HILO_64_REGPAIR(pstats.sent_ucast_bytes);
HILO_64_REGPAIR(pstats.sent_mcast_bytes);
HILO_64_REGPAIR(pstats.sent_bcast_bytes);
HILO_64_REGPAIR(pstats.sent_ucast_pkts);
HILO_64_REGPAIR(pstats.sent_mcast_pkts);
HILO_64_REGPAIR(pstats.sent_bcast_pkts);
HILO_64_REGPAIR(pstats.error_drop_pkts);
struct eth_pstorm_per_queue_stat pstats;
OSAL_MEMSET(&pstats, 0, sizeof(pstats));
ecore_memcpy_to(p_hwfn, p_ptt, addr, &pstats, len);
struct core_ll2_pstorm_per_queue_stat pstats;
OSAL_MEMSET(&pstats, 0, sizeof(pstats));
ecore_memcpy_from(p_hwfn, p_ptt, &pstats,
sizeof(pstats));
p_stats->sent_ucast_bytes += HILO_64_REGPAIR(pstats.sent_ucast_bytes);
p_stats->sent_mcast_bytes += HILO_64_REGPAIR(pstats.sent_mcast_bytes);
p_stats->sent_bcast_bytes += HILO_64_REGPAIR(pstats.sent_bcast_bytes);
p_stats->sent_ucast_pkts += HILO_64_REGPAIR(pstats.sent_ucast_pkts);
p_stats->sent_mcast_pkts += HILO_64_REGPAIR(pstats.sent_mcast_pkts);
p_stats->sent_bcast_pkts += HILO_64_REGPAIR(pstats.sent_bcast_pkts);
p_stats->pstats.address = PXP_VF_BAR0_START_PSDM_ZONE_B +
p_stats->pstats.len = sizeof(struct eth_pstorm_per_queue_stat);
struct pfvf_storm_stats pstats;
hardclock_itimer(struct thread *td, struct pstats *pstats, int cnt, int usermode)
timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value)) {
if (itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL],
if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value)) {
if (itimerdecr(&pstats->p_timer[ITIMER_PROF],
struct pstats *pstats;
pstats = p->p_stats;
timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) ||
timevalisset(&pstats->p_timer[ITIMER_PROF].it_value)))
hardclock_itimer(td, pstats, cnt, usermode);
struct pstats *
return (malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK));
pstats_fork(struct pstats *src, struct pstats *dst)
__rangeof(struct pstats, pstat_startzero, pstat_endzero));
__rangeof(struct pstats, pstat_startcopy, pstat_endcopy));
pstats_free(struct pstats *ps)
struct pstats *pstats_alloc(void);
void pstats_fork(struct pstats *src, struct pstats *dst);
void pstats_free(struct pstats *ps);
struct pstats *p_stats; /* (b) Accounting/statistics (CPU). */
struct pstats u_stats; /* *p_stats */