Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/rxe: Remove type 2A memory window capability
@ 2022-04-07 18:43 Bob Pearson
  2022-04-08 17:42 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Pearson @ 2022-04-07 18:43 UTC (permalink / raw)
  To: jgg, zyjzyj2000, linux-rdma; +Cc: Bob Pearson

Currently the rdma_rxe driver claims to support both 2A and 2B type
memory windows. But the IBA requires

	010-37.2.31: If an HCA supports the Base Memory Management
	extensions, the HCA shall support either Type 2A or Type 2B
	MWs, but not both.

This commit removes the device capability bit for type 2A memory windows
and adds a clarifying comment to rxe_mw.c.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_mw.c    | 8 ++++++++
 drivers/infiniband/sw/rxe/rxe_param.h | 1 -
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_mw.c b/drivers/infiniband/sw/rxe/rxe_mw.c
index c86b2efd58f2..f29829efd07d 100644
--- a/drivers/infiniband/sw/rxe/rxe_mw.c
+++ b/drivers/infiniband/sw/rxe/rxe_mw.c
@@ -3,6 +3,14 @@
  * Copyright (c) 2020 Hewlett Packard Enterprise, Inc. All rights reserved.
  */
 
+/*
+ * The rdma_rxe driver supports type 1 or type 2B memory windows.
+ * Type 1 MWs are created by ibv_alloc_mw() verbs calls and bound by
+ * ibv_bind_mw() calls. Type 2 MWs are also created by ibv_alloc_mw()
+ * but bound by bind_mw work requests. The ibv_bind_mw() call is converted
+ * by libibverbs to a bind_mw work request.
+ */
+
 #include "rxe.h"
 
 int rxe_alloc_mw(struct ib_mw *ibmw, struct ib_udata *udata)
diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h
index 918270e34a35..07cdde3faedc 100644
--- a/drivers/infiniband/sw/rxe/rxe_param.h
+++ b/drivers/infiniband/sw/rxe/rxe_param.h
@@ -52,7 +52,6 @@ enum rxe_device_param {
 					| IB_DEVICE_MEM_MGT_EXTENSIONS
 					| IB_DEVICE_ALLOW_USER_UNREG
 					| IB_DEVICE_MEM_WINDOW
-					| IB_DEVICE_MEM_WINDOW_TYPE_2A
 					| IB_DEVICE_MEM_WINDOW_TYPE_2B,
 	RXE_MAX_SGE			= 32,
 	RXE_MAX_WQE_SIZE		= sizeof(struct rxe_send_wqe) +
-- 
2.32.0


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

* Re: [PATCH for-next] RDMA/rxe: Remove type 2A memory window capability
  2022-04-07 18:43 [PATCH for-next] RDMA/rxe: Remove type 2A memory window capability Bob Pearson
@ 2022-04-08 17:42 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2022-04-08 17:42 UTC (permalink / raw)
  To: Bob Pearson; +Cc: zyjzyj2000, linux-rdma

On Thu, Apr 07, 2022 at 01:43:22PM -0500, Bob Pearson wrote:
> Currently the rdma_rxe driver claims to support both 2A and 2B type
> memory windows. But the IBA requires
> 
> 	010-37.2.31: If an HCA supports the Base Memory Management
> 	extensions, the HCA shall support either Type 2A or Type 2B
> 	MWs, but not both.
> 
> This commit removes the device capability bit for type 2A memory windows
> and adds a clarifying comment to rxe_mw.c.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_mw.c    | 8 ++++++++
>  drivers/infiniband/sw/rxe/rxe_param.h | 1 -
>  2 files changed, 8 insertions(+), 1 deletion(-)

Applied to for-next, thanks

Jason

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

end of thread, other threads:[~2022-04-08 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 18:43 [PATCH for-next] RDMA/rxe: Remove type 2A memory window capability Bob Pearson
2022-04-08 17:42 ` Jason Gunthorpe

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