diff mbox

shrink struct ib_send_wr V3

Message ID 55E321D7.7000209@dev.mellanox.co.il (mailing list archive)
State Not Applicable
Headers show

Commit Message

Sagi Grimberg Aug. 30, 2015, 3:31 p.m. UTC
>   - patch 2 now explicitly replaces the weird overloading in the mlx5
>     driver with an explicit embedding of struct ib_send_wr, similar
>     to what we do for all other MRs.

That's nice,

There is one non-trivial spot that was missed in mlx5_ib_post_send
though:

                         size += sizeof(struct mlx5_wqe_umr_ctrl_seg) / 16;

Care to fold this in?

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

Comments

Christoph Hellwig Aug. 31, 2015, 4:11 p.m. UTC | #1
On Sun, Aug 30, 2015 at 06:31:35PM +0300, Sagi Grimberg wrote:
>>   - patch 2 now explicitly replaces the weird overloading in the mlx5
>>     driver with an explicit embedding of struct ib_send_wr, similar
>>     to what we do for all other MRs.
>
> That's nice,
>
> There is one non-trivial spot that was missed in mlx5_ib_post_send
> though:

Oh, that was a weird abuse of the old casts.

I've foled both your fixes and force pushed to the wr-cleanup branch.

I do not plan to resend the series until the merge window for 4.4
is open.  Doug, any chance you could pick up the first patch in the
series for 4.3-rc?  It's marked for stable as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Sept. 1, 2015, 12:24 a.m. UTC | #2
On 08/31/2015 12:11 PM, Christoph Hellwig wrote:
> On Sun, Aug 30, 2015 at 06:31:35PM +0300, Sagi Grimberg wrote:
>>>   - patch 2 now explicitly replaces the weird overloading in the mlx5
>>>     driver with an explicit embedding of struct ib_send_wr, similar
>>>     to what we do for all other MRs.
>>
>> That's nice,
>>
>> There is one non-trivial spot that was missed in mlx5_ib_post_send
>> though:
> 
> Oh, that was a weird abuse of the old casts.
> 
> I've foled both your fixes and force pushed to the wr-cleanup branch.
> 
> I do not plan to resend the series until the merge window for 4.4
> is open.  Doug, any chance you could pick up the first patch in the
> series for 4.3-rc?  It's marked for stable as well.

Yes, I can do that.
Doug Ledford Sept. 3, 2015, 6:33 p.m. UTC | #3
On 08/31/2015 08:24 PM, Doug Ledford wrote:
> On 08/31/2015 12:11 PM, Christoph Hellwig wrote:
>> On Sun, Aug 30, 2015 at 06:31:35PM +0300, Sagi Grimberg wrote:
>>>>   - patch 2 now explicitly replaces the weird overloading in the mlx5
>>>>     driver with an explicit embedding of struct ib_send_wr, similar
>>>>     to what we do for all other MRs.
>>>
>>> That's nice,
>>>
>>> There is one non-trivial spot that was missed in mlx5_ib_post_send
>>> though:
>>
>> Oh, that was a weird abuse of the old casts.
>>
>> I've foled both your fixes and force pushed to the wr-cleanup branch.
>>
>> I do not plan to resend the series until the merge window for 4.4
>> is open.  Doug, any chance you could pick up the first patch in the
>> series for 4.3-rc?  It's marked for stable as well.
> 
> Yes, I can do that.
> 

I've applied 1 of 3.  For the remaining two, I plan to pull them into a
test kernel and run some internal tests before committing.  Just FYI.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/qp.c 
b/drivers/infiniband/hw/mlx5/qp.c
index 7ddfb74..35a18d6 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2802,7 +2802,7 @@  int mlx5_ib_post_send(struct ib_qp *ibqp, struct 
ib_send_wr *wr,
                                 goto out;
                         }
                         qp->sq.wr_data[idx] = MLX5_IB_WR_UMR;
-                       ctrl->imm = cpu_to_be32(fast_reg_wr(wr)->rkey);
+                       ctrl->imm = cpu_to_be32(umr_wr(wr)->mkey);
                         set_reg_umr_segment(seg, wr);
                         seg += sizeof(struct mlx5_wqe_umr_ctrl_seg);