Skip to content

Commit

Permalink
Merge pull request ceph#12263 from Adirl/fix_max_buffers
Browse files Browse the repository at this point in the history
msg/async/rdma: don't use more buffers than what device capabilities …

Reviewed-by: Haomai Wang <[email protected]>
  • Loading branch information
yuyuyu101 authored Dec 2, 2016
2 parents 1515bd0 + dc5a8df commit d2f8fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/msg/async/rdma/Infiniband.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ Infiniband::Infiniband(CephContext *cct, const std::string &device_name, uint8_t
assert(NetHandler(cct).set_nonblock(device->ctxt->async_fd) == 0);

max_recv_wr = device->device_attr->max_srq_wr;
if (max_recv_wr < cct->_conf->ms_async_rdma_receive_buffers) {
if (max_recv_wr > cct->_conf->ms_async_rdma_receive_buffers) {
ldout(cct, 0) << __func__ << " max allowed receive buffers is " << max_recv_wr << " use this instead." << dendl;
max_recv_wr = cct->_conf->ms_async_rdma_receive_buffers;
}
max_send_wr = device->device_attr->max_qp_wr;
if (max_send_wr < cct->_conf->ms_async_rdma_send_buffers) {
if (max_send_wr > cct->_conf->ms_async_rdma_send_buffers) {
ldout(cct, 0) << __func__ << " max allowed send buffers is " << max_send_wr << " use this instead." << dendl;
max_send_wr = cct->_conf->ms_async_rdma_send_buffers;
}
Expand Down

0 comments on commit d2f8fb4

Please sign in to comment.