mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
@ 2024-06-05  8:16 Konstantin Taranov
  2024-06-05 22:14 ` Long Li
  2024-06-06 11:38 ` Leon Romanovsky
  0 siblings, 2 replies; 6+ messages in thread
From: Konstantin Taranov @ 2024-06-05  8:16 UTC (permalink / raw)
  To: kotaranov, sharmaajay, longli, jgg, leon; +Cc: linux-rdma, linux-kernel

From: Konstantin Taranov <kotaranov@microsoft.com>

Ignore optional ib_access_flags when an MR is created.

Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
 drivers/infiniband/hw/mana/mr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/mana/mr.c b/drivers/infiniband/hw/mana/mr.c
index 4f13423..887b09d 100644
--- a/drivers/infiniband/hw/mana/mr.c
+++ b/drivers/infiniband/hw/mana/mr.c
@@ -112,6 +112,7 @@ struct ib_mr *mana_ib_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length,
 		  "start 0x%llx, iova 0x%llx length 0x%llx access_flags 0x%x",
 		  start, iova, length, access_flags);
 
+	access_flags &= ~IB_ACCESS_OPTIONAL;
 	if (access_flags & ~VALID_MR_FLAGS)
 		return ERR_PTR(-EINVAL);
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
  2024-06-05  8:16 [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs Konstantin Taranov
@ 2024-06-05 22:14 ` Long Li
  2024-06-06  8:30   ` Konstantin Taranov
  2024-06-06 11:38 ` Leon Romanovsky
  1 sibling, 1 reply; 6+ messages in thread
From: Long Li @ 2024-06-05 22:14 UTC (permalink / raw)
  To: Konstantin Taranov, Konstantin Taranov, sharmaajay, jgg, leon
  Cc: linux-rdma, linux-kernel

> Subject: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
> 
> From: Konstantin Taranov <kotaranov@microsoft.com>
> 
> Ignore optional ib_access_flags when an MR is created.

Can you add details on why this is needed?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
  2024-06-05 22:14 ` Long Li
@ 2024-06-06  8:30   ` Konstantin Taranov
  2024-06-06 11:39     ` Leon Romanovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Taranov @ 2024-06-06  8:30 UTC (permalink / raw)
  To: Long Li, Konstantin Taranov, sharmaajay, jgg, leon
  Cc: linux-rdma, linux-kernel

> > Ignore optional ib_access_flags when an MR is created.
> 
> Can you add details on why this is needed?

Do you mean to the commit message?
If we do not ignore these optional flags, the reg user mr fails because the next 2 lines:
	if (access_flags & ~VALID_MR_FLAGS)
		return ERR_PTR(-EINVAL);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
  2024-06-05  8:16 [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs Konstantin Taranov
  2024-06-05 22:14 ` Long Li
@ 2024-06-06 11:38 ` Leon Romanovsky
  1 sibling, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2024-06-06 11:38 UTC (permalink / raw)
  To: kotaranov, sharmaajay, longli, jgg, Konstantin Taranov
  Cc: linux-rdma, linux-kernel


On Wed, 05 Jun 2024 01:16:08 -0700, Konstantin Taranov wrote:
> Ignore optional ib_access_flags when an MR is created.
> 
> 

Applied, thanks!

[1/1] RDMA/mana_ib: ignore optional access flags for MRs
      https://git.kernel.org/rdma/rdma/c/62093519622311

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
  2024-06-06  8:30   ` Konstantin Taranov
@ 2024-06-06 11:39     ` Leon Romanovsky
  2024-06-06 11:42       ` Konstantin Taranov
  0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2024-06-06 11:39 UTC (permalink / raw)
  To: Konstantin Taranov
  Cc: Long Li, Konstantin Taranov, sharmaajay, jgg, linux-rdma, linux-kernel

On Thu, Jun 06, 2024 at 08:30:06AM +0000, Konstantin Taranov wrote:
> > > Ignore optional ib_access_flags when an MR is created.
> > 
> > Can you add details on why this is needed?
> 
> Do you mean to the commit message?
> If we do not ignore these optional flags, the reg user mr fails because the next 2 lines:
> 	if (access_flags & ~VALID_MR_FLAGS)
> 		return ERR_PTR(-EINVAL);

I took this patch as is.

Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs
  2024-06-06 11:39     ` Leon Romanovsky
@ 2024-06-06 11:42       ` Konstantin Taranov
  0 siblings, 0 replies; 6+ messages in thread
From: Konstantin Taranov @ 2024-06-06 11:42 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Long Li, Konstantin Taranov, sharmaajay, jgg, linux-rdma, linux-kernel

> > > > Ignore optional ib_access_flags when an MR is created.
> > >
> > > Can you add details on why this is needed?
> >
> > Do you mean to the commit message?
> > If we do not ignore these optional flags, the reg user mr fails because the
> next 2 lines:
> > 	if (access_flags & ~VALID_MR_FLAGS)
> > 		return ERR_PTR(-EINVAL);
> 
> I took this patch as is.
> 
> Thanks

thanks. It makes sense.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-06 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-05  8:16 [PATCH v2 1/1] RDMA/mana_ib: ignore optional access flags for MRs Konstantin Taranov
2024-06-05 22:14 ` Long Li
2024-06-06  8:30   ` Konstantin Taranov
2024-06-06 11:39     ` Leon Romanovsky
2024-06-06 11:42       ` Konstantin Taranov
2024-06-06 11:38 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®