1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
3 * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
4 * Copyright (c) 2015 System Fabric Works, Inc. All rights reserved.
11 * contains header bit mask definitions and header lengths
12 * declaration of the rxe_opcode_info struct and
13 * rxe_wr_opcode_info struct
17 WR_INLINE_MASK
= BIT(0),
18 WR_ATOMIC_MASK
= BIT(1),
19 WR_SEND_MASK
= BIT(2),
20 WR_READ_MASK
= BIT(3),
21 WR_WRITE_MASK
= BIT(4),
22 WR_LOCAL_MASK
= BIT(5),
25 WR_READ_OR_WRITE_MASK
= WR_READ_MASK
| WR_WRITE_MASK
,
26 WR_READ_WRITE_OR_SEND_MASK
= WR_READ_OR_WRITE_MASK
| WR_SEND_MASK
,
27 WR_WRITE_OR_SEND_MASK
= WR_WRITE_MASK
| WR_SEND_MASK
,
28 WR_ATOMIC_OR_READ_MASK
= WR_ATOMIC_MASK
| WR_READ_MASK
,
31 #define WR_MAX_QPT (8)
33 struct rxe_wr_opcode_info
{
35 enum rxe_wr_mask mask
[WR_MAX_QPT
];
38 extern struct rxe_wr_opcode_info rxe_wr_opcode_info
[];
57 RXE_LRH_MASK
= BIT(RXE_LRH
),
58 RXE_GRH_MASK
= BIT(RXE_GRH
),
59 RXE_BTH_MASK
= BIT(RXE_BTH
),
60 RXE_IMMDT_MASK
= BIT(RXE_IMMDT
),
61 RXE_RETH_MASK
= BIT(RXE_RETH
),
62 RXE_AETH_MASK
= BIT(RXE_AETH
),
63 RXE_ATMETH_MASK
= BIT(RXE_ATMETH
),
64 RXE_ATMACK_MASK
= BIT(RXE_ATMACK
),
65 RXE_IETH_MASK
= BIT(RXE_IETH
),
66 RXE_RDETH_MASK
= BIT(RXE_RDETH
),
67 RXE_DETH_MASK
= BIT(RXE_DETH
),
68 RXE_PAYLOAD_MASK
= BIT(RXE_PAYLOAD
),
70 RXE_REQ_MASK
= BIT(NUM_HDR_TYPES
+ 0),
71 RXE_ACK_MASK
= BIT(NUM_HDR_TYPES
+ 1),
72 RXE_SEND_MASK
= BIT(NUM_HDR_TYPES
+ 2),
73 RXE_WRITE_MASK
= BIT(NUM_HDR_TYPES
+ 3),
74 RXE_READ_MASK
= BIT(NUM_HDR_TYPES
+ 4),
75 RXE_ATOMIC_MASK
= BIT(NUM_HDR_TYPES
+ 5),
77 RXE_RWR_MASK
= BIT(NUM_HDR_TYPES
+ 6),
78 RXE_COMP_MASK
= BIT(NUM_HDR_TYPES
+ 7),
80 RXE_START_MASK
= BIT(NUM_HDR_TYPES
+ 8),
81 RXE_MIDDLE_MASK
= BIT(NUM_HDR_TYPES
+ 9),
82 RXE_END_MASK
= BIT(NUM_HDR_TYPES
+ 10),
84 RXE_LOOPBACK_MASK
= BIT(NUM_HDR_TYPES
+ 12),
86 RXE_READ_OR_ATOMIC
= (RXE_READ_MASK
| RXE_ATOMIC_MASK
),
87 RXE_WRITE_OR_SEND
= (RXE_WRITE_MASK
| RXE_SEND_MASK
),
90 #define OPCODE_NONE (-1)
91 #define RXE_NUM_OPCODE 256
93 struct rxe_opcode_info
{
95 enum rxe_hdr_mask mask
;
97 int offset
[NUM_HDR_TYPES
];
100 extern struct rxe_opcode_info rxe_opcode
[RXE_NUM_OPCODE
];
102 #endif /* RXE_OPCODE_H */