Lines Matching full:portid

373 static int query_and_dump(char *buf, size_t size, ib_portid_t * portid,  in query_and_dump()  argument
384 if (!pma_query_via(pc, portid, portnum, ibd_timeout, attr_id, in query_and_dump()
387 node_name, portid2str(portid), portnum); in query_and_dump()
403 static int print_results(ib_portid_t * portid, char *node_name, in print_results() argument
427 n += query_and_dump(str + n, sizeof(buf) - n, portid, in print_results()
435 n += query_and_dump(str + n, sizeof(buf) - n, portid, in print_results()
516 static int query_cap_mask(ib_portid_t * portid, char *node_name, int portnum, in query_cap_mask() argument
522 portid->sl = lid2sl_table[portid->lid]; in query_cap_mask()
525 if (!pma_query_via(pc, portid, portnum, ibd_timeout, CLASS_PORT_INFO, in query_cap_mask()
528 node_name, portid2str(portid), portnum); in query_cap_mask()
540 static int print_data_cnts(ib_portid_t * portid, uint16_t cap_mask, in print_data_cnts() argument
551 portid->sl = lid2sl_table[portid->lid]; in print_data_cnts()
554 if (!pma_query_via(pc, portid, portnum, ibd_timeout, in print_data_cnts()
557 node_name, portid2str(portid), portnum); in print_data_cnts()
567 if (!pma_query_via(pc, portid, portnum, ibd_timeout, in print_data_cnts()
570 node_name, portid2str(portid), portnum); in print_data_cnts()
611 static int print_errors(ib_portid_t * portid, uint16_t cap_mask, in print_errors() argument
622 portid->sl = lid2sl_table[portid->lid]; in print_errors()
624 if (!pma_query_via(pc, portid, portnum, ibd_timeout, in print_errors()
627 node_name, portid2str(portid), portnum); in print_errors()
633 if (!pma_query_via(pce, portid, portnum, ibd_timeout, in print_errors()
636 node_name, portid2str(portid), portnum); in print_errors()
648 return (print_results(portid, node_name, node, pc, portnum, in print_errors()
690 static void clear_port(ib_portid_t * portid, uint16_t cap_mask, in clear_port() argument
708 if (!performance_reset_via(pc, portid, port, mask, ibd_timeout, in clear_port()
715 performance_reset_via(pc, portid, port, 0xf, ibd_timeout, in clear_port()
719 performance_reset_via(pc, portid, port, 0x3f, ibd_timeout, in clear_port()
732 if (!reset_pc_ext(pc, portid, port, mask, ibd_timeout, in clear_port()
735 "%s port %d\n", node_name, portid2str(portid), in clear_port()
747 ib_portid_t portid = { 0 }; in print_node() local
772 ib_portid_set(&portid, node->smalid, 0, 0); in print_node()
777 ib_portid_set(&portid, in print_node()
785 if ((query_cap_mask(&portid, node_name, p, &cap_mask) == 0) && in print_node()
793 ib_portid_set(&portid, node->smalid, 0, 0); in print_node()
795 ib_portid_set(&portid, node->ports[p]->base_lid, in print_node()
798 print_data_cnts(&portid, cap_mask, node_name, node, p, in print_node()
802 clear_port(&portid, cap_mask, node_name, p); in print_node()
807 if (!print_errors(&portid, cap_mask, node_name, node, in print_node()
816 ib_portid_set(&portid, node->smalid, 0, 0); in print_node()
818 ib_portid_set(&portid, node->ports[p]->base_lid, in print_node()
821 print_errors(&portid, cap_mask, node_name, node, p, in print_node()
825 clear_port(&portid, cap_mask, node_name, p); in print_node()
833 clear_port(&portid, cap_mask, node_name, 0xFF); in print_node()
939 ib_portid_t portid = { 0 }; in main() local
1028 resolve_portid_str(ibd_ca, ibd_ca_port, &portid, dr_path, in main()
1034 resolve_portid_str(ibd_ca, ibd_ca_port, &portid, in main()
1040 lid2sl_table[portid.lid] = portid.sl; in main()
1056 &portid, &config))) in main()
1098 if (!smp_query_via(ni, &portid, IB_ATTR_NODE_INFO, 0, in main()