[ofa-general] [PATCH] mlx4/IB: Set the PRESENT bit in the physical buffer list to match the MTT format.
Vladimir Sokolovsky
vlad at mellanox.co.il
Mon Sep 15 05:47:53 PDT 2008
Signed-off-by: Vladimir Sokolovsky <vlad at mellanox.co.il>
---
Hi Roland,
This is the last fix for FRWR.
drivers/infiniband/hw/mlx4/qp.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index f29dbb7..5762944 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -57,6 +57,8 @@ enum {
MLX4_IB_UD_HEADER_SIZE = 72
};
+#define MLX4_MTT_FLAG_PRESENT 1
+
struct mlx4_ib_sqp {
struct mlx4_ib_qp qp;
int pkey_index;
@@ -1342,6 +1344,12 @@ static __be32 convert_access(int acc)
static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr)
{
struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(wr->wr.fast_reg.page_list);
+ int i;
+
+ for (i = 0; i < wr->wr.fast_reg.page_list_len; ++i)
+ wr->wr.fast_reg.page_list->page_list[i] =
+ cpu_to_be64(wr->wr.fast_reg.page_list->page_list[i] |
+ MLX4_MTT_FLAG_PRESENT);
fseg->flags = convert_access(wr->wr.fast_reg.access_flags);
fseg->mem_key = cpu_to_be32(wr->wr.fast_reg.rkey);
--
1.6.0.1.90.g27a6e
More information about the general
mailing list