Re: [PATCH RFC 2/2] IB/mlx5: Implement Fast Indirect Memory Registration Feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2014 10:39 PM, Or Gerlitz wrote:

On 10/7/2014 4:48 PM, Sagi Grimberg wrote:

* Nit change in mr_align() static routine to handle void*
instead of __be64.

nit comment... any reason not to put in different and unrelated to this
series patch?

I can, But there is no use for this out of this patch context.


diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h
b/drivers/infiniband/hw/mlx5/mlx5_ib.h
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c


+static void set_indir_umr_segment(struct mlx5_wqe_umr_ctrl_seg *umr,
+                  struct ib_send_wr *wr)
+{
+    u64 mask;
+    u32 list_len = wr->wr.indir_reg.indir_list_len;
+
+    memset(umr, 0, sizeof(*umr));
+
+    umr->klm_octowords = get_klm_octo(list_len * 2);
+    mask = MLX5_MKEY_MASK_LEN        |
+        MLX5_MKEY_MASK_PAGE_SIZE    |
+        MLX5_MKEY_MASK_START_ADDR    |
+        MLX5_MKEY_MASK_EN_RINVAL    |
+        MLX5_MKEY_MASK_KEY        |
+        MLX5_MKEY_MASK_LR        |
+        MLX5_MKEY_MASK_LW        |
+        MLX5_MKEY_MASK_RR        |
+        MLX5_MKEY_MASK_RW        |
+        MLX5_MKEY_MASK_A        |
+        MLX5_MKEY_MASK_FREE;
+
+    umr->mkey_mask = cpu_to_be64(mask);
+}

here you basically replicate the majority of the code from
set_reg_umr_segment - share the common part...

I've thought about it, but I know Eli prefers not to centralize the
umr control segment (and mkey context) setting routines at this point.
I am not against doing it at all, but let's let Eli comment here.

Eli?

Sagi.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux