diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2016-05-24 12:50:40 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-05-26 12:21:10 -0400 |
commit | 8b103e9cdee5f381bc20a8a9f9bb5be11de8e68f (patch) | |
tree | d03f73e33c1ea5cfc9befbd34dd39a244a0da3d7 /include/rdma/rdma_vt.h | |
parent | 4c0b653335bbdfe62a5f4483c98cb5d581432917 (diff) | |
download | op-kernel-dev-8b103e9cdee5f381bc20a8a9f9bb5be11de8e68f.zip op-kernel-dev-8b103e9cdee5f381bc20a8a9f9bb5be11de8e68f.tar.gz |
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/rdma_vt.h')
-rw-r--r-- | include/rdma/rdma_vt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 3f12da9..16274e2 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) } /* + * Return the max atomic suitable for determining + * the size of the ack ring buffer in a QP. + */ +static inline unsigned int rvt_max_atomic(struct rvt_dev_info *rdi) +{ + return rdi->dparms.max_rdma_atomic + 1; +} + +/* * Return the indexed PKEY from the port PKEY table. */ static inline u16 rvt_get_pkey(struct rvt_dev_info *rdi, |