Re: [PATCH rdma-next v2 1/1] RDMA/mana_ib: memory windows
From: Konstantin Taranov
Date: Tue Mar 31 2026 - 05:16:27 EST
> On Wed, Mar 18, 2026 at 10:23:23AM -0700, Konstantin Taranov wrote:
> > From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> >
> > Implement .alloc_mw() and .dealloc_mw() for mana device.
> >
> > Signed-off-by: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> > ---
> > v2: fixed comments. Cleaned up the use of mana_gd_send_request()
> > drivers/infiniband/hw/mana/device.c | 3 ++
> > drivers/infiniband/hw/mana/mana_ib.h | 8 +++++
> > drivers/infiniband/hw/mana/mr.c | 53
> +++++++++++++++++++++++++++-
> > include/net/mana/gdma.h | 5 +++
> > 4 files changed, 68 insertions(+), 1 deletion(-)
>
> <...>
>
> > +static int mana_ib_gd_create_mw(struct mana_ib_dev *dev, struct
> > +mana_ib_pd *pd, struct ib_mw *ibmw) {
> > + struct mana_ib_mw *mw = container_of(ibmw, struct mana_ib_mw,
> ibmw);
> > + struct gdma_context *gc = mdev_to_gc(dev);
> > + struct gdma_create_mr_response resp = {};
> > + struct gdma_create_mr_request req = {};
> > + int err;
> > +
> > + mana_gd_init_req_hdr(&req.hdr, GDMA_CREATE_MR, sizeof(req),
> sizeof(resp));
> > + req.pd_handle = pd->pd_handle;
>
> Both sashiko, which runs on Gemnini
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsashi
> ko.dev%2F%23%2Fpatchset%2F20260318172323.1416803-1-
> kotaranov%40linux.microsoft.com&data=05%7C02%7Ckotaranov%40microso
> ft.com%7Ce8888ce68913479d8db508de8e53a186%7C72f988bf86f141af91ab
> 2d7cd011db47%7C1%7C0%7C639104687038043303%7CUnknown%7CTWFp
> bGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4z
> MiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=r9n1Jmd
> Ke5smdwDQto80%2BHWosk3DrRa1z4jdNmzjLjk%3D&reserved=0
> and my local claude checks pointed to the same area of the code:
>
> 25 > + mana_gd_init_req_hdr(&req.hdr, GDMA_CREATE_MR, sizeof(req),
> sizeof(resp));
> 26 > + req.pd_handle = pd->pd_handle;
> 27
> 28 mana_gd_init_req_hdr() sets msg_version to GDMA_MESSAGE_V1.
> 29 mana_ib_gd_create_mr() explicitly upgrades this to
> GDMA_MESSAGE_V2
> 30 for all GDMA_CREATE_MR requests, regardless of mr_type:
> 31
> 32 mana_ib_gd_create_mr() {
> 33 mana_gd_init_req_hdr(&req.hdr, GDMA_CREATE_MR, ...);
> 34 req.hdr.req.msg_version = GDMA_MESSAGE_V2;
> 35 ...
> 36 }
> 37
> 38 Is it intentional that mana_ib_gd_create_mw() sends
> GDMA_CREATE_MR
> 39 at GDMA_MESSAGE_V1 rather than GDMA_MESSAGE_V2?
>
Thanks. I sent v3. It does not matter v1 vs v2 as HW supports both, I just wrote this patch long time ago.
I changed to v2 to make code more unified.
> Thanks