Lines Matching defs:statsp

44 	hxgep->statsp = KMEM_ZALLOC(stats_size, KM_SLEEP);
45 hxgep->statsp->stats_size = stats_size;
354 p_hxge_tx_ring_stats_t statsp;
368 statsp = (p_hxge_tx_ring_stats_t)&hxgep->statsp->tdc_stats[channel];
371 "hxge_tdc_stat_update data $%p statsp $%p channel %d",
372 ksp->ks_data, statsp, channel));
374 tdc_kstatsp->opackets.value.ull = statsp->opackets;
375 tdc_kstatsp->obytes.value.ull = statsp->obytes;
376 tdc_kstatsp->obytes_with_pad.value.ull = statsp->obytes_with_pad;
377 tdc_kstatsp->oerrors.value.ull = statsp->oerrors;
378 tdc_kstatsp->tx_hdr_pkts.value.ull = statsp->tx_hdr_pkts;
379 tdc_kstatsp->tx_ddi_pkts.value.ull = statsp->tx_ddi_pkts;
380 tdc_kstatsp->tx_jumbo_pkts.value.ull = statsp->tx_jumbo_pkts;
381 tdc_kstatsp->tx_max_pend.value.ull = statsp->tx_max_pend;
382 tdc_kstatsp->peu_resp_err.value.ul = statsp->peu_resp_err;
383 tdc_kstatsp->pkt_size_err.value.ul = statsp->pkt_size_err;
384 tdc_kstatsp->tx_rng_oflow.value.ul = statsp->tx_rng_oflow;
385 tdc_kstatsp->pkt_size_hdr_err.value.ul = statsp->pkt_size_hdr_err;
386 tdc_kstatsp->runt_pkt_drop_err.value.ul = statsp->runt_pkt_drop_err;
387 tdc_kstatsp->pref_par_err.value.ul = statsp->pref_par_err;
388 tdc_kstatsp->tdr_pref_cpl_to.value.ul = statsp->tdr_pref_cpl_to;
389 tdc_kstatsp->pkt_cpl_to.value.ul = statsp->pkt_cpl_to;
390 tdc_kstatsp->invalid_sop.value.ul = statsp->invalid_sop;
391 tdc_kstatsp->unexpected_sop.value.ul = statsp->unexpected_sop;
392 tdc_kstatsp->tx_starts.value.ul = statsp->tx_starts;
393 tdc_kstatsp->tx_no_desc.value.ul = statsp->tx_no_desc;
394 tdc_kstatsp->tx_dma_bind_fail.value.ul = statsp->tx_dma_bind_fail;
397 statsp->count_hdr_size_err;
398 tdc_kstatsp->count_runt.value.ul = statsp->count_runt;
399 tdc_kstatsp->count_abort.value.ul = statsp->count_abort;
400 tdc_kstatsp->tx_marks.value.ul = statsp->tx_marks;
412 p_hxge_tdc_sys_stats_t statsp;
420 statsp = (p_hxge_tdc_sys_stats_t)&hxgep->statsp->tdc_sys_stats;
426 statsp->reord_tbl_par_err;
428 statsp->reord_buf_ded_err;
430 statsp->reord_buf_sec_err;
442 p_hxge_rx_ring_stats_t statsp;
457 statsp = (p_hxge_rx_ring_stats_t)&hxgep->statsp->rdc_stats[channel];
460 "hxge_rdc_stat_update $%p statsp $%p channel %d",
461 ksp->ks_data, statsp, channel));
463 rdc_kstatsp->ipackets.value.ull = statsp->ipackets;
464 rdc_kstatsp->rbytes.value.ull = statsp->ibytes;
465 rdc_kstatsp->jumbo_pkts.value.ul = statsp->jumbo_pkts;
466 rdc_kstatsp->rcr_unknown_err.value.ul = statsp->rcr_unknown_err;
467 rdc_kstatsp->errors.value.ul = statsp->ierrors;
468 rdc_kstatsp->rcr_sha_par_err.value.ul = statsp->rcr_sha_par;
469 rdc_kstatsp->rbr_pre_par_err.value.ul = statsp->rbr_pre_par;
470 rdc_kstatsp->rbr_pre_emty.value.ul = statsp->rbr_pre_empty;
471 rdc_kstatsp->rcr_shadow_full.value.ul = statsp->rcr_shadow_full;
472 rdc_kstatsp->rbr_tmout.value.ul = statsp->rbr_tmout;
473 rdc_kstatsp->peu_resp_err.value.ul = statsp->peu_resp_err;
474 rdc_kstatsp->ctrl_fifo_ecc_err.value.ul = statsp->ctrl_fifo_ecc_err;
475 rdc_kstatsp->data_fifo_ecc_err.value.ul = statsp->data_fifo_ecc_err;
476 rdc_kstatsp->rcrfull.value.ul = statsp->rcrfull;
477 rdc_kstatsp->rbr_empty.value.ul = statsp->rbr_empty;
478 rdc_kstatsp->rbr_empty_fail.value.ul = statsp->rbr_empty_fail;
479 rdc_kstatsp->rbr_empty_restore.value.ul = statsp->rbr_empty_restore;
480 rdc_kstatsp->rbrfull.value.ul = statsp->rbrfull;
481 rdc_kstatsp->rcr_invalids.value.ul = statsp->rcr_invalids;
482 rdc_kstatsp->rcr_to.value.ul = statsp->rcr_to;
483 rdc_kstatsp->rcr_thresh.value.ul = statsp->rcr_thres;
484 rdc_kstatsp->pkt_drop.value.ul = statsp->pkt_drop;
496 p_hxge_rdc_sys_stats_t statsp;
505 statsp = (p_hxge_rdc_sys_stats_t)&hxgep->statsp->rdc_sys_stats;
510 rdc_sys_kstatsp->ctrl_fifo_sec.value.ul = statsp->ctrl_fifo_sec;
511 rdc_sys_kstatsp->ctrl_fifo_ded.value.ul = statsp->ctrl_fifo_ded;
512 rdc_sys_kstatsp->data_fifo_sec.value.ul = statsp->data_fifo_sec;
513 rdc_sys_kstatsp->data_fifo_ded.value.ul = statsp->data_fifo_ded;
525 p_hxge_vmac_stats_t statsp;
536 statsp = (p_hxge_vmac_stats_t)&hxgep->statsp->vmac_stats;
538 vmac_kstatsp->tx_frame_cnt.value.ul = statsp->tx_frame_cnt;
539 vmac_kstatsp->tx_byte_cnt.value.ul = statsp->tx_byte_cnt;
541 vmac_kstatsp->rx_frame_cnt.value.ul = statsp->rx_frame_cnt;
542 vmac_kstatsp->rx_byte_cnt.value.ul = statsp->rx_byte_cnt;
543 vmac_kstatsp->rx_drop_frame_cnt.value.ul = statsp->rx_drop_frame_cnt;
544 vmac_kstatsp->rx_drop_byte_cnt.value.ul = statsp->rx_drop_byte_cnt;
545 vmac_kstatsp->rx_crc_cnt.value.ul = statsp->rx_crc_cnt;
546 vmac_kstatsp->rx_pause_cnt.value.ul = statsp->rx_pause_cnt;
547 vmac_kstatsp->rx_bcast_fr_cnt.value.ul = statsp->rx_bcast_fr_cnt;
548 vmac_kstatsp->rx_mcast_fr_cnt.value.ul = statsp->rx_mcast_fr_cnt;
560 p_hxge_pfc_stats_t statsp;
569 statsp = (p_hxge_pfc_stats_t)&hxgep->statsp->pfc_stats;
571 kstatsp->pfc_pkt_drop.value.ul = statsp->pkt_drop;
572 kstatsp->pfc_tcam_parity_err.value.ul = statsp->tcam_parity_err;
573 kstatsp->pfc_vlan_parity_err.value.ul = statsp->vlan_parity_err;
574 kstatsp->pfc_bad_cs_count.value.ul = statsp->bad_cs_count;
575 kstatsp->pfc_drop_count.value.ul = statsp->drop_count;
576 kstatsp->pfc_tcp_ctrl_drop.value.ul = statsp->errlog.tcp_ctrl_drop;
577 kstatsp->pfc_l2_addr_drop.value.ul = statsp->errlog.l2_addr_drop;
578 kstatsp->pfc_class_code_drop.value.ul = statsp->errlog.class_code_drop;
579 kstatsp->pfc_tcam_drop.value.ul = statsp->errlog.tcam_drop;
580 kstatsp->pfc_vlan_drop.value.ul = statsp->errlog.vlan_drop;
592 p_hxge_peu_sys_stats_t statsp;
601 statsp = (p_hxge_peu_sys_stats_t)&hxgep->statsp->peu_sys_stats;
603 peu_kstatsp->spc_acc_err.value.ul = statsp->spc_acc_err;
604 peu_kstatsp->tdc_pioacc_err.value.ul = statsp->tdc_pioacc_err;
605 peu_kstatsp->rdc_pioacc_err.value.ul = statsp->rdc_pioacc_err;
606 peu_kstatsp->pfc_pioacc_err.value.ul = statsp->pfc_pioacc_err;
607 peu_kstatsp->vmac_pioacc_err.value.ul = statsp->vmac_pioacc_err;
608 peu_kstatsp->cpl_hdrq_parerr.value.ul = statsp->cpl_hdrq_parerr;
609 peu_kstatsp->cpl_dataq_parerr.value.ul = statsp->cpl_dataq_parerr;
611 statsp->retryram_xdlh_parerr;
613 statsp->retrysotram_xdlh_parerr;
614 peu_kstatsp->p_hdrq_parerr.value.ul = statsp->p_hdrq_parerr;
615 peu_kstatsp->p_dataq_parerr.value.ul = statsp->p_dataq_parerr;
616 peu_kstatsp->np_hdrq_parerr.value.ul = statsp->np_hdrq_parerr;
617 peu_kstatsp->np_dataq_parerr.value.ul = statsp->np_dataq_parerr;
618 peu_kstatsp->eic_msix_parerr.value.ul = statsp->eic_msix_parerr;
619 peu_kstatsp->hcr_parerr.value.ul = statsp->hcr_parerr;
667 hxgep->statsp->rdc_ksp[i] = hxge_setup_local_kstat(hxgep,
670 if (hxgep->statsp->rdc_ksp[i] == NULL)
676 hxgep->statsp->rdc_sys_ksp = hxge_setup_local_kstat(hxgep,
679 if (hxgep->statsp->rdc_sys_ksp == NULL)
686 hxgep->statsp->tdc_ksp[i] = hxge_setup_local_kstat(hxgep,
689 if (hxgep->statsp->tdc_ksp[i] == NULL)
695 hxgep->statsp->tdc_sys_ksp = hxge_setup_local_kstat(hxgep,
698 if (hxgep->statsp->tdc_sys_ksp == NULL)
702 hxgep->statsp->pfc_ksp = hxge_setup_local_kstat(hxgep,
705 if (hxgep->statsp->pfc_ksp == NULL)
709 hxgep->statsp->vmac_ksp = hxge_setup_local_kstat(hxgep,
712 if (hxgep->statsp->vmac_ksp == NULL)
716 hxgep->statsp->mmac_ksp = hxge_setup_local_kstat(hxgep,
719 if (hxgep->statsp->mmac_ksp == NULL)
723 hxgep->statsp->peu_sys_ksp = hxge_setup_local_kstat(hxgep,
726 if (hxgep->statsp->peu_sys_ksp == NULL)
769 hxgep->statsp->port_ksp = ksp;
781 if (hxgep->statsp == NULL)
784 if (hxgep->statsp->ksp)
785 kstat_delete(hxgep->statsp->ksp);
791 if (hxgep->statsp->rdc_ksp[channel]) {
792 kstat_delete(hxgep->statsp->rdc_ksp[channel]);
797 if (hxgep->statsp->tdc_ksp[channel]) {
798 kstat_delete(hxgep->statsp->tdc_ksp[channel]);
802 if (hxgep->statsp->rdc_sys_ksp)
803 kstat_delete(hxgep->statsp->rdc_sys_ksp);
805 if (hxgep->statsp->tdc_sys_ksp)
806 kstat_delete(hxgep->statsp->tdc_sys_ksp);
808 if (hxgep->statsp->peu_sys_ksp)
809 kstat_delete(hxgep->statsp->peu_sys_ksp);
811 if (hxgep->statsp->mmac_ksp)
812 kstat_delete(hxgep->statsp->mmac_ksp);
814 if (hxgep->statsp->pfc_ksp)
815 kstat_delete(hxgep->statsp->pfc_ksp);
817 if (hxgep->statsp->vmac_ksp)
818 kstat_delete(hxgep->statsp->vmac_ksp);
820 if (hxgep->statsp->port_ksp)
821 kstat_delete(hxgep->statsp->port_ksp);
823 if (hxgep->statsp)
824 KMEM_FREE(hxgep->statsp, hxgep->statsp->stats_size);
834 p_hxge_stats_t statsp;
843 statsp = (p_hxge_stats_t)hxgep->statsp;
845 psp = &statsp->port_stats;
853 hxgekp->ifspeed.value.ul = statsp->mac_stats.link_speed * 1000000ULL;
858 hxgekp->cap_10gfdx.value.ul = statsp->mac_stats.cap_10gfdx;
863 hxgekp->lp_cap_10gfdx.value.ul = statsp->mac_stats.lp_cap_10gfdx;
868 hxgekp->link_speed.value.ul = statsp->mac_stats.link_speed;
869 if (statsp->mac_stats.link_duplex == 2)
873 hxgekp->link_up.value.ul = statsp->mac_stats.link_up;
895 ASSERT(hxgep->statsp != NULL);
900 *val = hxgep->statsp->rdc_stats[rhp->index].ierrors;
903 *val = hxgep->statsp->rdc_stats[rhp->index].ibytes;
906 *val = hxgep->statsp->rdc_stats[rhp->index].ipackets;
927 ASSERT(hxgep->statsp != NULL);
932 *val = hxgep->statsp->tdc_stats[rhp->index].oerrors;
935 *val = hxgep->statsp->tdc_stats[rhp->index].obytes;
938 *val = hxgep->statsp->tdc_stats[rhp->index].opackets;
952 p_hxge_stats_t statsp;
958 statsp = (p_hxge_stats_t)hxgep->statsp;
962 val = statsp->mac_stats.link_speed * 1000000ull;
989 val += statsp->rdc_stats[channel].ierrors;
999 val += statsp->tdc_stats[channel].oerrors;
1009 val += statsp->rdc_stats[channel].ibytes;
1015 val += statsp->rdc_stats[channel].ipackets;
1021 val += statsp->tdc_stats[channel].obytes;
1027 val += statsp->tdc_stats[channel].opackets;
1044 val = statsp->mac_stats.link_duplex;
1047 val = statsp->mac_stats.link_up;
1050 val = statsp->mac_stats.promisc;
1097 tx_stats = &statsp->tdc_stats[channel];
1118 tx_stats = &statsp->tdc_stats[channel];
1129 tx_stats = &statsp->tdc_stats[channel];
1266 val = statsp->mac_stats.link_duplex;