提交 0633e237 编写于 作者: J Jack Wang 提交者: Jason Gunthorpe

RDMA/rtrs-clt: Cap max_io_size

Max io size is limited by both remote buffer size and the max fr pages per
mr.

Link: https://lore.kernel.org/r/20210325153308.1214057-20-gi-oh.kim@ionos.comSigned-off-by: NJack Wang <jinpu.wang@ionos.com>
Reviewed-by: NMd Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: NGioh Kim <gi-oh.kim@ionos.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
上级 11b74cbf
......@@ -2901,7 +2901,9 @@ int rtrs_clt_query(struct rtrs_clt *clt, struct rtrs_attrs *attr)
return -ECOMM;
attr->queue_depth = clt->queue_depth;
attr->max_io_size = clt->max_io_size;
/* Cap max_io_size to min of remote buffer size and the fr pages */
attr->max_io_size = min_t(int, clt->max_io_size,
clt->max_segments * SZ_4K);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册