projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11b74cb
)
RDMA/rtrs-clt: Cap max_io_size
author
Jack Wang
<jinpu.wang@cloud.ionos.com>
Thu, 25 Mar 2021 15:33:05 +0000
(16:33 +0100)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Thu, 1 Apr 2021 18:59:46 +0000
(15:59 -0300)
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.com
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/rtrs/rtrs-clt.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 279d60a96dc9b2ce314c744c964dc173e0946748..64990df819375342459fd09a5985c942eba66f6f 100644
(file)
--- a/
drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/
drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@
-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;
}