Message ID | 1539543332-28679-9-git-send-email-jsimmons@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | lustre: lnet: fixes for non-x86 systems | expand |
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 43266d8..66aa45f 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -656,8 +656,13 @@ static unsigned int kiblnd_send_wrs(struct kib_conn *conn) * One WR for the LNet message * And ibc_max_frags for the transfer WRs */ + u32 dev_caps = conn->ibc_hdev->ibh_dev->ibd_dev_caps; unsigned int ret = 1 + conn->ibc_max_frags; + /* FastReg needs two extra WRs for map and invalidate */ + if (dev_caps & IBLND_DEV_CAPS_FASTREG_ENABLED) + ret += 2; + /* account for a maximum of ibc_queue_depth in-flight transfers */ ret *= conn->ibc_queue_depth; return ret;