Lines Matching refs:portstats
203 u64 *portstats; in sparx5_get_queue_sys_stats() local
208 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_queue_sys_stats()
212 stats = &portstats[spx5_stats_green_p0_rx_fwd]; in sparx5_get_queue_sys_stats()
216 stats = &portstats[spx5_stats_green_p0_rx_port_drop]; in sparx5_get_queue_sys_stats()
220 stats = &portstats[spx5_stats_green_p0_tx_port]; in sparx5_get_queue_sys_stats()
223 sparx5_update_counter(&portstats[spx5_stats_rx_local_drop], in sparx5_get_queue_sys_stats()
225 sparx5_update_counter(&portstats[spx5_stats_tx_local_drop], in sparx5_get_queue_sys_stats()
232 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_ana_ac_stats_stats() local
234 sparx5_update_counter(&portstats[spx5_stats_ana_ac_port_stat_lsb_cnt], in sparx5_get_ana_ac_stats_stats()
239 static void sparx5_get_dev_phy_stats(u64 *portstats, void __iomem *inst, u32 in sparx5_get_dev_phy_stats() argument
242 sparx5_update_counter(&portstats[spx5_stats_rx_symbol_err_cnt], in sparx5_get_dev_phy_stats()
245 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_symbol_err_cnt], in sparx5_get_dev_phy_stats()
250 static void sparx5_get_dev_mac_stats(u64 *portstats, void __iomem *inst, u32 in sparx5_get_dev_mac_stats() argument
253 sparx5_update_counter(&portstats[spx5_stats_tx_uc_cnt], in sparx5_get_dev_mac_stats()
255 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_uc_cnt], in sparx5_get_dev_mac_stats()
257 sparx5_update_counter(&portstats[spx5_stats_tx_mc_cnt], in sparx5_get_dev_mac_stats()
259 sparx5_update_counter(&portstats[spx5_stats_tx_bc_cnt], in sparx5_get_dev_mac_stats()
261 sparx5_update_counter(&portstats[spx5_stats_rx_uc_cnt], in sparx5_get_dev_mac_stats()
263 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_uc_cnt], in sparx5_get_dev_mac_stats()
265 sparx5_update_counter(&portstats[spx5_stats_rx_mc_cnt], in sparx5_get_dev_mac_stats()
267 sparx5_update_counter(&portstats[spx5_stats_rx_bc_cnt], in sparx5_get_dev_mac_stats()
269 sparx5_update_counter(&portstats[spx5_stats_rx_crc_err_cnt], in sparx5_get_dev_mac_stats()
271 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_crc_err_cnt], in sparx5_get_dev_mac_stats()
274 sparx5_update_counter(&portstats[spx5_stats_rx_alignment_lost_cnt], in sparx5_get_dev_mac_stats()
277 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_alignment_lost_cnt], in sparx5_get_dev_mac_stats()
280 sparx5_update_counter(&portstats[spx5_stats_tx_ok_bytes_cnt], in sparx5_get_dev_mac_stats()
282 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_ok_bytes_cnt], in sparx5_get_dev_mac_stats()
285 sparx5_update_counter(&portstats[spx5_stats_rx_ok_bytes_cnt], in sparx5_get_dev_mac_stats()
287 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_ok_bytes_cnt], in sparx5_get_dev_mac_stats()
290 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_mc_cnt], in sparx5_get_dev_mac_stats()
292 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_bc_cnt], in sparx5_get_dev_mac_stats()
294 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_mc_cnt], in sparx5_get_dev_mac_stats()
296 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_bc_cnt], in sparx5_get_dev_mac_stats()
298 sparx5_update_counter(&portstats[spx5_stats_rx_in_range_len_err_cnt], in sparx5_get_dev_mac_stats()
301 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_in_range_len_err_cnt], in sparx5_get_dev_mac_stats()
304 sparx5_update_counter(&portstats[spx5_stats_rx_out_of_range_len_err_cnt], in sparx5_get_dev_mac_stats()
307 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_out_of_range_len_err_cnt], in sparx5_get_dev_mac_stats()
310 sparx5_update_counter(&portstats[spx5_stats_rx_oversize_cnt], in sparx5_get_dev_mac_stats()
312 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_oversize_cnt], in sparx5_get_dev_mac_stats()
317 static void sparx5_get_dev_mac_ctrl_stats(u64 *portstats, void __iomem *inst, in sparx5_get_dev_mac_ctrl_stats() argument
320 sparx5_update_counter(&portstats[spx5_stats_tx_pause_cnt], in sparx5_get_dev_mac_ctrl_stats()
322 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_pause_cnt], in sparx5_get_dev_mac_ctrl_stats()
325 sparx5_update_counter(&portstats[spx5_stats_rx_pause_cnt], in sparx5_get_dev_mac_ctrl_stats()
327 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_pause_cnt], in sparx5_get_dev_mac_ctrl_stats()
330 sparx5_update_counter(&portstats[spx5_stats_rx_unsup_opcode_cnt], in sparx5_get_dev_mac_ctrl_stats()
333 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_unsup_opcode_cnt], in sparx5_get_dev_mac_ctrl_stats()
338 static void sparx5_get_dev_rmon_stats(u64 *portstats, void __iomem *inst, u32 in sparx5_get_dev_rmon_stats() argument
341 sparx5_update_counter(&portstats[spx5_stats_rx_undersize_cnt], in sparx5_get_dev_rmon_stats()
344 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_undersize_cnt], in sparx5_get_dev_rmon_stats()
347 sparx5_update_counter(&portstats[spx5_stats_rx_oversize_cnt], in sparx5_get_dev_rmon_stats()
349 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_oversize_cnt], in sparx5_get_dev_rmon_stats()
352 sparx5_update_counter(&portstats[spx5_stats_rx_fragments_cnt], in sparx5_get_dev_rmon_stats()
355 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_fragments_cnt], in sparx5_get_dev_rmon_stats()
358 sparx5_update_counter(&portstats[spx5_stats_rx_jabbers_cnt], in sparx5_get_dev_rmon_stats()
360 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_jabbers_cnt], in sparx5_get_dev_rmon_stats()
363 sparx5_update_counter(&portstats[spx5_stats_rx_size64_cnt], in sparx5_get_dev_rmon_stats()
365 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size64_cnt], in sparx5_get_dev_rmon_stats()
368 sparx5_update_counter(&portstats[spx5_stats_rx_size65to127_cnt], in sparx5_get_dev_rmon_stats()
371 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size65to127_cnt], in sparx5_get_dev_rmon_stats()
374 sparx5_update_counter(&portstats[spx5_stats_rx_size128to255_cnt], in sparx5_get_dev_rmon_stats()
377 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size128to255_cnt], in sparx5_get_dev_rmon_stats()
380 sparx5_update_counter(&portstats[spx5_stats_rx_size256to511_cnt], in sparx5_get_dev_rmon_stats()
383 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size256to511_cnt], in sparx5_get_dev_rmon_stats()
386 sparx5_update_counter(&portstats[spx5_stats_rx_size512to1023_cnt], in sparx5_get_dev_rmon_stats()
389 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size512to1023_cnt], in sparx5_get_dev_rmon_stats()
392 sparx5_update_counter(&portstats[spx5_stats_rx_size1024to1518_cnt], in sparx5_get_dev_rmon_stats()
395 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size1024to1518_cnt], in sparx5_get_dev_rmon_stats()
398 sparx5_update_counter(&portstats[spx5_stats_rx_size1519tomax_cnt], in sparx5_get_dev_rmon_stats()
401 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size1519tomax_cnt], in sparx5_get_dev_rmon_stats()
404 sparx5_update_counter(&portstats[spx5_stats_tx_size64_cnt], in sparx5_get_dev_rmon_stats()
406 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size64_cnt], in sparx5_get_dev_rmon_stats()
409 sparx5_update_counter(&portstats[spx5_stats_tx_size65to127_cnt], in sparx5_get_dev_rmon_stats()
412 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size65to127_cnt], in sparx5_get_dev_rmon_stats()
415 sparx5_update_counter(&portstats[spx5_stats_tx_size128to255_cnt], in sparx5_get_dev_rmon_stats()
418 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size128to255_cnt], in sparx5_get_dev_rmon_stats()
421 sparx5_update_counter(&portstats[spx5_stats_tx_size256to511_cnt], in sparx5_get_dev_rmon_stats()
424 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size256to511_cnt], in sparx5_get_dev_rmon_stats()
427 sparx5_update_counter(&portstats[spx5_stats_tx_size512to1023_cnt], in sparx5_get_dev_rmon_stats()
430 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size512to1023_cnt], in sparx5_get_dev_rmon_stats()
433 sparx5_update_counter(&portstats[spx5_stats_tx_size1024to1518_cnt], in sparx5_get_dev_rmon_stats()
436 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size1024to1518_cnt], in sparx5_get_dev_rmon_stats()
439 sparx5_update_counter(&portstats[spx5_stats_tx_size1519tomax_cnt], in sparx5_get_dev_rmon_stats()
442 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size1519tomax_cnt], in sparx5_get_dev_rmon_stats()
447 static void sparx5_get_dev_misc_stats(u64 *portstats, void __iomem *inst, u32 in sparx5_get_dev_misc_stats() argument
450 sparx5_update_counter(&portstats[spx5_stats_mm_rx_assembly_err_cnt], in sparx5_get_dev_misc_stats()
453 sparx5_update_counter(&portstats[spx5_stats_mm_rx_assembly_ok_cnt], in sparx5_get_dev_misc_stats()
456 sparx5_update_counter(&portstats[spx5_stats_mm_rx_merge_frag_cnt], in sparx5_get_dev_misc_stats()
459 sparx5_update_counter(&portstats[spx5_stats_mm_rx_smd_err_cnt], in sparx5_get_dev_misc_stats()
462 sparx5_update_counter(&portstats[spx5_stats_mm_tx_pfragment_cnt], in sparx5_get_dev_misc_stats()
465 sparx5_update_counter(&portstats[spx5_stats_rx_bad_bytes_cnt], in sparx5_get_dev_misc_stats()
468 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_bad_bytes_cnt], in sparx5_get_dev_misc_stats()
471 sparx5_update_counter(&portstats[spx5_stats_rx_in_bytes_cnt], in sparx5_get_dev_misc_stats()
473 sparx5_update_counter(&portstats[spx5_stats_rx_ipg_shrink_cnt], in sparx5_get_dev_misc_stats()
476 sparx5_update_counter(&portstats[spx5_stats_rx_tagged_frms_cnt], in sparx5_get_dev_misc_stats()
479 sparx5_update_counter(&portstats[spx5_stats_rx_untagged_frms_cnt], in sparx5_get_dev_misc_stats()
482 sparx5_update_counter(&portstats[spx5_stats_tx_out_bytes_cnt], in sparx5_get_dev_misc_stats()
485 sparx5_update_counter(&portstats[spx5_stats_tx_tagged_frms_cnt], in sparx5_get_dev_misc_stats()
488 sparx5_update_counter(&portstats[spx5_stats_tx_untagged_frms_cnt], in sparx5_get_dev_misc_stats()
491 sparx5_update_counter(&portstats[spx5_stats_rx_hih_cksm_err_cnt], in sparx5_get_dev_misc_stats()
494 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_hih_cksm_err_cnt], in sparx5_get_dev_misc_stats()
497 sparx5_update_counter(&portstats[spx5_stats_rx_xgmii_prot_err_cnt], in sparx5_get_dev_misc_stats()
500 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_xgmii_prot_err_cnt], in sparx5_get_dev_misc_stats()
507 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_device_stats() local
513 sparx5_get_dev_phy_stats(portstats, inst, tinst); in sparx5_get_device_stats()
514 sparx5_get_dev_mac_stats(portstats, inst, tinst); in sparx5_get_device_stats()
515 sparx5_get_dev_mac_ctrl_stats(portstats, inst, tinst); in sparx5_get_device_stats()
516 sparx5_get_dev_rmon_stats(portstats, inst, tinst); in sparx5_get_device_stats()
517 sparx5_get_dev_misc_stats(portstats, inst, tinst); in sparx5_get_device_stats()
520 static void sparx5_get_asm_phy_stats(u64 *portstats, void __iomem *inst, int in sparx5_get_asm_phy_stats() argument
523 sparx5_update_counter(&portstats[spx5_stats_rx_symbol_err_cnt], in sparx5_get_asm_phy_stats()
526 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_symbol_err_cnt], in sparx5_get_asm_phy_stats()
531 static void sparx5_get_asm_mac_stats(u64 *portstats, void __iomem *inst, int in sparx5_get_asm_mac_stats() argument
534 sparx5_update_counter(&portstats[spx5_stats_tx_uc_cnt], in sparx5_get_asm_mac_stats()
536 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_uc_cnt], in sparx5_get_asm_mac_stats()
538 sparx5_update_counter(&portstats[spx5_stats_tx_mc_cnt], in sparx5_get_asm_mac_stats()
540 sparx5_update_counter(&portstats[spx5_stats_tx_bc_cnt], in sparx5_get_asm_mac_stats()
542 sparx5_update_counter(&portstats[spx5_stats_tx_backoff1_cnt], in sparx5_get_asm_mac_stats()
544 sparx5_update_counter(&portstats[spx5_stats_tx_multi_coll_cnt], in sparx5_get_asm_mac_stats()
547 sparx5_update_counter(&portstats[spx5_stats_rx_uc_cnt], in sparx5_get_asm_mac_stats()
549 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_uc_cnt], in sparx5_get_asm_mac_stats()
551 sparx5_update_counter(&portstats[spx5_stats_rx_mc_cnt], in sparx5_get_asm_mac_stats()
553 sparx5_update_counter(&portstats[spx5_stats_rx_bc_cnt], in sparx5_get_asm_mac_stats()
555 sparx5_update_counter(&portstats[spx5_stats_rx_crc_err_cnt], in sparx5_get_asm_mac_stats()
557 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_crc_err_cnt], in sparx5_get_asm_mac_stats()
560 sparx5_update_counter(&portstats[spx5_stats_rx_alignment_lost_cnt], in sparx5_get_asm_mac_stats()
563 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_alignment_lost_cnt], in sparx5_get_asm_mac_stats()
566 sparx5_update_counter(&portstats[spx5_stats_tx_ok_bytes_cnt], in sparx5_get_asm_mac_stats()
568 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_ok_bytes_cnt], in sparx5_get_asm_mac_stats()
571 sparx5_update_counter(&portstats[spx5_stats_tx_defer_cnt], in sparx5_get_asm_mac_stats()
573 sparx5_update_counter(&portstats[spx5_stats_tx_late_coll_cnt], in sparx5_get_asm_mac_stats()
575 sparx5_update_counter(&portstats[spx5_stats_tx_xcoll_cnt], in sparx5_get_asm_mac_stats()
577 sparx5_update_counter(&portstats[spx5_stats_tx_csense_cnt], in sparx5_get_asm_mac_stats()
579 sparx5_update_counter(&portstats[spx5_stats_rx_ok_bytes_cnt], in sparx5_get_asm_mac_stats()
581 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_ok_bytes_cnt], in sparx5_get_asm_mac_stats()
584 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_mc_cnt], in sparx5_get_asm_mac_stats()
586 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_bc_cnt], in sparx5_get_asm_mac_stats()
588 sparx5_update_counter(&portstats[spx5_stats_tx_xdefer_cnt], in sparx5_get_asm_mac_stats()
590 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_mc_cnt], in sparx5_get_asm_mac_stats()
592 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_bc_cnt], in sparx5_get_asm_mac_stats()
594 sparx5_update_counter(&portstats[spx5_stats_rx_in_range_len_err_cnt], in sparx5_get_asm_mac_stats()
597 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_in_range_len_err_cnt], in sparx5_get_asm_mac_stats()
600 sparx5_update_counter(&portstats[spx5_stats_rx_out_of_range_len_err_cnt], in sparx5_get_asm_mac_stats()
603 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_out_of_range_len_err_cnt], in sparx5_get_asm_mac_stats()
606 sparx5_update_counter(&portstats[spx5_stats_rx_oversize_cnt], in sparx5_get_asm_mac_stats()
608 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_oversize_cnt], in sparx5_get_asm_mac_stats()
613 static void sparx5_get_asm_mac_ctrl_stats(u64 *portstats, void __iomem *inst, in sparx5_get_asm_mac_ctrl_stats() argument
616 sparx5_update_counter(&portstats[spx5_stats_tx_pause_cnt], in sparx5_get_asm_mac_ctrl_stats()
618 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_pause_cnt], in sparx5_get_asm_mac_ctrl_stats()
621 sparx5_update_counter(&portstats[spx5_stats_rx_pause_cnt], in sparx5_get_asm_mac_ctrl_stats()
623 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_pause_cnt], in sparx5_get_asm_mac_ctrl_stats()
626 sparx5_update_counter(&portstats[spx5_stats_rx_unsup_opcode_cnt], in sparx5_get_asm_mac_ctrl_stats()
629 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_unsup_opcode_cnt], in sparx5_get_asm_mac_ctrl_stats()
634 static void sparx5_get_asm_rmon_stats(u64 *portstats, void __iomem *inst, int in sparx5_get_asm_rmon_stats() argument
637 sparx5_update_counter(&portstats[spx5_stats_rx_undersize_cnt], in sparx5_get_asm_rmon_stats()
639 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_undersize_cnt], in sparx5_get_asm_rmon_stats()
642 sparx5_update_counter(&portstats[spx5_stats_rx_oversize_cnt], in sparx5_get_asm_rmon_stats()
644 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_oversize_cnt], in sparx5_get_asm_rmon_stats()
647 sparx5_update_counter(&portstats[spx5_stats_rx_fragments_cnt], in sparx5_get_asm_rmon_stats()
649 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_fragments_cnt], in sparx5_get_asm_rmon_stats()
652 sparx5_update_counter(&portstats[spx5_stats_rx_jabbers_cnt], in sparx5_get_asm_rmon_stats()
654 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_jabbers_cnt], in sparx5_get_asm_rmon_stats()
657 sparx5_update_counter(&portstats[spx5_stats_rx_size64_cnt], in sparx5_get_asm_rmon_stats()
659 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size64_cnt], in sparx5_get_asm_rmon_stats()
662 sparx5_update_counter(&portstats[spx5_stats_rx_size65to127_cnt], in sparx5_get_asm_rmon_stats()
665 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size65to127_cnt], in sparx5_get_asm_rmon_stats()
668 sparx5_update_counter(&portstats[spx5_stats_rx_size128to255_cnt], in sparx5_get_asm_rmon_stats()
671 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size128to255_cnt], in sparx5_get_asm_rmon_stats()
674 sparx5_update_counter(&portstats[spx5_stats_rx_size256to511_cnt], in sparx5_get_asm_rmon_stats()
677 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size256to511_cnt], in sparx5_get_asm_rmon_stats()
680 sparx5_update_counter(&portstats[spx5_stats_rx_size512to1023_cnt], in sparx5_get_asm_rmon_stats()
683 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size512to1023_cnt], in sparx5_get_asm_rmon_stats()
686 sparx5_update_counter(&portstats[spx5_stats_rx_size1024to1518_cnt], in sparx5_get_asm_rmon_stats()
689 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size1024to1518_cnt], in sparx5_get_asm_rmon_stats()
692 sparx5_update_counter(&portstats[spx5_stats_rx_size1519tomax_cnt], in sparx5_get_asm_rmon_stats()
695 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_size1519tomax_cnt], in sparx5_get_asm_rmon_stats()
698 sparx5_update_counter(&portstats[spx5_stats_tx_size64_cnt], in sparx5_get_asm_rmon_stats()
700 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size64_cnt], in sparx5_get_asm_rmon_stats()
703 sparx5_update_counter(&portstats[spx5_stats_tx_size65to127_cnt], in sparx5_get_asm_rmon_stats()
706 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size65to127_cnt], in sparx5_get_asm_rmon_stats()
709 sparx5_update_counter(&portstats[spx5_stats_tx_size128to255_cnt], in sparx5_get_asm_rmon_stats()
712 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size128to255_cnt], in sparx5_get_asm_rmon_stats()
715 sparx5_update_counter(&portstats[spx5_stats_tx_size256to511_cnt], in sparx5_get_asm_rmon_stats()
718 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size256to511_cnt], in sparx5_get_asm_rmon_stats()
721 sparx5_update_counter(&portstats[spx5_stats_tx_size512to1023_cnt], in sparx5_get_asm_rmon_stats()
724 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size512to1023_cnt], in sparx5_get_asm_rmon_stats()
727 sparx5_update_counter(&portstats[spx5_stats_tx_size1024to1518_cnt], in sparx5_get_asm_rmon_stats()
730 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size1024to1518_cnt], in sparx5_get_asm_rmon_stats()
733 sparx5_update_counter(&portstats[spx5_stats_tx_size1519tomax_cnt], in sparx5_get_asm_rmon_stats()
736 sparx5_update_counter(&portstats[spx5_stats_pmac_tx_size1519tomax_cnt], in sparx5_get_asm_rmon_stats()
741 static void sparx5_get_asm_misc_stats(u64 *portstats, void __iomem *inst, int in sparx5_get_asm_misc_stats() argument
744 sparx5_update_counter(&portstats[spx5_stats_mm_rx_assembly_err_cnt], in sparx5_get_asm_misc_stats()
747 sparx5_update_counter(&portstats[spx5_stats_mm_rx_assembly_ok_cnt], in sparx5_get_asm_misc_stats()
750 sparx5_update_counter(&portstats[spx5_stats_mm_rx_merge_frag_cnt], in sparx5_get_asm_misc_stats()
753 sparx5_update_counter(&portstats[spx5_stats_mm_rx_smd_err_cnt], in sparx5_get_asm_misc_stats()
756 sparx5_update_counter(&portstats[spx5_stats_mm_tx_pfragment_cnt], in sparx5_get_asm_misc_stats()
759 sparx5_update_counter(&portstats[spx5_stats_rx_bad_bytes_cnt], in sparx5_get_asm_misc_stats()
761 sparx5_update_counter(&portstats[spx5_stats_pmac_rx_bad_bytes_cnt], in sparx5_get_asm_misc_stats()
764 sparx5_update_counter(&portstats[spx5_stats_rx_in_bytes_cnt], in sparx5_get_asm_misc_stats()
766 sparx5_update_counter(&portstats[spx5_stats_rx_ipg_shrink_cnt], in sparx5_get_asm_misc_stats()
769 sparx5_update_counter(&portstats[spx5_stats_rx_sync_lost_err_cnt], in sparx5_get_asm_misc_stats()
772 sparx5_update_counter(&portstats[spx5_stats_rx_tagged_frms_cnt], in sparx5_get_asm_misc_stats()
775 sparx5_update_counter(&portstats[spx5_stats_rx_untagged_frms_cnt], in sparx5_get_asm_misc_stats()
778 sparx5_update_counter(&portstats[spx5_stats_tx_out_bytes_cnt], in sparx5_get_asm_misc_stats()
780 sparx5_update_counter(&portstats[spx5_stats_tx_tagged_frms_cnt], in sparx5_get_asm_misc_stats()
783 sparx5_update_counter(&portstats[spx5_stats_tx_untagged_frms_cnt], in sparx5_get_asm_misc_stats()
790 u64 *portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_asm_stats() local
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()
818 u64 *portstats; in sparx5_get_eth_phy_stats() local
820 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_phy_stats()
826 sparx5_get_dev_phy_stats(portstats, inst, tinst); in sparx5_get_eth_phy_stats()
829 sparx5_get_asm_phy_stats(portstats, inst, portno); in sparx5_get_eth_phy_stats()
832 portstats[spx5_stats_rx_symbol_err_cnt] + in sparx5_get_eth_phy_stats()
833 portstats[spx5_stats_pmac_rx_symbol_err_cnt]; in sparx5_get_eth_phy_stats()
843 u64 *portstats; in sparx5_get_eth_mac_stats() local
845 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_mac_stats()
851 sparx5_get_dev_mac_stats(portstats, inst, tinst); in sparx5_get_eth_mac_stats()
854 sparx5_get_asm_mac_stats(portstats, inst, portno); in sparx5_get_eth_mac_stats()
856 mac_stats->FramesTransmittedOK = portstats[spx5_stats_tx_uc_cnt] + in sparx5_get_eth_mac_stats()
857 portstats[spx5_stats_pmac_tx_uc_cnt] + in sparx5_get_eth_mac_stats()
858 portstats[spx5_stats_tx_mc_cnt] + in sparx5_get_eth_mac_stats()
859 portstats[spx5_stats_tx_bc_cnt]; in sparx5_get_eth_mac_stats()
861 portstats[spx5_stats_tx_backoff1_cnt]; in sparx5_get_eth_mac_stats()
863 portstats[spx5_stats_tx_multi_coll_cnt]; in sparx5_get_eth_mac_stats()
864 mac_stats->FramesReceivedOK = portstats[spx5_stats_rx_uc_cnt] + in sparx5_get_eth_mac_stats()
865 portstats[spx5_stats_pmac_rx_uc_cnt] + in sparx5_get_eth_mac_stats()
866 portstats[spx5_stats_rx_mc_cnt] + in sparx5_get_eth_mac_stats()
867 portstats[spx5_stats_rx_bc_cnt]; in sparx5_get_eth_mac_stats()
869 portstats[spx5_stats_rx_crc_err_cnt] + in sparx5_get_eth_mac_stats()
870 portstats[spx5_stats_pmac_rx_crc_err_cnt]; in sparx5_get_eth_mac_stats()
871 mac_stats->AlignmentErrors = portstats[spx5_stats_rx_alignment_lost_cnt] in sparx5_get_eth_mac_stats()
872 + portstats[spx5_stats_pmac_rx_alignment_lost_cnt]; in sparx5_get_eth_mac_stats()
873 mac_stats->OctetsTransmittedOK = portstats[spx5_stats_tx_ok_bytes_cnt] + in sparx5_get_eth_mac_stats()
874 portstats[spx5_stats_pmac_tx_ok_bytes_cnt]; in sparx5_get_eth_mac_stats()
876 portstats[spx5_stats_tx_defer_cnt]; in sparx5_get_eth_mac_stats()
878 portstats[spx5_stats_tx_late_coll_cnt]; in sparx5_get_eth_mac_stats()
880 portstats[spx5_stats_tx_xcoll_cnt]; in sparx5_get_eth_mac_stats()
881 mac_stats->CarrierSenseErrors = portstats[spx5_stats_tx_csense_cnt]; in sparx5_get_eth_mac_stats()
882 mac_stats->OctetsReceivedOK = portstats[spx5_stats_rx_ok_bytes_cnt] + in sparx5_get_eth_mac_stats()
883 portstats[spx5_stats_pmac_rx_ok_bytes_cnt]; in sparx5_get_eth_mac_stats()
884 mac_stats->MulticastFramesXmittedOK = portstats[spx5_stats_tx_mc_cnt] + in sparx5_get_eth_mac_stats()
885 portstats[spx5_stats_pmac_tx_mc_cnt]; in sparx5_get_eth_mac_stats()
886 mac_stats->BroadcastFramesXmittedOK = portstats[spx5_stats_tx_bc_cnt] + in sparx5_get_eth_mac_stats()
887 portstats[spx5_stats_pmac_tx_bc_cnt]; in sparx5_get_eth_mac_stats()
889 portstats[spx5_stats_tx_xdefer_cnt]; in sparx5_get_eth_mac_stats()
890 mac_stats->MulticastFramesReceivedOK = portstats[spx5_stats_rx_mc_cnt] + in sparx5_get_eth_mac_stats()
891 portstats[spx5_stats_pmac_rx_mc_cnt]; in sparx5_get_eth_mac_stats()
892 mac_stats->BroadcastFramesReceivedOK = portstats[spx5_stats_rx_bc_cnt] + in sparx5_get_eth_mac_stats()
893 portstats[spx5_stats_pmac_rx_bc_cnt]; in sparx5_get_eth_mac_stats()
895 portstats[spx5_stats_rx_in_range_len_err_cnt] + in sparx5_get_eth_mac_stats()
896 portstats[spx5_stats_pmac_rx_in_range_len_err_cnt]; in sparx5_get_eth_mac_stats()
898 portstats[spx5_stats_rx_out_of_range_len_err_cnt] + in sparx5_get_eth_mac_stats()
899 portstats[spx5_stats_pmac_rx_out_of_range_len_err_cnt]; in sparx5_get_eth_mac_stats()
900 mac_stats->FrameTooLongErrors = portstats[spx5_stats_rx_oversize_cnt] + in sparx5_get_eth_mac_stats()
901 portstats[spx5_stats_pmac_rx_oversize_cnt]; in sparx5_get_eth_mac_stats()
911 u64 *portstats; in sparx5_get_eth_mac_ctrl_stats() local
913 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_mac_ctrl_stats()
919 sparx5_get_dev_mac_ctrl_stats(portstats, inst, tinst); in sparx5_get_eth_mac_ctrl_stats()
922 sparx5_get_asm_mac_ctrl_stats(portstats, inst, portno); in sparx5_get_eth_mac_ctrl_stats()
925 portstats[spx5_stats_tx_pause_cnt] + in sparx5_get_eth_mac_ctrl_stats()
926 portstats[spx5_stats_pmac_tx_pause_cnt]; in sparx5_get_eth_mac_ctrl_stats()
928 portstats[spx5_stats_rx_pause_cnt] + in sparx5_get_eth_mac_ctrl_stats()
929 portstats[spx5_stats_pmac_rx_pause_cnt]; in sparx5_get_eth_mac_ctrl_stats()
931 portstats[spx5_stats_rx_unsup_opcode_cnt] + in sparx5_get_eth_mac_ctrl_stats()
932 portstats[spx5_stats_pmac_rx_unsup_opcode_cnt]; in sparx5_get_eth_mac_ctrl_stats()
943 u64 *portstats; in sparx5_get_eth_rmon_stats() local
945 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_eth_rmon_stats()
951 sparx5_get_dev_rmon_stats(portstats, inst, tinst); in sparx5_get_eth_rmon_stats()
954 sparx5_get_asm_rmon_stats(portstats, inst, portno); in sparx5_get_eth_rmon_stats()
956 rmon_stats->undersize_pkts = portstats[spx5_stats_rx_undersize_cnt] + in sparx5_get_eth_rmon_stats()
957 portstats[spx5_stats_pmac_rx_undersize_cnt]; in sparx5_get_eth_rmon_stats()
958 rmon_stats->oversize_pkts = portstats[spx5_stats_rx_oversize_cnt] + in sparx5_get_eth_rmon_stats()
959 portstats[spx5_stats_pmac_rx_oversize_cnt]; in sparx5_get_eth_rmon_stats()
960 rmon_stats->fragments = portstats[spx5_stats_rx_fragments_cnt] + in sparx5_get_eth_rmon_stats()
961 portstats[spx5_stats_pmac_rx_fragments_cnt]; in sparx5_get_eth_rmon_stats()
962 rmon_stats->jabbers = portstats[spx5_stats_rx_jabbers_cnt] + in sparx5_get_eth_rmon_stats()
963 portstats[spx5_stats_pmac_rx_jabbers_cnt]; in sparx5_get_eth_rmon_stats()
964 rmon_stats->hist[0] = portstats[spx5_stats_rx_size64_cnt] + in sparx5_get_eth_rmon_stats()
965 portstats[spx5_stats_pmac_rx_size64_cnt]; in sparx5_get_eth_rmon_stats()
966 rmon_stats->hist[1] = portstats[spx5_stats_rx_size65to127_cnt] + in sparx5_get_eth_rmon_stats()
967 portstats[spx5_stats_pmac_rx_size65to127_cnt]; in sparx5_get_eth_rmon_stats()
968 rmon_stats->hist[2] = portstats[spx5_stats_rx_size128to255_cnt] + in sparx5_get_eth_rmon_stats()
969 portstats[spx5_stats_pmac_rx_size128to255_cnt]; in sparx5_get_eth_rmon_stats()
970 rmon_stats->hist[3] = portstats[spx5_stats_rx_size256to511_cnt] + in sparx5_get_eth_rmon_stats()
971 portstats[spx5_stats_pmac_rx_size256to511_cnt]; in sparx5_get_eth_rmon_stats()
972 rmon_stats->hist[4] = portstats[spx5_stats_rx_size512to1023_cnt] + in sparx5_get_eth_rmon_stats()
973 portstats[spx5_stats_pmac_rx_size512to1023_cnt]; in sparx5_get_eth_rmon_stats()
974 rmon_stats->hist[5] = portstats[spx5_stats_rx_size1024to1518_cnt] + in sparx5_get_eth_rmon_stats()
975 portstats[spx5_stats_pmac_rx_size1024to1518_cnt]; in sparx5_get_eth_rmon_stats()
976 rmon_stats->hist[6] = portstats[spx5_stats_rx_size1519tomax_cnt] + in sparx5_get_eth_rmon_stats()
977 portstats[spx5_stats_pmac_rx_size1519tomax_cnt]; in sparx5_get_eth_rmon_stats()
978 rmon_stats->hist_tx[0] = portstats[spx5_stats_tx_size64_cnt] + in sparx5_get_eth_rmon_stats()
979 portstats[spx5_stats_pmac_tx_size64_cnt]; in sparx5_get_eth_rmon_stats()
980 rmon_stats->hist_tx[1] = portstats[spx5_stats_tx_size65to127_cnt] + in sparx5_get_eth_rmon_stats()
981 portstats[spx5_stats_pmac_tx_size65to127_cnt]; in sparx5_get_eth_rmon_stats()
982 rmon_stats->hist_tx[2] = portstats[spx5_stats_tx_size128to255_cnt] + in sparx5_get_eth_rmon_stats()
983 portstats[spx5_stats_pmac_tx_size128to255_cnt]; in sparx5_get_eth_rmon_stats()
984 rmon_stats->hist_tx[3] = portstats[spx5_stats_tx_size256to511_cnt] + in sparx5_get_eth_rmon_stats()
985 portstats[spx5_stats_pmac_tx_size256to511_cnt]; in sparx5_get_eth_rmon_stats()
986 rmon_stats->hist_tx[4] = portstats[spx5_stats_tx_size512to1023_cnt] + in sparx5_get_eth_rmon_stats()
987 portstats[spx5_stats_pmac_tx_size512to1023_cnt]; in sparx5_get_eth_rmon_stats()
988 rmon_stats->hist_tx[5] = portstats[spx5_stats_tx_size1024to1518_cnt] + in sparx5_get_eth_rmon_stats()
989 portstats[spx5_stats_pmac_tx_size1024to1518_cnt]; in sparx5_get_eth_rmon_stats()
990 rmon_stats->hist_tx[6] = portstats[spx5_stats_tx_size1519tomax_cnt] + in sparx5_get_eth_rmon_stats()
991 portstats[spx5_stats_pmac_tx_size1519tomax_cnt]; in sparx5_get_eth_rmon_stats()
1026 u64 *portstats; in sparx5_get_sset_data() local
1029 portstats = &sparx5->stats[portno * sparx5->num_stats]; in sparx5_get_sset_data()
1035 sparx5_get_dev_misc_stats(portstats, inst, tinst); in sparx5_get_sset_data()
1038 sparx5_get_asm_misc_stats(portstats, inst, portno); in sparx5_get_sset_data()
1046 *data++ = portstats[idx]; in sparx5_get_sset_data()
1054 u64 *portstats; in sparx5_get_stats64() local
1060 portstats = &sparx5->stats[port->portno * sparx5->num_stats]; in sparx5_get_stats64()
1062 stats->rx_packets = portstats[spx5_stats_rx_uc_cnt] + in sparx5_get_stats64()
1063 portstats[spx5_stats_pmac_rx_uc_cnt] + in sparx5_get_stats64()
1064 portstats[spx5_stats_rx_mc_cnt] + in sparx5_get_stats64()
1065 portstats[spx5_stats_rx_bc_cnt]; in sparx5_get_stats64()
1066 stats->tx_packets = portstats[spx5_stats_tx_uc_cnt] + in sparx5_get_stats64()
1067 portstats[spx5_stats_pmac_tx_uc_cnt] + in sparx5_get_stats64()
1068 portstats[spx5_stats_tx_mc_cnt] + in sparx5_get_stats64()
1069 portstats[spx5_stats_tx_bc_cnt]; in sparx5_get_stats64()
1070 stats->rx_bytes = portstats[spx5_stats_rx_ok_bytes_cnt] + in sparx5_get_stats64()
1071 portstats[spx5_stats_pmac_rx_ok_bytes_cnt]; in sparx5_get_stats64()
1072 stats->tx_bytes = portstats[spx5_stats_tx_ok_bytes_cnt] + in sparx5_get_stats64()
1073 portstats[spx5_stats_pmac_tx_ok_bytes_cnt]; in sparx5_get_stats64()
1074 stats->rx_errors = portstats[spx5_stats_rx_in_range_len_err_cnt] + in sparx5_get_stats64()
1075 portstats[spx5_stats_pmac_rx_in_range_len_err_cnt] + in sparx5_get_stats64()
1076 portstats[spx5_stats_rx_out_of_range_len_err_cnt] + in sparx5_get_stats64()
1077 portstats[spx5_stats_pmac_rx_out_of_range_len_err_cnt] + in sparx5_get_stats64()
1078 portstats[spx5_stats_rx_oversize_cnt] + in sparx5_get_stats64()
1079 portstats[spx5_stats_pmac_rx_oversize_cnt] + in sparx5_get_stats64()
1080 portstats[spx5_stats_rx_crc_err_cnt] + in sparx5_get_stats64()
1081 portstats[spx5_stats_pmac_rx_crc_err_cnt] + in sparx5_get_stats64()
1082 portstats[spx5_stats_rx_alignment_lost_cnt] + in sparx5_get_stats64()
1083 portstats[spx5_stats_pmac_rx_alignment_lost_cnt]; in sparx5_get_stats64()
1084 stats->tx_errors = portstats[spx5_stats_tx_xcoll_cnt] + in sparx5_get_stats64()
1085 portstats[spx5_stats_tx_csense_cnt] + in sparx5_get_stats64()
1086 portstats[spx5_stats_tx_late_coll_cnt]; in sparx5_get_stats64()
1087 stats->multicast = portstats[spx5_stats_rx_mc_cnt] + in sparx5_get_stats64()
1088 portstats[spx5_stats_pmac_rx_mc_cnt]; in sparx5_get_stats64()
1089 stats->collisions = portstats[spx5_stats_tx_late_coll_cnt] + in sparx5_get_stats64()
1090 portstats[spx5_stats_tx_xcoll_cnt] + in sparx5_get_stats64()
1091 portstats[spx5_stats_tx_backoff1_cnt]; in sparx5_get_stats64()
1092 stats->rx_length_errors = portstats[spx5_stats_rx_in_range_len_err_cnt] + in sparx5_get_stats64()
1093 portstats[spx5_stats_pmac_rx_in_range_len_err_cnt] + in sparx5_get_stats64()
1094 portstats[spx5_stats_rx_out_of_range_len_err_cnt] + in sparx5_get_stats64()
1095 portstats[spx5_stats_pmac_rx_out_of_range_len_err_cnt] + in sparx5_get_stats64()
1096 portstats[spx5_stats_rx_oversize_cnt] + in sparx5_get_stats64()
1097 portstats[spx5_stats_pmac_rx_oversize_cnt]; in sparx5_get_stats64()
1098 stats->rx_crc_errors = portstats[spx5_stats_rx_crc_err_cnt] + in sparx5_get_stats64()
1099 portstats[spx5_stats_pmac_rx_crc_err_cnt]; in sparx5_get_stats64()
1100 stats->rx_frame_errors = portstats[spx5_stats_rx_alignment_lost_cnt] + in sparx5_get_stats64()
1101 portstats[spx5_stats_pmac_rx_alignment_lost_cnt]; in sparx5_get_stats64()
1102 stats->tx_aborted_errors = portstats[spx5_stats_tx_xcoll_cnt]; in sparx5_get_stats64()
1103 stats->tx_carrier_errors = portstats[spx5_stats_tx_csense_cnt]; in sparx5_get_stats64()
1104 stats->tx_window_errors = portstats[spx5_stats_tx_late_coll_cnt]; in sparx5_get_stats64()
1105 stats->rx_dropped = portstats[spx5_stats_ana_ac_port_stat_lsb_cnt]; in sparx5_get_stats64()
1107 stats->rx_dropped += portstats[spx5_stats_green_p0_rx_port_drop in sparx5_get_stats64()
1109 stats->tx_dropped = portstats[spx5_stats_tx_local_drop]; in sparx5_get_stats64()