diff options
author | Jack Morgenstein <jackm@mellanox.co.il> | 2005-10-10 16:48:07 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-17 18:20:29 -0400 |
commit | efaae8f71f3088cc73c9e5ceabbd314aa82ac768 (patch) | |
tree | b19084ae0a9dc6837cb2837cbd21386c9f1b2e0e /drivers/infiniband/hw/mthca/mthca_dev.h | |
parent | 4ab6fb7e5b3d34b65a1c3473d80d9d1a462d3a49 (diff) |
[IB] mthca: Better limit checking and reporting
Check the sizes of CQs, QPs and SRQs when creating objects, and fail
instead of creating too-big queues. Also return real limits instead
of just plausible-sounding values from mthca_query_device().
Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index 6e18c128af42..f106bac0f925 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h | |||
@@ -83,6 +83,8 @@ enum { | |||
83 | /* Arbel FW gives us these, but we need them for Tavor */ | 83 | /* Arbel FW gives us these, but we need them for Tavor */ |
84 | MTHCA_MPT_ENTRY_SIZE = 0x40, | 84 | MTHCA_MPT_ENTRY_SIZE = 0x40, |
85 | MTHCA_MTT_SEG_SIZE = 0x40, | 85 | MTHCA_MTT_SEG_SIZE = 0x40, |
86 | |||
87 | MTHCA_QP_PER_MGM = 4 * (MTHCA_MGM_ENTRY_SIZE / 16 - 2) | ||
86 | }; | 88 | }; |
87 | 89 | ||
88 | enum { | 90 | enum { |
@@ -128,12 +130,16 @@ struct mthca_limits { | |||
128 | int num_uars; | 130 | int num_uars; |
129 | int max_sg; | 131 | int max_sg; |
130 | int num_qps; | 132 | int num_qps; |
133 | int max_wqes; | ||
134 | int max_qp_init_rdma; | ||
131 | int reserved_qps; | 135 | int reserved_qps; |
132 | int num_srqs; | 136 | int num_srqs; |
137 | int max_srq_wqes; | ||
133 | int reserved_srqs; | 138 | int reserved_srqs; |
134 | int num_eecs; | 139 | int num_eecs; |
135 | int reserved_eecs; | 140 | int reserved_eecs; |
136 | int num_cqs; | 141 | int num_cqs; |
142 | int max_cqes; | ||
137 | int reserved_cqs; | 143 | int reserved_cqs; |
138 | int num_eqs; | 144 | int num_eqs; |
139 | int reserved_eqs; | 145 | int reserved_eqs; |