From 6903e76aa07ac5474e91e560fd28e6b48969d750 Mon Sep 17 00:00:00 2001 From: leonidk Date: Mon, 21 Jul 2008 10:26:12 +0000 Subject: [PATCH] [HW, TOOLS] fixed a bug, causing incorrect value of max_addr_handles in query_ca. [MLNX: 2790] It is relevant only for Tavor, but the changes influence all drivers and modify ABI, so the AL_IOCTL_VERSION has been increased. git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1422 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- core/al/al_dev.h | 2 +- hw/mlx4/kernel/bus/inc/ib_verbs.h | 2 +- hw/mthca/kernel/ib_verbs.h | 2 +- hw/mthca/kernel/mthca_cmd.c | 2 +- hw/mthca/kernel/mthca_cmd.h | 2 +- hw/mthca/kernel/mthca_dev.h | 2 +- hw/mthca/user/mlnx_uvp_verbs.h | 2 +- inc/iba/ib_types.h | 2 +- tools/vstat/user/vstat_main.c | 2 +- ulp/opensm/user/include/iba/ib_types.h | 2 +- ulp/opensm/user/include/iba/ib_types_extended.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/al/al_dev.h b/core/al/al_dev.h index 1b9c9c8d..994dbf63 100644 --- a/core/al/al_dev.h +++ b/core/al/al_dev.h @@ -55,7 +55,7 @@ #define AL_DEVICE_NAME L"\\Device\\ibal" #define ALDEV_KEY (0x3B) /* Matches FILE_DEVICE_INFINIBAND from wdm.h */ -#define AL_IOCTL_VERSION (9) +#define AL_IOCTL_VERSION (10) /* max number of devices with non-default pkey */ #define MAX_NUM_PKEY 16 diff --git a/hw/mlx4/kernel/bus/inc/ib_verbs.h b/hw/mlx4/kernel/bus/inc/ib_verbs.h index 321ff91d..a75e5823 100644 --- a/hw/mlx4/kernel/bus/inc/ib_verbs.h +++ b/hw/mlx4/kernel/bus/inc/ib_verbs.h @@ -127,7 +127,7 @@ struct ib_device_attr { int max_mcast_grp; int max_mcast_qp_attach; int max_total_mcast_qp_attach; - int max_ah; + u64 max_ah; int max_fmr; int max_map_per_fmr; int max_srq; diff --git a/hw/mthca/kernel/ib_verbs.h b/hw/mthca/kernel/ib_verbs.h index ff02dedf..980bb702 100644 --- a/hw/mthca/kernel/ib_verbs.h +++ b/hw/mthca/kernel/ib_verbs.h @@ -106,7 +106,7 @@ struct ib_device_attr { int max_mcast_grp; int max_mcast_qp_attach; int max_total_mcast_qp_attach; - int max_ah; + u64 max_ah; int max_fmr; int max_map_per_fmr; int max_srq; diff --git a/hw/mthca/kernel/mthca_cmd.c b/hw/mthca/kernel/mthca_cmd.c index 2ea169d4..81b3e977 100644 --- a/hw/mthca/kernel/mthca_cmd.c +++ b/hw/mthca/kernel/mthca_cmd.c @@ -1117,7 +1117,7 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev, MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_SZ_OFFSET); dev_lim->max_qp_sz = (1 << field) - 1; MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_AV_OFFSET); - dev_lim->hca.tavor.max_avs = 1 << (field & 0x3f); + dev_lim->hca.tavor.max_avs = 1I64 << (field & 0x3f); dev_lim->mpt_entry_sz = MTHCA_MPT_ENTRY_SIZE; } diff --git a/hw/mthca/kernel/mthca_cmd.h b/hw/mthca/kernel/mthca_cmd.h index fdeef839..00aedd6b 100644 --- a/hw/mthca/kernel/mthca_cmd.h +++ b/hw/mthca/kernel/mthca_cmd.h @@ -170,7 +170,7 @@ struct mthca_dev_lim { int mpt_entry_sz; union { struct { - int max_avs; + u64 max_avs; } tavor; struct { int resize_srq; diff --git a/hw/mthca/kernel/mthca_dev.h b/hw/mthca/kernel/mthca_dev.h index 7e6f12f0..ea7715ad 100644 --- a/hw/mthca/kernel/mthca_dev.h +++ b/hw/mthca/kernel/mthca_dev.h @@ -166,7 +166,7 @@ struct mthca_limits { u32 page_size_cap; u32 flags; u8 port_width_cap; - u32 num_avs; + u64 num_avs; }; struct mthca_alloc { diff --git a/hw/mthca/user/mlnx_uvp_verbs.h b/hw/mthca/user/mlnx_uvp_verbs.h index 5ea2dabb..613b15e9 100644 --- a/hw/mthca/user/mlnx_uvp_verbs.h +++ b/hw/mthca/user/mlnx_uvp_verbs.h @@ -120,7 +120,7 @@ struct ibv_device_attr { int max_mcast_grp; int max_mcast_qp_attach; int max_total_mcast_qp_attach; - int max_ah; + uint64_t max_ah; int max_fmr; int max_map_per_fmr; int max_srq; diff --git a/inc/iba/ib_types.h b/inc/iba/ib_types.h index 72ea8506..8d64c7b8 100644 --- a/inc/iba/ib_types.h +++ b/inc/iba/ib_types.h @@ -9209,7 +9209,7 @@ typedef struct _ib_ca_attr uint64_t init_region_size; uint32_t init_windows; - uint32_t max_addr_handles; + uint64_t max_addr_handles; uint32_t max_partitions; diff --git a/tools/vstat/user/vstat_main.c b/tools/vstat/user/vstat_main.c index b893a667..3cbcb9c8 100644 --- a/tools/vstat/user/vstat_main.c +++ b/tools/vstat/user/vstat_main.c @@ -375,7 +375,7 @@ void vstat_print_ca_attr(int idx, ib_ca_attr_t* ca_attr, ib_port_info_t* vstat_ 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_ah_num = 0x%x (Maximum number of address handles)\n", ca_attr->max_addr_handles); + printf("\tmax_ah_num = 0x%I64x (Maximum number of address handles)\n", ca_attr->max_addr_handles); printf("\tmax_num_fmr = 0x%x (Maximum number FMRs)\n", ca_attr->max_fmr); printf("\tmax_num_map_per_fmr = 0x%x (Maximum number of (re)maps per FMR before an unmap operation in required)\n", ca_attr->max_map_per_fmr); printf("\tmodify_wr_depth = %d (Capabilities: change QP depth during a modify QP)\n", !!ca_attr->modify_wr_depth); diff --git a/ulp/opensm/user/include/iba/ib_types.h b/ulp/opensm/user/include/iba/ib_types.h index e23c1ae7..a2570aeb 100644 --- a/ulp/opensm/user/include/iba/ib_types.h +++ b/ulp/opensm/user/include/iba/ib_types.h @@ -8446,7 +8446,7 @@ typedef struct _ib_ca_attr uint64_t init_region_size; uint32_t init_windows; - uint32_t max_addr_handles; + uint64_t max_addr_handles; uint32_t max_partitions; diff --git a/ulp/opensm/user/include/iba/ib_types_extended.h b/ulp/opensm/user/include/iba/ib_types_extended.h index 9a08bf29..f3af31ac 100644 --- a/ulp/opensm/user/include/iba/ib_types_extended.h +++ b/ulp/opensm/user/include/iba/ib_types_extended.h @@ -651,7 +651,7 @@ typedef struct _ib_ca_attr uint64_t init_region_size; uint32_t init_windows; - uint32_t max_addr_handles; + uint64_t max_addr_handles; uint32_t max_partitions; -- 2.17.1