mirror of
https://github.com/ceph/ceph
synced 2025-01-11 05:29:51 +00:00
msg/async/rdma: limit buffer size under rdma max memory region size
The allocated buf size should be under hardware's max_mr_size. Or it'll trigger out-of-bound access problem when calling ibv_reg_mr. Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
This commit is contained in:
parent
9c7ba67cc7
commit
4f5a31ab9d
@ -785,7 +785,8 @@ Infiniband::MemoryManager::MemoryManager(CephContext *c, Device *d, ProtectionDo
|
||||
(c->_conf->ms_async_rdma_receive_buffers < 2 * c->_conf->ms_async_rdma_receive_queue_len ?
|
||||
c->_conf->ms_async_rdma_receive_buffers : 2 * c->_conf->ms_async_rdma_receive_queue_len) :
|
||||
// rx pool is infinite, we can set any initial size that we want
|
||||
2 * c->_conf->ms_async_rdma_receive_queue_len)
|
||||
2 * c->_conf->ms_async_rdma_receive_queue_len,
|
||||
device->device_attr.max_mr_size / (sizeof(Chunk) + cct->_conf->ms_async_rdma_buffer_size))
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user