From 18fc9b3096b02cdd8610537d8ad2e491e9bb9d0e Mon Sep 17 00:00:00 2001 From: ftillier Date: Wed, 2 Nov 2005 22:20:39 +0000 Subject: [PATCH] [VSTAT] Minor cleanup Signed-off-by: Yossi Leybovich (sleybo@mellanox.co.il) git-svn-id: svn://openib.tc.cornell.edu/gen1@139 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/tools/vstat/user/vstat_main.c | 72 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/trunk/tools/vstat/user/vstat_main.c b/trunk/tools/vstat/user/vstat_main.c index bbcb40f4..875aa8d6 100644 --- a/trunk/tools/vstat/user/vstat_main.c +++ b/trunk/tools/vstat/user/vstat_main.c @@ -139,10 +139,10 @@ void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){ if(fullPrint){ printf("\t\tmax_msg_sz=0x%x (Max message size)\n", portPtr->max_msg_size); printf("\t\tcapability_mask=TBD\n"); - printf("\t\tmax_vl_num=0x%x (Maximum number of VL supported by this port)\n", portPtr->max_vls); + printf("\t\tmax_vl_num=0x%x (Maximum number of VL supported by this port)\n", portPtr->max_vls); printf("\t\tbad_pkey_counter=0x%x (Bad PKey counter)\n", portPtr->pkey_ctr); printf("\t\tqkey_viol_counter=0x%x (QKey violation counter)\n", portPtr->qkey_ctr); - printf("\t\tsm_sl=0x%x (IB_SL to be used in communication with subnet manager)\n", portPtr->sm_sl); + printf("\t\tsm_sl=0x%x (IB_SL to be used in communication with subnet manager)\n", portPtr->sm_sl); printf("\t\tpkey_tbl_len=0x%x (Current size of pkey table)\n", portPtr->num_pkeys); printf("\t\tgid_tbl_len=0x%x (Current size of GID table)\n", portPtr->num_gids); printf("\t\tsubnet_timeout=0x%x (Subnet Timeout for this port (see PortInfo))\n", portPtr->subnet_timeout); @@ -155,53 +155,51 @@ void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){ -void vstat_print_ca_attr(ib_ca_attr_t* ca_attr, BOOLEAN fullPrint){ +void vstat_print_ca_attr(int idx, ib_ca_attr_t* ca_attr, BOOLEAN fullPrint){ int i; - printf("\thca_id=%s\n", ca_attr->dev_id==0x5a44?"InfiniHost0":"TBD"); //TODO: all HCAs and hadle multi HCAs - printf("\tpci_location={BUS=TBD,DEV/FUNC=TBD}\n"); + printf("\thca_idx=%d\n",idx); + printf("\tpci_location={BUS=NA,DEV/FUNC=NA}\n"); printf("\tvendor_id=0x%04x\n", ca_attr->vend_id); printf("\tvendor_part_id=0x%04x\n", ca_attr->dev_id); printf("\thw_ver=0x%x\n", ca_attr->revision); //TODO: ??? - printf("\tfw_ver=TBD\n"); - printf("\tPSID=TBD\n"); + printf("\tfw_ver=NA\n"); + printf("\tPSID=NA\n"); if(fullPrint){ - printf("\tnum_phys_ports = TBD\n"); + printf("\tnum_phys_ports = %d\n",ca_attr->num_ports); printf("\tmax_num_qp = 0x%x (Maximum Number of QPs supported)\n", ca_attr->max_qps); - printf("\tmax_qp_ous_wr = 0x%x (Maximum Number of oustanding WR on any WQ)\n", ca_attr->max_wrs); - printf("\tflags== TBD\n"); + printf("\tmax_qp_ous_wr = 0x%x (Maximum Number of oustanding WR on any WQ)\n", ca_attr->max_wrs); printf("\tmax_num_sg_ent = 0x%x (Max num of scatter/gather entries for WQE other than RD)\n", ca_attr->max_sges); - printf("\tmax_num_sg_ent_rd = 0x%x (Max num of scatter/gather entries for RD WQE)\n", ca_attr->max_rd_sges); - printf("\tmax_num_srq = TBD (Maximum Number of SRQs supported)\n"); - printf("\tmax_wqe_per_srq = TBD (Maximum Number of oustanding WR on any SRQ)\n"); - printf("\tmax_srq_sentries = TBD (Maximum Number of scatter entries for SRQ WQE)\n"); - printf("\tsrq_resize_supported = TBD (SRQ resize supported)\n"); - printf("\tmax_num_cq = 0x%x (Max num of supported CQs)\n", ca_attr->max_cqs); + printf("\tmax_num_sg_ent_rd = 0x%x (Max num of scatter/gather entries for RD WQE)\n", ca_attr->max_rd_sges); + printf("\tmax_num_srq = 0 (Maximum Number of SRQs supported)\n"); + printf("\tmax_wqe_per_srq = 0 (Maximum Number of oustanding WR on any SRQ)\n"); + printf("\tmax_srq_sentries = 0 (Maximum Number of scatter entries for SRQ WQE)\n"); + printf("\tsrq_resize_supported = 0 (SRQ resize supported)\n"); + printf("\tmax_num_cq = 0x%x (Max num of supported CQs)\n", ca_attr->max_cqs); printf("\tmax_num_ent_cq = 0x%x (Max num of supported entries per CQ)\n", ca_attr->max_cqes); - printf("\tmax_num_mr = 0x%x (Maximum number of memory region supported)\n", ca_attr->init_regions); + printf("\tmax_num_mr = 0x%x (Maximum number of memory region supported)\n", ca_attr->init_regions); printf("\tmax_mr_size = 0x%x (Largest contigous block of memory region in bytes)\n", ca_attr->init_region_size); - printf("\tmax_pd_num = 0x%x (Maximum number of protection domains supported)\n", ca_attr->max_pds); - printf("\tpage_size_cap = TBD (Largest page size supported by this HCA)\n"); - printf("\tmax_pkeys = TBD (Maximum number of partitions supported)\n"); + printf("\tmax_pd_num = 0x%x (Maximum number of protection domains supported)\n", ca_attr->max_pds); + printf("\tpage_size_cap = 0x%x (Largest page size supported by this HCA)\n",ca_attr->p_page_size[ca_attr->num_page_sizes-1]); printGUID(ca_attr->ca_guid); - printf("\tlocal_ca_ack_delay = 0x%x (Log2 4.096usec Max. RX to ACK or NAK delay)\n", ca_attr->local_ack_delay); - printf("\tmax_qp_ous_rd_atom = TBD (Maximum number of oust. RDMA read/atomic as target)\n"); - printf("\tmax_ee_ous_rd_atom = TBD (EE Maximum number of outs. RDMA read/atomic as target)\n"); - printf("\tmax_res_rd_atom = TBD (Max. Num. of resources used for RDMA read/atomic as target)\n"); - printf("\tmax_qp_init_rd_atom = TBD (Max. Num. of outs. RDMA read/atomic as initiator)\n"); - printf("\tmax_ee_init_rd_atom = TBD (EE Max. Num. of outs. RDMA read/atomic as initiator)\n"); - printf("\tatomic_cap = TBD (Level of Atomicity supported)\n"); + printf("\tlocal_ca_ack_delay = 0x%x (Log2 4.096usec Max. RX to ACK or NAK delay)\n", ca_attr->local_ack_delay); + printf("\tmax_qp_ous_rd_atom = 0x%x (Maximum number of oust. RDMA read/atomic as target)\n",ca_attr->max_qp_resp_res); + printf("\tmax_ee_ous_rd_atom = 0 (EE Maximum number of outs. RDMA read/atomic as target)\n"); + printf("\tmax_res_rd_atom = 0x%x (Max. Num. of resources used for RDMA read/atomic as target)\n",ca_attr->max_resp_res); + printf("\tmax_qp_init_rd_atom = 0x%x (Max. Num. of outs. RDMA read/atomic as initiator)\n",ca_attr->max_qp_init_depth); + printf("\tmax_ee_init_rd_atom = 0 (EE Max. Num. of outs. RDMA read/atomic as initiator)\n"); + printf("\tatomic_cap = %s (Level of Atomicity supported)\n",ca_attr->atomicity == IB_ATOMIC_GLOBAL?"GLOBAL": + ca_attr->atomicity == IB_ATOMIC_LOCAL?"LOCAL":"NORMAL"); printf("\tmax_ee_num = 0x0 (Maximum number of EEC supported)\n"); printf("\tmax_rdd_num = 0x0 (Maximum number of IB_RDD supported)\n"); - printf("\tmax_mw_num = 0x%x (Maximum Number of memory windows supported)\n", ca_attr->init_windows); - printf("\tmax_raw_ipv6_qp = 0x%x (Maximum number of Raw IPV6 QPs supported)\n", ca_attr->max_ipv6_qps); - printf("\tmax_raw_ethy_qp = 0x%x (Maximum number of Raw Ethertypes QPs supported)\n", ca_attr->max_ether_qps); + printf("\tmax_mw_num = 0x%x (Maximum Number of memory windows supported)\n", ca_attr->init_windows); + printf("\tmax_raw_ipv6_qp = 0x%x (Maximum number of Raw IPV6 QPs supported)\n", ca_attr->max_ipv6_qps); + printf("\tmax_raw_ethy_qp = 0x%x (Maximum number of Raw Ethertypes QPs supported)\n", ca_attr->max_ether_qps); printf("\tmax_mcast_grp_num = 0x%x (Maximum Number of multicast groups)\n", ca_attr->max_mcast_grps); - printf("\tmax_mcast_qp_attach_num = 0x%x(Maximum number of QP per multicast group)\n", ca_attr->max_qps_per_mcast_grp); - printf("\tmax_total_mcast_qp_attach_num = 0x%x(Maximum number of QPs which can be attached to a mcast grp)\n", ca_attr->max_mcast_qps); - printf("\tmax_ah_num = 0x%x (Maximum number of address handles)\n", ca_attr->max_addr_handles); - printf("\tmax_num_fmr = TBD (maximum number FMRs)\n"); - printf("\tmax_num_map_per_fmr = TBD (Maximum number of (re)maps per FMR before an unmap operation in required)\n"); + printf("\tmax_mcast_qp_attach_num = 0x%x (Maximum number of QP per multicast group)\n", ca_attr->max_qps_per_mcast_grp); + printf("\tmax_ah_num = 0x%x (Maximum number of address handles)\n", ca_attr->max_addr_handles); + printf("\tmax_num_fmr = 0 (Maximum number FMRs)\n"); + printf("\tmax_num_map_per_fmr = 0 (Maximum number of (re)maps per FMR before an unmap operation in required)\n"); }else{ printf("\tnum_phys_ports=%d\n", ca_attr->num_ports); } @@ -225,7 +223,7 @@ vstat_ca_attr( size_t guid_count; ib_net64_t *ca_guid_array; ib_ca_attr_t *vstat_ca_attr; - uintn_t i; + size_t i; ib_ca_handle_t h_ca = NULL; uint32_t bsize; ib_port_attr_mod_t port_attr_mod; @@ -338,7 +336,7 @@ vstat_ca_attr( /* Print_ca_attributes */ - vstat_print_ca_attr(vstat_ca_attr, fullPrint); + vstat_print_ca_attr((int)i,vstat_ca_attr, fullPrint); /* Free the memory */ -- 2.41.0