Lines Matching +full:1 +full:- +full:port
2 * Copyright (c) 2004-2009 Voltaire Inc. All rights reserved.
17 * - Redistributions of source code must retain the above
21 * - Redistributions in binary form must reproduce the above
253 printf("# Port counters: %s port %d (CapMask: 0x%02X)\n%s", in output_aggregate_perfcounters()
386 printf("# Port extended counters: %s port %d (CapMask: 0x%02X CapMask2: 0x%07X)\n%s", in output_aggregate_perfcounters_ext()
392 int port, int aggregate) in dump_perfcounters() argument
396 if (extended != 1) { in dump_perfcounters()
398 if (!pma_query_via(pc, portid, port, timeout, in dump_perfcounters()
417 (cap_mask & IB_PM_PC_XMIT_WAIT_SUP)?IB_PC_LAST_F:(IB_PC_RCV_PKTS_F+1)); in dump_perfcounters()
431 if (!pma_query_via(pc, portid, port, timeout, in dump_perfcounters()
443 printf("# Port extended counters: %s port %d " in dump_perfcounters()
445 portid2str(portid), port, ntohs(cap_mask), in dump_perfcounters()
448 printf("# Port counters: %s port %d " in dump_perfcounters()
450 portid2str(portid), port, ntohs(cap_mask), buf); in dump_perfcounters()
455 ib_portid_t * portid, int port) in reset_counters() argument
458 if (extended != 1) { in reset_counters()
459 if (!performance_reset_via(pc, portid, port, mask, timeout, in reset_counters()
463 if (!performance_reset_via(pc, portid, port, mask, timeout, in reset_counters()
469 static int reset, reset_only, all_ports, loop_ports, port, extended, xmt_sl, variable
491 printf("# %s counters: %s port %d\n%s", name, in common_func()
496 if (reset && !performance_reset_via(pc, portid, port, mask, ibd_timeout, in common_func()
501 static void xmt_sl_query(ib_portid_t * portid, int port, int mask) in xmt_sl_query() argument
503 common_func(portid, port, mask, !reset_only, (reset_only || reset), in xmt_sl_query()
508 static void rcv_sl_query(ib_portid_t * portid, int port, int mask) in rcv_sl_query() argument
510 common_func(portid, port, mask, !reset_only, (reset_only || reset), in rcv_sl_query()
515 static void xmt_disc_query(ib_portid_t * portid, int port, int mask) in xmt_disc_query() argument
517 common_func(portid, port, mask, !reset_only, (reset_only || reset), in xmt_disc_query()
522 static void rcv_err_query(ib_portid_t * portid, int port, int mask) in rcv_err_query() argument
524 common_func(portid, port, mask, !reset_only, (reset_only || reset), in rcv_err_query()
530 int port, uint64_t mask, unsigned timeout, in ext_speeds_reset_via() argument
534 int lid = dest->lid; in ext_speeds_reset_via()
536 DEBUG("lid %u port %d mask 0x%" PRIx64, lid, port, mask); in ext_speeds_reset_via()
538 if (lid == -1) { in ext_speeds_reset_via()
552 mad_set_field(rcvbuf, 0, IB_PESC_PORT_SELECT_F, port); in ext_speeds_reset_via()
558 if (!dest->qp) in ext_speeds_reset_via()
559 dest->qp = 1; in ext_speeds_reset_via()
560 if (!dest->qkey) in ext_speeds_reset_via()
561 dest->qkey = IB_DEFAULT_QP1_QKEY; in ext_speeds_reset_via()
566 static uint8_t is_rsfec_mode_active(ib_portid_t * portid, int port, in is_rsfec_mode_active() argument
573 if (!is_port_info_extended_supported(portid, port, srcport)) { in is_rsfec_mode_active()
574 IBWARN("Port Info Extended not supported"); in is_rsfec_mode_active()
578 if (!smp_query_via(data, portid, IB_ATTR_PORT_INFO_EXT, port, 0, in is_rsfec_mode_active()
588 return 1; in is_rsfec_mode_active()
594 static void extended_speeds_query(ib_portid_t * portid, int port, in extended_speeds_query() argument
600 if (is_rsfec_mode_active(portid, port, cap_mask)) in extended_speeds_query()
601 common_func(portid, port, mask, 1, 0, in extended_speeds_query()
602 "PortExtendedSpeedsCounters with RS-FEC Active", in extended_speeds_query()
606 common_func(portid, port, mask, 1, 0, in extended_speeds_query()
613 !ext_speeds_reset_via(pc, portid, port, ext_mask, ibd_timeout, srcport)) in extended_speeds_query()
617 static void oprcvcounters_query(ib_portid_t * portid, int port, int mask) in oprcvcounters_query() argument
619 common_func(portid, port, mask, !reset_only, (reset_only || reset), in oprcvcounters_query()
624 static void flowctlcounters_query(ib_portid_t * portid, int port, int mask) in flowctlcounters_query() argument
626 common_func(portid, port, mask, !reset_only, (reset_only || reset), in flowctlcounters_query()
631 static void vloppackets_query(ib_portid_t * portid, int port, int mask) in vloppackets_query() argument
633 common_func(portid, port, mask, !reset_only, (reset_only || reset), in vloppackets_query()
638 static void vlopdata_query(ib_portid_t * portid, int port, int mask) in vlopdata_query() argument
640 common_func(portid, port, mask, !reset_only, (reset_only || reset), in vlopdata_query()
645 static void vlxmitflowctlerrors_query(ib_portid_t * portid, int port, int mask) in vlxmitflowctlerrors_query() argument
647 common_func(portid, port, mask, !reset_only, (reset_only || reset), in vlxmitflowctlerrors_query()
652 static void vlxmitcounters_query(ib_portid_t * portid, int port, int mask) in vlxmitcounters_query() argument
654 common_func(portid, port, mask, !reset_only, (reset_only || reset), in vlxmitcounters_query()
659 static void swportvlcong_query(ib_portid_t * portid, int port, int mask) in swportvlcong_query() argument
661 common_func(portid, port, mask, !reset_only, (reset_only || reset), in swportvlcong_query()
666 static void rcvcc_query(ib_portid_t * portid, int port, int mask) in rcvcc_query() argument
668 common_func(portid, port, mask, !reset_only, (reset_only || reset), in rcvcc_query()
673 static void slrcvfecn_query(ib_portid_t * portid, int port, int mask) in slrcvfecn_query() argument
675 common_func(portid, port, mask, !reset_only, (reset_only || reset), in slrcvfecn_query()
680 static void slrcvbecn_query(ib_portid_t * portid, int port, int mask) in slrcvbecn_query() argument
682 common_func(portid, port, mask, !reset_only, (reset_only || reset), in slrcvbecn_query()
687 static void xmitcc_query(ib_portid_t * portid, int port, int mask) in xmitcc_query() argument
689 common_func(portid, port, mask, !reset_only, (reset_only || reset), in xmitcc_query()
694 static void vlxmittimecc_query(ib_portid_t * portid, int port, int mask) in vlxmittimecc_query() argument
696 common_func(portid, port, mask, !reset_only, (reset_only || reset), in vlxmittimecc_query()
701 void dump_portsamples_control(ib_portid_t * portid, int port) in dump_portsamples_control() argument
706 if (!pma_query_via(pc, portid, port, ibd_timeout, in dump_portsamples_control()
711 printf("# PortSamplesControl: %s port %d\n%s", portid2str(portid), in dump_portsamples_control()
712 port, buf); in dump_portsamples_control()
719 extended = 1; in process_opt()
722 xmt_sl = 1; in process_opt()
725 rcv_sl = 1; in process_opt()
728 xmt_disc = 1; in process_opt()
731 rcv_err = 1; in process_opt()
734 extended_speeds = 1; in process_opt()
737 smpl_ctl = 1; in process_opt()
739 case 1: in process_opt()
740 oprcvcounters = 1; in process_opt()
743 flowctlcounters = 1; in process_opt()
746 vloppackets = 1; in process_opt()
749 vlopdata = 1; in process_opt()
752 vlxmitflowctlerrors = 1; in process_opt()
755 vlxmitcounters = 1; in process_opt()
758 swportvlcong = 1; in process_opt()
761 rcvcc = 1; in process_opt()
764 slrcvfecn = 1; in process_opt()
767 slrcvbecn = 1; in process_opt()
770 xmitcc = 1; in process_opt()
773 vlxmittimecc = 1; in process_opt()
777 port = ALL_PORTS; in process_opt()
792 return 1; in process_opt()
794 with_grh = 1; in process_opt()
797 return -1; in process_opt()
813 int start_port = 1; in main()
819 {"extended", 'x', 0, NULL, "show extended port counters"}, in main()
820 {"xmtsl", 'X', 0, NULL, "show Xmt SL port counters"}, in main()
821 {"rcvsl", 'S', 0, NULL, "show Rcv SL port counters"}, in main()
824 {"extended_speeds", 'T', 0, NULL, "show port extended speeds counters"}, in main()
825 {"oprcvcounters", 1, 0, NULL, "show Rcv Counters per Op code"}, in main()
831 {"swportvlcong", 7, 0, NULL, "show sw port VL congestion"}, in main()
839 {"loop_ports", 'l', 0, NULL, "iterate through each port"}, in main()
842 {"dgid", 25, 1, NULL, "remote gid (IPv6 format)"}, in main()
845 char usage_args[] = " [<lid|guid> [[port(s)] [reset_mask]]]"; in main()
847 "\t\t# read local port's performance counters", in main()
848 "32 1\t\t# read performance counters from lid 32, port 1", in main()
849 "-x 32 1\t# read extended performance counters from lid 32, port 1", in main()
850 "-a 32\t\t# read performance counters from lid 32, all ports", in main()
851 "-r 32 1\t# read performance counters and reset", in main()
852 "-x -r 32 1\t# read extended performance counters and reset", in main()
853 "-R 0x20 1\t# reset performance counters of port 1 only", in main()
854 "-x -R 0x20 1\t# reset extended performance counters of port 1 only", in main()
855 "-R -a 32\t# reset performance counters of all ports", in main()
856 "-R 32 2 0x0fff\t# reset only error counters of port 2", in main()
857 "-R 32 2 0xf000\t# reset only non-error counters of port 2", in main()
858 "-a 32 1-10\t# read performance counters from lid 32, port 1-10, aggregate output", in main()
859 "-l 32 1-10\t# read performance counters from lid 32, port 1-10, output each port", in main()
860 "-a 32 1,4,8\t# read performance counters from lid 32, port 1, 4, and 8, aggregate output", in main()
861 "-l 32 1,4,8\t# read performance counters from lid 32, port 1, 4, and 8, output each port", in main()
868 argc -= optind; in main()
871 if (argc > 1) { in main()
872 if (strchr(argv[1], ',')) { in main()
873 tmpstr = strtok(argv[1], ","); in main()
878 port = ports[0]; in main()
880 else if ((tmpstr = strchr(argv[1], '-'))) { in main()
886 pmin = strtoul(argv[1], 0, 0); in main()
890 IBEXIT("max port must be greater than min port in range"); in main()
895 port = ports[0]; in main()
898 port = strtoul(argv[1], 0, 0); in main()
907 IBEXIT("Failed to open '%s' port '%d'", ibd_ca, ibd_ca_port); in main()
916 IBEXIT("can't resolve destination port %s", argv[0]); in main()
918 portid.grh_present = 1; in main()
922 if (resolve_self(ibd_ca, ibd_ca_port, &portid, &port, 0) < 0) in main()
923 IBEXIT("can't resolve self port %s", argv[0]); in main()
928 if (!pma_query_via(pc, &portid, port, ibd_timeout, CLASS_PORT_INFO, in main()
937 if (!all_ports && port == ALL_PORTS) in main()
939 if (all_ports && port == ALL_PORTS) in main()
940 all_ports_loop = 1; in main()
944 xmt_sl_query(&portid, port, mask); in main()
949 rcv_sl_query(&portid, port, mask); in main()
954 xmt_disc_query(&portid, port, mask); in main()
959 rcv_err_query(&portid, port, mask); in main()
964 extended_speeds_query(&portid, port, ext_mask, cap_mask); in main()
969 oprcvcounters_query(&portid, port, mask); in main()
974 flowctlcounters_query(&portid, port, mask); in main()
979 vloppackets_query(&portid, port, mask); in main()
984 vlopdata_query(&portid, port, mask); in main()
989 vlxmitflowctlerrors_query(&portid, port, mask); in main()
994 vlxmitcounters_query(&portid, port, mask); in main()
999 swportvlcong_query(&portid, port, mask); in main()
1004 rcvcc_query(&portid, port, mask); in main()
1009 slrcvfecn_query(&portid, port, mask); in main()
1014 slrcvbecn_query(&portid, port, mask); in main()
1019 xmitcc_query(&portid, port, mask); in main()
1024 vlxmittimecc_query(&portid, port, mask); in main()
1029 dump_portsamples_control(&portid, port); in main()
1034 if (all_ports_loop || (loop_ports && (all_ports || port == ALL_PORTS))) { in main()
1060 if (all_ports_loop || (loop_ports && (all_ports || port == ALL_PORTS))) { in main()
1067 if (extended != 1) in main()
1074 } else if (ports_count > 1) { in main()
1080 if (extended != 1) in main()
1089 &portid, port, 0); in main()
1097 mask |= (1 << 16); /* reset portxmitwait */ in main()
1099 mask |= (1 << 17); /* reset qp1dropped */ in main()
1105 mask |= (1 << 28); in main()
1107 mask |= (1 << 29); in main()
1110 if (all_ports_loop || (loop_ports && (all_ports || port == ALL_PORTS))) { in main()
1113 } else if (ports_count > 1) { in main()
1117 reset_counters(extended, ibd_timeout, mask, &portid, port); in main()