aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2016-05-24 15:50:40 -0400
committerDoug Ledford <dledford@redhat.com>2016-05-26 12:21:10 -0400
commit8b103e9cdee5f381bc20a8a9f9bb5be11de8e68f (patch)
treed03f73e33c1ea5cfc9befbd34dd39a244a0da3d7 /include/rdma
parent4c0b653335bbdfe62a5f4483c98cb5d581432917 (diff)
IB/rdamvt: Fix rdmavt s_ack_queue sizing
rdmavt allows the driver to specify the size of the ack queue, but only uses it for the modify QP limit testing for setting the atomic limit value. The driver dependent size is now used to size the s_ack_queue ring dynamicially. Since the driver knows its size, the driver will use its define for any ring size dependent code. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/rdma_vt.h9
-rw-r--r--include/rdma/rdmavt_qp.h5
2 files changed, 10 insertions, 4 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index 3f12da9384a1..16274e2133cd 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -426,6 +426,15 @@ static inline unsigned rvt_get_npkeys(struct rvt_dev_info *rdi)
426} 426}
427 427
428/* 428/*
429 * Return the max atomic suitable for determining
430 * the size of the ack ring buffer in a QP.
431 */
432static inline unsigned int rvt_max_atomic(struct rvt_dev_info *rdi)
433{
434 return rdi->dparms.max_rdma_atomic + 1;
435}
436
437/*
429 * Return the indexed PKEY from the port PKEY table. 438 * Return the indexed PKEY from the port PKEY table.
430 */ 439 */
431static inline u16 rvt_get_pkey(struct rvt_dev_info *rdi, 440static inline u16 rvt_get_pkey(struct rvt_dev_info *rdi,
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
index 0e1ff2abfe92..6d23b879416a 100644
--- a/include/rdma/rdmavt_qp.h
+++ b/include/rdma/rdmavt_qp.h
@@ -211,8 +211,6 @@ struct rvt_mmap_info {
211 unsigned size; 211 unsigned size;
212}; 212};
213 213
214#define RVT_MAX_RDMA_ATOMIC 16
215
216/* 214/*
217 * This structure holds the information that the send tasklet needs 215 * This structure holds the information that the send tasklet needs
218 * to send a RDMA read response or atomic operation. 216 * to send a RDMA read response or atomic operation.
@@ -282,8 +280,7 @@ struct rvt_qp {
282 atomic_t refcount ____cacheline_aligned_in_smp; 280 atomic_t refcount ____cacheline_aligned_in_smp;
283 wait_queue_head_t wait; 281 wait_queue_head_t wait;
284 282
285 struct rvt_ack_entry s_ack_queue[RVT_MAX_RDMA_ATOMIC + 1] 283 struct rvt_ack_entry *s_ack_queue;
286 ____cacheline_aligned_in_smp;
287 struct rvt_sge_state s_rdma_read_sge; 284 struct rvt_sge_state s_rdma_read_sge;
288 285
289 spinlock_t r_lock ____cacheline_aligned_in_smp; /* used for APM */ 286 spinlock_t r_lock ____cacheline_aligned_in_smp; /* used for APM */