1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
3 * Copyright(c) 2018 Intel Corporation.
7 #ifndef TID_RDMA_DEFS_H
8 #define TID_RDMA_DEFS_H
10 #include <rdma/ib_pack.h>
12 struct tid_rdma_read_req
{
21 struct tid_rdma_read_resp
{
30 struct tid_rdma_write_req
{
38 struct tid_rdma_write_resp
{
48 struct tid_rdma_write_data
{
55 struct tid_rdma_resync
{
76 #define IB_OPCODE_TID_RDMA 0xe0
78 IB_OPCODE_WRITE_REQ
= 0x0,
79 IB_OPCODE_WRITE_RESP
= 0x1,
80 IB_OPCODE_WRITE_DATA
= 0x2,
81 IB_OPCODE_WRITE_DATA_LAST
= 0x3,
82 IB_OPCODE_READ_REQ
= 0x4,
83 IB_OPCODE_READ_RESP
= 0x5,
84 IB_OPCODE_RESYNC
= 0x6,
87 IB_OPCODE(TID_RDMA
, WRITE_REQ
),
88 IB_OPCODE(TID_RDMA
, WRITE_RESP
),
89 IB_OPCODE(TID_RDMA
, WRITE_DATA
),
90 IB_OPCODE(TID_RDMA
, WRITE_DATA_LAST
),
91 IB_OPCODE(TID_RDMA
, READ_REQ
),
92 IB_OPCODE(TID_RDMA
, READ_RESP
),
93 IB_OPCODE(TID_RDMA
, RESYNC
),
94 IB_OPCODE(TID_RDMA
, ACK
),
97 #define TID_OP(x) IB_OPCODE_TID_RDMA_##x
100 * Define TID RDMA specific WR opcodes. The ib_wr_opcode
101 * enum already provides some reserved values for use by
102 * low level drivers. Two of those are used but renamed
103 * to be more descriptive.
105 #define IB_WR_TID_RDMA_WRITE IB_WR_RESERVED1
106 #define IB_WR_TID_RDMA_READ IB_WR_RESERVED2
108 #endif /* TID_RDMA_DEFS_H */