[RHEL7,COMMIT] fs/fuse kio: always use memory registrations for iWarp RDMA reads

Submitted by Vasily Averin on Dec. 3, 2020, 12:32 p.m.

Details

Message ID 202012031232.0B3CWCHC011422@vz7build.vvs.sw.ru
State New
Series "fs/fuse kio: always use memory registrations for iWarp RDMA reads"
Headers show

Commit Message

Vasily Averin Dec. 3, 2020, 12:32 p.m.
The commit is pushed to "branch-rh7-3.10.0-1160.6.1.vz7.171.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.6.1.vz7.171.2
------>
commit 91e15c2568717fe5f9b75c2baea7be883958ab2e
Author: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
Date:   Thu Dec 3 15:32:12 2020 +0300

    fs/fuse kio: always use memory registrations for iWarp RDMA reads
    
    Currently iWarp devices don't support RMDA read operations wihtout
    registration of memeory regions, therefore we use fallback mode.
    
    Without this patch, we can also disable such opperations through
    sysfs 'echo 0 > /sys/module/fuse_kio_pcs/parameters/rdmaio_use_dma_mr_for_rdma_rw'.
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rdma_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
index 4622198..ed26c73 100644
--- a/fs/fuse/kio/pcs/pcs_rdma_io.c
+++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
@@ -430,7 +430,8 @@  static int rio_submit_rdma_read(struct pcs_rdmaio *rio, struct pcs_msg *msg,
 	tx->msg = msg;
 	tx->xid = rb->xid;
 
-	if (rdmaio_use_dma_mr_for_rdma_rw) {
+	if (rdmaio_use_dma_mr_for_rdma_rw &&
+	    !rdma_protocol_iwarp(rio->cmid->device, rio->cmid->qp->port)) {
 		if (pcs_rdma_rw_init_from_msg(&tx->rdma_rw, rio->cmid->device,
 					      DMA_FROM_DEVICE, rb->rbuf, rb->rkey,
 					      rio->dev->pd->local_dma_lkey, msg, offset,