Lines Matching refs:portno

201 static void sparx5_get_queue_sys_stats(struct sparx5 *sparx5, int portno)  in sparx5_get_queue_sys_stats()  argument
208 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_queue_sys_stats()
210 spx5_wr(XQS_STAT_CFG_STAT_VIEW_SET(portno), sparx5, XQS_STAT_CFG); in sparx5_get_queue_sys_stats()
230 static void sparx5_get_ana_ac_stats_stats(struct sparx5 *sparx5, int portno) in sparx5_get_ana_ac_stats_stats() argument
232 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_ana_ac_stats_stats()
235 spx5_rd(sparx5, ANA_AC_PORT_STAT_LSB_CNT(portno, in sparx5_get_ana_ac_stats_stats()
505 static void sparx5_get_device_stats(struct sparx5 *sparx5, int portno) in sparx5_get_device_stats() argument
507 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_device_stats()
508 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_device_stats()
509 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_device_stats()
521 portno) in sparx5_get_asm_phy_stats() argument
525 ASM_RX_SYMBOL_ERR_CNT(portno))); in sparx5_get_asm_phy_stats()
528 ASM_PMAC_RX_SYMBOL_ERR_CNT(portno))); in sparx5_get_asm_phy_stats()
532 portno) in sparx5_get_asm_mac_stats() argument
535 spx5_inst_rd(inst, ASM_TX_UC_CNT(portno))); in sparx5_get_asm_mac_stats()
537 spx5_inst_rd(inst, ASM_PMAC_TX_UC_CNT(portno))); in sparx5_get_asm_mac_stats()
539 spx5_inst_rd(inst, ASM_TX_MC_CNT(portno))); in sparx5_get_asm_mac_stats()
541 spx5_inst_rd(inst, ASM_TX_BC_CNT(portno))); in sparx5_get_asm_mac_stats()
543 spx5_inst_rd(inst, ASM_TX_BACKOFF1_CNT(portno))); in sparx5_get_asm_mac_stats()
546 ASM_TX_MULTI_COLL_CNT(portno))); in sparx5_get_asm_mac_stats()
548 spx5_inst_rd(inst, ASM_RX_UC_CNT(portno))); in sparx5_get_asm_mac_stats()
550 spx5_inst_rd(inst, ASM_PMAC_RX_UC_CNT(portno))); in sparx5_get_asm_mac_stats()
552 spx5_inst_rd(inst, ASM_RX_MC_CNT(portno))); in sparx5_get_asm_mac_stats()
554 spx5_inst_rd(inst, ASM_RX_BC_CNT(portno))); in sparx5_get_asm_mac_stats()
556 spx5_inst_rd(inst, ASM_RX_CRC_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
559 ASM_PMAC_RX_CRC_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
562 ASM_RX_ALIGNMENT_LOST_CNT(portno))); in sparx5_get_asm_mac_stats()
565 ASM_PMAC_RX_ALIGNMENT_LOST_CNT(portno))); in sparx5_get_asm_mac_stats()
567 spx5_inst_rd(inst, ASM_TX_OK_BYTES_CNT(portno))); in sparx5_get_asm_mac_stats()
570 ASM_PMAC_TX_OK_BYTES_CNT(portno))); in sparx5_get_asm_mac_stats()
572 spx5_inst_rd(inst, ASM_TX_DEFER_CNT(portno))); in sparx5_get_asm_mac_stats()
574 spx5_inst_rd(inst, ASM_TX_LATE_COLL_CNT(portno))); in sparx5_get_asm_mac_stats()
576 spx5_inst_rd(inst, ASM_TX_XCOLL_CNT(portno))); in sparx5_get_asm_mac_stats()
578 spx5_inst_rd(inst, ASM_TX_CSENSE_CNT(portno))); in sparx5_get_asm_mac_stats()
580 spx5_inst_rd(inst, ASM_RX_OK_BYTES_CNT(portno))); in sparx5_get_asm_mac_stats()
583 ASM_PMAC_RX_OK_BYTES_CNT(portno))); in sparx5_get_asm_mac_stats()
585 spx5_inst_rd(inst, ASM_PMAC_TX_MC_CNT(portno))); in sparx5_get_asm_mac_stats()
587 spx5_inst_rd(inst, ASM_PMAC_TX_BC_CNT(portno))); in sparx5_get_asm_mac_stats()
589 spx5_inst_rd(inst, ASM_TX_XDEFER_CNT(portno))); in sparx5_get_asm_mac_stats()
591 spx5_inst_rd(inst, ASM_PMAC_RX_MC_CNT(portno))); in sparx5_get_asm_mac_stats()
593 spx5_inst_rd(inst, ASM_PMAC_RX_BC_CNT(portno))); in sparx5_get_asm_mac_stats()
596 ASM_RX_IN_RANGE_LEN_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
599 ASM_PMAC_RX_IN_RANGE_LEN_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
602 ASM_RX_OUT_OF_RANGE_LEN_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
605 ASM_PMAC_RX_OUT_OF_RANGE_LEN_ERR_CNT(portno))); in sparx5_get_asm_mac_stats()
607 spx5_inst_rd(inst, ASM_RX_OVERSIZE_CNT(portno))); in sparx5_get_asm_mac_stats()
610 ASM_PMAC_RX_OVERSIZE_CNT(portno))); in sparx5_get_asm_mac_stats()
614 int portno) in sparx5_get_asm_mac_ctrl_stats() argument
617 spx5_inst_rd(inst, ASM_TX_PAUSE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
620 ASM_PMAC_TX_PAUSE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
622 spx5_inst_rd(inst, ASM_RX_PAUSE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
625 ASM_PMAC_RX_PAUSE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
628 ASM_RX_UNSUP_OPCODE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
631 ASM_PMAC_RX_UNSUP_OPCODE_CNT(portno))); in sparx5_get_asm_mac_ctrl_stats()
635 portno) in sparx5_get_asm_rmon_stats() argument
638 spx5_inst_rd(inst, ASM_RX_UNDERSIZE_CNT(portno))); in sparx5_get_asm_rmon_stats()
641 ASM_PMAC_RX_UNDERSIZE_CNT(portno))); in sparx5_get_asm_rmon_stats()
643 spx5_inst_rd(inst, ASM_RX_OVERSIZE_CNT(portno))); in sparx5_get_asm_rmon_stats()
646 ASM_PMAC_RX_OVERSIZE_CNT(portno))); in sparx5_get_asm_rmon_stats()
648 spx5_inst_rd(inst, ASM_RX_FRAGMENTS_CNT(portno))); in sparx5_get_asm_rmon_stats()
651 ASM_PMAC_RX_FRAGMENTS_CNT(portno))); in sparx5_get_asm_rmon_stats()
653 spx5_inst_rd(inst, ASM_RX_JABBERS_CNT(portno))); in sparx5_get_asm_rmon_stats()
656 ASM_PMAC_RX_JABBERS_CNT(portno))); in sparx5_get_asm_rmon_stats()
658 spx5_inst_rd(inst, ASM_RX_SIZE64_CNT(portno))); in sparx5_get_asm_rmon_stats()
661 ASM_PMAC_RX_SIZE64_CNT(portno))); in sparx5_get_asm_rmon_stats()
664 ASM_RX_SIZE65TO127_CNT(portno))); in sparx5_get_asm_rmon_stats()
667 ASM_PMAC_RX_SIZE65TO127_CNT(portno))); in sparx5_get_asm_rmon_stats()
670 ASM_RX_SIZE128TO255_CNT(portno))); in sparx5_get_asm_rmon_stats()
673 ASM_PMAC_RX_SIZE128TO255_CNT(portno))); in sparx5_get_asm_rmon_stats()
676 ASM_RX_SIZE256TO511_CNT(portno))); in sparx5_get_asm_rmon_stats()
679 ASM_PMAC_RX_SIZE256TO511_CNT(portno))); in sparx5_get_asm_rmon_stats()
682 ASM_RX_SIZE512TO1023_CNT(portno))); in sparx5_get_asm_rmon_stats()
685 ASM_PMAC_RX_SIZE512TO1023_CNT(portno))); in sparx5_get_asm_rmon_stats()
688 ASM_RX_SIZE1024TO1518_CNT(portno))); in sparx5_get_asm_rmon_stats()
691 ASM_PMAC_RX_SIZE1024TO1518_CNT(portno))); in sparx5_get_asm_rmon_stats()
694 ASM_RX_SIZE1519TOMAX_CNT(portno))); in sparx5_get_asm_rmon_stats()
697 ASM_PMAC_RX_SIZE1519TOMAX_CNT(portno))); in sparx5_get_asm_rmon_stats()
699 spx5_inst_rd(inst, ASM_TX_SIZE64_CNT(portno))); in sparx5_get_asm_rmon_stats()
702 ASM_PMAC_TX_SIZE64_CNT(portno))); in sparx5_get_asm_rmon_stats()
705 ASM_TX_SIZE65TO127_CNT(portno))); in sparx5_get_asm_rmon_stats()
708 ASM_PMAC_TX_SIZE65TO127_CNT(portno))); in sparx5_get_asm_rmon_stats()
711 ASM_TX_SIZE128TO255_CNT(portno))); in sparx5_get_asm_rmon_stats()
714 ASM_PMAC_TX_SIZE128TO255_CNT(portno))); in sparx5_get_asm_rmon_stats()
717 ASM_TX_SIZE256TO511_CNT(portno))); in sparx5_get_asm_rmon_stats()
720 ASM_PMAC_TX_SIZE256TO511_CNT(portno))); in sparx5_get_asm_rmon_stats()
723 ASM_TX_SIZE512TO1023_CNT(portno))); in sparx5_get_asm_rmon_stats()
726 ASM_PMAC_TX_SIZE512TO1023_CNT(portno))); in sparx5_get_asm_rmon_stats()
729 ASM_TX_SIZE1024TO1518_CNT(portno))); in sparx5_get_asm_rmon_stats()
732 ASM_PMAC_TX_SIZE1024TO1518_CNT(portno))); in sparx5_get_asm_rmon_stats()
735 ASM_TX_SIZE1519TOMAX_CNT(portno))); in sparx5_get_asm_rmon_stats()
738 ASM_PMAC_TX_SIZE1519TOMAX_CNT(portno))); in sparx5_get_asm_rmon_stats()
742 portno) in sparx5_get_asm_misc_stats() argument
746 ASM_MM_RX_ASSEMBLY_ERR_CNT(portno))); in sparx5_get_asm_misc_stats()
749 ASM_MM_RX_ASSEMBLY_OK_CNT(portno))); in sparx5_get_asm_misc_stats()
752 ASM_MM_RX_MERGE_FRAG_CNT(portno))); in sparx5_get_asm_misc_stats()
755 ASM_MM_RX_SMD_ERR_CNT(portno))); in sparx5_get_asm_misc_stats()
758 ASM_MM_TX_PFRAGMENT_CNT(portno))); in sparx5_get_asm_misc_stats()
760 spx5_inst_rd(inst, ASM_RX_BAD_BYTES_CNT(portno))); in sparx5_get_asm_misc_stats()
763 ASM_PMAC_RX_BAD_BYTES_CNT(portno))); in sparx5_get_asm_misc_stats()
765 spx5_inst_rd(inst, ASM_RX_IN_BYTES_CNT(portno))); in sparx5_get_asm_misc_stats()
768 ASM_RX_IPG_SHRINK_CNT(portno))); in sparx5_get_asm_misc_stats()
771 ASM_RX_SYNC_LOST_ERR_CNT(portno))); in sparx5_get_asm_misc_stats()
774 ASM_RX_TAGGED_FRMS_CNT(portno))); in sparx5_get_asm_misc_stats()
777 ASM_RX_UNTAGGED_FRMS_CNT(portno))); in sparx5_get_asm_misc_stats()
779 spx5_inst_rd(inst, ASM_TX_OUT_BYTES_CNT(portno))); in sparx5_get_asm_misc_stats()
782 ASM_TX_TAGGED_FRMS_CNT(portno))); in sparx5_get_asm_misc_stats()
785 ASM_TX_UNTAGGED_FRMS_CNT(portno))); in sparx5_get_asm_misc_stats()
788 static void sparx5_get_asm_stats(struct sparx5 *sparx5, int portno) in sparx5_get_asm_stats() argument
790 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_asm_stats()
793 sparx5_get_asm_phy_stats(portstats, inst, portno); in sparx5_get_asm_stats()
794 sparx5_get_asm_mac_stats(portstats, inst, portno); in sparx5_get_asm_stats()
795 sparx5_get_asm_mac_ctrl_stats(portstats, inst, portno); in sparx5_get_asm_stats()
796 sparx5_get_asm_rmon_stats(portstats, inst, portno); in sparx5_get_asm_stats()
797 sparx5_get_asm_misc_stats(portstats, inst, portno); in sparx5_get_asm_stats()
816 int portno = port->portno; in sparx5_get_eth_phy_stats() local
820 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_phy_stats()
822 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_eth_phy_stats()
823 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_eth_phy_stats()
829 sparx5_get_asm_phy_stats(portstats, inst, portno); in sparx5_get_eth_phy_stats()
841 int portno = port->portno; in sparx5_get_eth_mac_stats() local
845 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_mac_stats()
847 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_eth_mac_stats()
848 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_eth_mac_stats()
854 sparx5_get_asm_mac_stats(portstats, inst, portno); in sparx5_get_eth_mac_stats()
909 int portno = port->portno; in sparx5_get_eth_mac_ctrl_stats() local
913 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_mac_ctrl_stats()
915 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_eth_mac_ctrl_stats()
916 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_eth_mac_ctrl_stats()
922 sparx5_get_asm_mac_ctrl_stats(portstats, inst, portno); in sparx5_get_eth_mac_ctrl_stats()
941 int portno = port->portno; in sparx5_get_eth_rmon_stats() local
945 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_rmon_stats()
947 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_eth_rmon_stats()
948 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_eth_rmon_stats()
954 sparx5_get_asm_rmon_stats(portstats, inst, portno); in sparx5_get_eth_rmon_stats()
1024 int portno = port->portno; in sparx5_get_sset_data() local
1029 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_sset_data()
1031 u32 tinst = sparx5_port_dev_index(portno); in sparx5_get_sset_data()
1032 u32 dev = sparx5_to_high_dev(portno); in sparx5_get_sset_data()
1038 sparx5_get_asm_misc_stats(portstats, inst, portno); in sparx5_get_sset_data()
1040 sparx5_get_ana_ac_stats_stats(sparx5, portno); in sparx5_get_sset_data()
1041 sparx5_get_queue_sys_stats(sparx5, portno); in sparx5_get_sset_data()
1060 portstats = &sparx5->stats[port->portno * sparx5->num_stats]; in sparx5_get_stats64()
1112 static void sparx5_update_port_stats(struct sparx5 *sparx5, int portno) in sparx5_update_port_stats() argument
1114 if (sparx5_is_baser(sparx5->ports[portno]->conf.portmode)) in sparx5_update_port_stats()
1115 sparx5_get_device_stats(sparx5, portno); in sparx5_update_port_stats()
1117 sparx5_get_asm_stats(sparx5, portno); in sparx5_update_port_stats()
1118 sparx5_get_ana_ac_stats_stats(sparx5, portno); in sparx5_update_port_stats()
1119 sparx5_get_queue_sys_stats(sparx5, portno); in sparx5_update_port_stats()
1169 static void sparx5_config_port_stats(struct sparx5 *sparx5, int portno) in sparx5_config_port_stats() argument
1172 spx5_wr(XQS_STAT_CFG_STAT_VIEW_SET(portno) | in sparx5_config_port_stats()
1183 sparx5, ANA_AC_PORT_STAT_CFG(portno, SPX5_PORT_POLICER_DROPS)); in sparx5_config_port_stats()
1236 int portno; in sparx_stats_init() local
1249 for (portno = 0; portno < SPX5_PORTS; portno++) in sparx_stats_init()
1250 if (sparx5->ports[portno]) in sparx_stats_init()
1251 sparx5_config_port_stats(sparx5, portno); in sparx_stats_init()