#ifdef HAVE_IB_MAP_MR_SG
#ifdef HAVE_IB_MAP_MR_SG_5ARGS
n = ib_map_mr_sg(mr, tx->tx_frags,
- tx->tx_nfrags, NULL, PAGE_SIZE);
+ rd->rd_nfrags, NULL, PAGE_SIZE);
#else
n = ib_map_mr_sg(mr, tx->tx_frags,
- tx->tx_nfrags, PAGE_SIZE);
+ rd->rd_nfrags, PAGE_SIZE);
#endif
- if (unlikely(n != tx->tx_nfrags)) {
+ if (unlikely(n != rd->rd_nfrags)) {
CERROR("Failed to map mr %d/%d "
- "elements\n", n, tx->tx_nfrags);
+ "elements\n", n, rd->rd_nfrags);
return n < 0 ? n : -EINVAL;
}