Trying to page align the remote_addr for IB_RDMA_WRITE work
requests is triggering "dump_cqe" errors from MOFED 4.x + mlx5.
This patch removes the address masking we were doing with FastReg
which was trying to page align remote_addr values. I am also
removing the setting of "mr->iova" with FastReg as this is being
done in the call to ib_map_mr_sg() and could cause problems.
Lustre-change: https://review.whamcloud.com/27149
Lustre-commit:
6c6341804133ea0a4d4535c621f28f61fe6c29ab
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: If35baa467d8d60866f709b5feea7f619063c6da4
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28237
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
int
kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx, kib_rdma_desc_t *rd,
- __u32 nob, __u64 iov, kib_fmr_t *fmr)
+ __u32 nob, __u64 iov, kib_fmr_t *fmr, bool *is_fastreg)
{
kib_fmr_pool_t *fpo;
__u64 *pages = tx->tx_pages;
if (fpo->fpo_is_fmr) {
struct ib_pool_fmr *pfmr;
+ *is_fastreg = 0;
spin_unlock(&fps->fps_lock);
if (!tx_pages_mapped) {
}
rc = PTR_ERR(pfmr);
} else {
+ *is_fastreg = 1;
if (!list_empty(&fpo->fast_reg.fpo_pool_list)) {
struct kib_fast_reg_descriptor *frd;
#ifdef HAVE_IB_MAP_MR_SG
return n < 0 ? n : -EINVAL;
}
- mr->iova = iov;
-
wr = &frd->frd_fastreg_wr;
memset(wr, 0, sizeof(*wr));
int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx,
kib_rdma_desc_t *rd, __u32 nob, __u64 iov,
- kib_fmr_t *fmr);
+ kib_fmr_t *fmr, bool *is_fastreg);
void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status);
int kiblnd_tunables_setup(struct lnet_ni *ni);
kib_fmr_poolset_t *fps;
int cpt;
int rc;
+ bool is_fastreg = 0;
LASSERT(tx->tx_pool != NULL);
LASSERT(tx->tx_pool->tpo_pool.po_owner != NULL);
cpt = tx->tx_pool->tpo_pool.po_owner->ps_cpt;
fps = net->ibn_fmr_ps[cpt];
- rc = kiblnd_fmr_pool_map(fps, tx, rd, nob, 0, &tx->fmr);
+ rc = kiblnd_fmr_pool_map(fps, tx, rd, nob, 0, &tx->fmr, &is_fastreg);
if (rc != 0) {
CERROR("Can't map %u pages: %d\n", nob, rc);
return rc;
/* If rd is not tx_rd, it's going to get sent to a peer_ni, who will need
* the rkey */
rd->rd_key = tx->fmr.fmr_key;
- rd->rd_frags[0].rf_addr &= ~hdev->ibh_page_mask;
+ if (!is_fastreg)
+ rd->rd_frags[0].rf_addr &= ~hdev->ibh_page_mask;
rd->rd_frags[0].rf_nob = nob;
rd->rd_nfrags = 1;