linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH rdma-next 00/10] RDMA/rxe: Add RDMA FLUSH operation
@ 2021-12-28  8:07 Li Zhijian
  2021-12-28  8:07 ` [RFC PATCH rdma-next 01/10] RDMA: mr: Introduce is_pmem Li Zhijian
                   ` (10 more replies)
  0 siblings, 11 replies; 49+ messages in thread
From: Li Zhijian @ 2021-12-28  8:07 UTC (permalink / raw)
  To: linux-rdma, zyjzyj2000, jgg, aharonl, leon
  Cc: linux-kernel, mbloch, liweihang, liangwenpeng, yangx.jy,
	rpearsonhpe, y-goto, Li Zhijian

Hey folks,

These patches are going to implement a *NEW* RDMA opcode "RDMA FLUSH".
In IB SPEC 1.5[1][2], 2 new opcodes, ATOMIC WRITE and RDMA FLUSH were
added in the MEMORY PLACEMENT EXTENSIONS section.

FLUSH is used by the requesting node to achieve guarantees on the data
placement within the memory subsystem of preceding accesses to a
single memory region, such as those performed by RDMA WRITE, Atomics
and ATOMIC WRITE requests.

The operation indicates the virtual address space of a destination node
and where the guarantees should apply. This range must be contiguous
in the virtual space of the memory key but it is not necessarily a
contiguous range of physical memory.

FLUSH packets carry FLUSH extended transport header (see below) to
specify the placement type and the selectivity level of the operation
and RDMA extended header (RETH, see base document RETH definition) to
specify the R_Key VA and Length associated with this request following
the BTH in RC, RDETH in RD and XRCETH in XRC.

RC FLUSH:
+----+------+------+
|BTH | FETH | RETH |
+----+------+------+

RD FLUSH:
+----+------+------+------+
|BTH | RDETH| FETH | RETH |
+----+------+------+------+

XRC FLUSH:
+----+-------+------+------+
|BTH | XRCETH| FETH | RETH |
+----+-------+------+------+

Currently, we introduce RC and RD services only, since XRC has not been
implemented by rxe yet.
NOTE: only RC service is tested now, and since other HCAs have not
added/implemented FLUSH yet, we can only test FLUSH operation in both
SoftRoCE/rxe devices.

The corresponding rdma-core and FLUSH example are available on:
https://github.com/zhijianli88/rdma-core/tree/rfc

Below list some details about FLUSH transport packet:

A FLUSH message is built upon FLUSH request packet and is responded
successfully by RDMA READ response of zero size.

oA19-2: FLUSH shall be single packet message and shall have no payload.

oA19-2: FLUSH shall be single packet message and shall have no payload.
oA19-5: FLUSH BTH shall hold the Opcode = 0x1C

FLUSH Extended Transport Header(FETH)
+-----+-----------+------------------------+----------------------+
|Bits |   31-6    |          5-4           |        3-0           |
+-----+-----------+------------------------+----------------------+
|     | Reserved  | Selectivity Level(SEL) | Placement Type(PLT)  |
+-----+-----------+------------------------+----------------------+

Selectivity Level (SEL) – defines the memory region scope the FLUSH
should apply on. Values are as follows:
• b’00 - Memory Region Range: FLUSH applies for all preceding memory
         updates to the RETH range on this QP. All RETH fields shall be
         valid in this selectivity mode. RETH:DMALen field shall be
         between zero and (2 31 -1) bytes (inclusive).
• b’01 - Memory Region: FLUSH applies for all preceding memory up-
         dates to RETH.R_key on this QP. RETH:DMALen and RETH:VA
         shall be ignored in this mode.
• b'10 - Reserved.
• b'11 - Reserved.

Placement Type (PLT) – Defines the memory placement guarantee of
this FLUSH. Multiple bits may be set in this field. Values are as follows:
• Bit 0 if set to '1' indicated that the FLUSH should guarantee Global
  Visibility.
• Bit 1 if set to '1' indicated that the FLUSH should guarantee
  Persistence.
• Bits 3:2 are reserved

[1]: https://www.infinibandta.org/ibta-specification/ # login required
[2]: https://www.infinibandta.org/wp-content/uploads/2021/08/IBTA-Overview-of-IBTA-Volume-1-Release-1.5-and-MPE-2021-08-17-Secure.pptx

CC: Jason Gunthorpe <jgg@ziepe.ca>
CC: Zhu Yanjun <zyjzyj2000@gmail.com
CC: Leon Romanovsky <leon@kernel.org>
CC: Bob Pearson <rpearsonhpe@gmail.com>
CC: Weihang Li <liweihang@huawei.com>
CC: Mark Bloch <mbloch@nvidia.com>
CC: Wenpeng Liang <liangwenpeng@huawei.com>
CC: Aharon Landau <aharonl@nvidia.com>
CC: linux-rdma@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Li Zhijian (10):
  RDMA: mr: Introduce is_pmem
  RDMA: Allow registering MR with flush access flags
  RDMA/rxe: Allow registering FLUSH flags for supported device only
  RDMA/rxe: Enable IB_DEVICE_RDMA_FLUSH for rxe device
  RDMA/rxe: Allow registering persistent flag for pmem MR only
  RDMA/rxe: Implement RC RDMA FLUSH service in requester side
  RDMA/rxe: Set BTH's SE to zero for FLUSH packet
  RDMA/rxe: Implement flush execution in responder side
  RDMA/rxe: Implement flush completion
  RDMA/rxe: Add RD FLUSH service support

 drivers/infiniband/core/uverbs_cmd.c    |  16 +++
 drivers/infiniband/sw/rxe/rxe_comp.c    |   4 +-
 drivers/infiniband/sw/rxe/rxe_hdr.h     |  52 ++++++++++
 drivers/infiniband/sw/rxe/rxe_loc.h     |   2 +
 drivers/infiniband/sw/rxe/rxe_mr.c      |  63 +++++++++++-
 drivers/infiniband/sw/rxe/rxe_opcode.c  |  33 ++++++
 drivers/infiniband/sw/rxe/rxe_opcode.h  |   3 +
 drivers/infiniband/sw/rxe/rxe_param.h   |   3 +-
 drivers/infiniband/sw/rxe/rxe_req.c     |  14 ++-
 drivers/infiniband/sw/rxe/rxe_resp.c    | 131 +++++++++++++++++++++++-
 include/rdma/ib_pack.h                  |   3 +
 include/rdma/ib_verbs.h                 |  22 +++-
 include/uapi/rdma/ib_user_ioctl_verbs.h |   2 +
 include/uapi/rdma/ib_user_verbs.h       |  18 ++++
 include/uapi/rdma/rdma_user_rxe.h       |   6 ++
 15 files changed, 362 insertions(+), 10 deletions(-)

-- 
2.31.1




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

end of thread, other threads:[~2022-01-27 22:27 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-28  8:07 [RFC PATCH rdma-next 00/10] RDMA/rxe: Add RDMA FLUSH operation Li Zhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 01/10] RDMA: mr: Introduce is_pmem Li Zhijian
2022-01-06  0:21   ` Jason Gunthorpe
2022-01-06  6:12     ` lizhijian
2022-01-14  8:10       ` Li, Zhijian
2022-01-27 22:30         ` Jeff Moyer
2022-01-16 18:11       ` Dan Williams
2022-01-18  8:55         ` lizhijian
2022-01-18 15:28           ` Dan Williams
2022-01-19  2:01             ` lizhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 02/10] RDMA: Allow registering MR with flush access flags Li Zhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 03/10] RDMA/rxe: Allow registering FLUSH flags for supported device only Li Zhijian
2022-01-06  0:22   ` Jason Gunthorpe
2022-01-06  6:20     ` lizhijian
2022-01-13  6:43   ` lizhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 04/10] RDMA/rxe: Enable IB_DEVICE_RDMA_FLUSH for rxe device Li Zhijian
2022-01-06  0:22   ` Jason Gunthorpe
2022-01-06  6:26     ` lizhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 05/10] RDMA/rxe: Allow registering persistent flag for pmem MR only Li Zhijian
2021-12-30 22:25   ` Tom Talpey
2021-12-31  3:34     ` lizhijian
2021-12-31 14:40       ` Tom Talpey
2022-01-04  1:32         ` lizhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 06/10] RDMA/rxe: Implement RC RDMA FLUSH service in requester side Li Zhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 07/10] RDMA/rxe: Set BTH's SE to zero for FLUSH packet Li Zhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 08/10] RDMA/rxe: Implement flush execution in responder side Li Zhijian
2021-12-30 22:18   ` Tom Talpey
2021-12-31  1:37     ` lizhijian
2021-12-31  2:32       ` Tom Talpey
2022-01-04  8:51         ` lizhijian
2022-01-04 16:02           ` Tom Talpey
2022-01-06  0:35         ` Jason Gunthorpe
2022-01-04 16:40   ` Tom Talpey
2022-01-05  1:43     ` lizhijian
2022-01-06  0:28   ` Jason Gunthorpe
2022-01-06  6:42     ` lizhijian
2022-01-06 17:33       ` Jason Gunthorpe
2022-01-10  5:45         ` lizhijian
2022-01-10 14:34           ` Jason Gunthorpe
2022-01-11  5:34             ` lizhijian
2022-01-11 20:48               ` Jason Gunthorpe
2022-01-12  9:50                 ` lizhijian
2022-01-12 13:12                   ` Jason Gunthorpe
2022-01-13  6:29                     ` lizhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 09/10] RDMA/rxe: Implement flush completion Li Zhijian
2021-12-28  8:07 ` [RFC PATCH rdma-next 10/10] RDMA/rxe: Add RD FLUSH service support Li Zhijian
2021-12-29  8:49 ` [RFC PATCH rdma-next 00/10] RDMA/rxe: Add RDMA FLUSH operation Gromadzki, Tomasz
2021-12-29 14:35   ` Tom Talpey
2021-12-31  1:10     ` lizhijian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).