Bob Pearson | 63fa15d | 2020-08-27 09:54:40 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved. |
| 4 | * Copyright (c) 2015 System Fabric Works, Inc. All rights reserved. |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <rdma/ib_pack.h> |
| 8 | #include "rxe_opcode.h" |
| 9 | #include "rxe_hdr.h" |
| 10 | |
| 11 | /* useful information about work request opcodes and pkt opcodes in |
| 12 | * table form |
| 13 | */ |
| 14 | struct rxe_wr_opcode_info rxe_wr_opcode_info[] = { |
| 15 | [IB_WR_RDMA_WRITE] = { |
| 16 | .name = "IB_WR_RDMA_WRITE", |
| 17 | .mask = { |
| 18 | [IB_QPT_RC] = WR_INLINE_MASK | WR_WRITE_MASK, |
| 19 | [IB_QPT_UC] = WR_INLINE_MASK | WR_WRITE_MASK, |
| 20 | }, |
| 21 | }, |
| 22 | [IB_WR_RDMA_WRITE_WITH_IMM] = { |
| 23 | .name = "IB_WR_RDMA_WRITE_WITH_IMM", |
| 24 | .mask = { |
| 25 | [IB_QPT_RC] = WR_INLINE_MASK | WR_WRITE_MASK, |
| 26 | [IB_QPT_UC] = WR_INLINE_MASK | WR_WRITE_MASK, |
| 27 | }, |
| 28 | }, |
| 29 | [IB_WR_SEND] = { |
| 30 | .name = "IB_WR_SEND", |
| 31 | .mask = { |
| 32 | [IB_QPT_SMI] = WR_INLINE_MASK | WR_SEND_MASK, |
| 33 | [IB_QPT_GSI] = WR_INLINE_MASK | WR_SEND_MASK, |
| 34 | [IB_QPT_RC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 35 | [IB_QPT_UC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 36 | [IB_QPT_UD] = WR_INLINE_MASK | WR_SEND_MASK, |
| 37 | }, |
| 38 | }, |
| 39 | [IB_WR_SEND_WITH_IMM] = { |
| 40 | .name = "IB_WR_SEND_WITH_IMM", |
| 41 | .mask = { |
| 42 | [IB_QPT_SMI] = WR_INLINE_MASK | WR_SEND_MASK, |
| 43 | [IB_QPT_GSI] = WR_INLINE_MASK | WR_SEND_MASK, |
| 44 | [IB_QPT_RC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 45 | [IB_QPT_UC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 46 | [IB_QPT_UD] = WR_INLINE_MASK | WR_SEND_MASK, |
| 47 | }, |
| 48 | }, |
| 49 | [IB_WR_RDMA_READ] = { |
| 50 | .name = "IB_WR_RDMA_READ", |
| 51 | .mask = { |
| 52 | [IB_QPT_RC] = WR_READ_MASK, |
| 53 | }, |
| 54 | }, |
| 55 | [IB_WR_ATOMIC_CMP_AND_SWP] = { |
| 56 | .name = "IB_WR_ATOMIC_CMP_AND_SWP", |
| 57 | .mask = { |
| 58 | [IB_QPT_RC] = WR_ATOMIC_MASK, |
| 59 | }, |
| 60 | }, |
| 61 | [IB_WR_ATOMIC_FETCH_AND_ADD] = { |
| 62 | .name = "IB_WR_ATOMIC_FETCH_AND_ADD", |
| 63 | .mask = { |
| 64 | [IB_QPT_RC] = WR_ATOMIC_MASK, |
| 65 | }, |
| 66 | }, |
| 67 | [IB_WR_LSO] = { |
| 68 | .name = "IB_WR_LSO", |
| 69 | .mask = { |
| 70 | /* not supported */ |
| 71 | }, |
| 72 | }, |
| 73 | [IB_WR_SEND_WITH_INV] = { |
| 74 | .name = "IB_WR_SEND_WITH_INV", |
| 75 | .mask = { |
| 76 | [IB_QPT_RC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 77 | [IB_QPT_UC] = WR_INLINE_MASK | WR_SEND_MASK, |
| 78 | [IB_QPT_UD] = WR_INLINE_MASK | WR_SEND_MASK, |
| 79 | }, |
| 80 | }, |
| 81 | [IB_WR_RDMA_READ_WITH_INV] = { |
| 82 | .name = "IB_WR_RDMA_READ_WITH_INV", |
| 83 | .mask = { |
| 84 | [IB_QPT_RC] = WR_READ_MASK, |
| 85 | }, |
| 86 | }, |
| 87 | [IB_WR_LOCAL_INV] = { |
| 88 | .name = "IB_WR_LOCAL_INV", |
| 89 | .mask = { |
Bob Pearson | 886441f | 2021-06-07 23:25:48 -0500 | [diff] [blame] | 90 | [IB_QPT_RC] = WR_LOCAL_OP_MASK, |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 91 | }, |
| 92 | }, |
| 93 | [IB_WR_REG_MR] = { |
| 94 | .name = "IB_WR_REG_MR", |
| 95 | .mask = { |
Bob Pearson | 886441f | 2021-06-07 23:25:48 -0500 | [diff] [blame] | 96 | [IB_QPT_RC] = WR_LOCAL_OP_MASK, |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 97 | }, |
| 98 | }, |
Bob Pearson | 32a577b | 2021-06-07 23:25:50 -0500 | [diff] [blame] | 99 | [IB_WR_BIND_MW] = { |
| 100 | .name = "IB_WR_BIND_MW", |
| 101 | .mask = { |
| 102 | [IB_QPT_RC] = WR_LOCAL_OP_MASK, |
| 103 | [IB_QPT_UC] = WR_LOCAL_OP_MASK, |
| 104 | }, |
| 105 | }, |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 106 | }; |
| 107 | |
| 108 | struct rxe_opcode_info rxe_opcode[RXE_NUM_OPCODE] = { |
| 109 | [IB_OPCODE_RC_SEND_FIRST] = { |
| 110 | .name = "IB_OPCODE_RC_SEND_FIRST", |
| 111 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_RWR_MASK |
| 112 | | RXE_SEND_MASK | RXE_START_MASK, |
| 113 | .length = RXE_BTH_BYTES, |
| 114 | .offset = { |
| 115 | [RXE_BTH] = 0, |
| 116 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 117 | } |
| 118 | }, |
| 119 | [IB_OPCODE_RC_SEND_MIDDLE] = { |
| 120 | .name = "IB_OPCODE_RC_SEND_MIDDLE]", |
| 121 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_SEND_MASK |
| 122 | | RXE_MIDDLE_MASK, |
| 123 | .length = RXE_BTH_BYTES, |
| 124 | .offset = { |
| 125 | [RXE_BTH] = 0, |
| 126 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 127 | } |
| 128 | }, |
| 129 | [IB_OPCODE_RC_SEND_LAST] = { |
| 130 | .name = "IB_OPCODE_RC_SEND_LAST", |
| 131 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_COMP_MASK |
| 132 | | RXE_SEND_MASK | RXE_END_MASK, |
| 133 | .length = RXE_BTH_BYTES, |
| 134 | .offset = { |
| 135 | [RXE_BTH] = 0, |
| 136 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 137 | } |
| 138 | }, |
| 139 | [IB_OPCODE_RC_SEND_LAST_WITH_IMMEDIATE] = { |
| 140 | .name = "IB_OPCODE_RC_SEND_LAST_WITH_IMMEDIATE", |
| 141 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 142 | | RXE_COMP_MASK | RXE_SEND_MASK | RXE_END_MASK, |
| 143 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 144 | .offset = { |
| 145 | [RXE_BTH] = 0, |
| 146 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 147 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 148 | + RXE_IMMDT_BYTES, |
| 149 | } |
| 150 | }, |
| 151 | [IB_OPCODE_RC_SEND_ONLY] = { |
| 152 | .name = "IB_OPCODE_RC_SEND_ONLY", |
| 153 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_COMP_MASK |
| 154 | | RXE_RWR_MASK | RXE_SEND_MASK |
| 155 | | RXE_START_MASK | RXE_END_MASK, |
| 156 | .length = RXE_BTH_BYTES, |
| 157 | .offset = { |
| 158 | [RXE_BTH] = 0, |
| 159 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 160 | } |
| 161 | }, |
| 162 | [IB_OPCODE_RC_SEND_ONLY_WITH_IMMEDIATE] = { |
| 163 | .name = "IB_OPCODE_RC_SEND_ONLY_WITH_IMMEDIATE", |
| 164 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 165 | | RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
| 166 | | RXE_START_MASK | RXE_END_MASK, |
| 167 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 168 | .offset = { |
| 169 | [RXE_BTH] = 0, |
| 170 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 171 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 172 | + RXE_IMMDT_BYTES, |
| 173 | } |
| 174 | }, |
| 175 | [IB_OPCODE_RC_RDMA_WRITE_FIRST] = { |
| 176 | .name = "IB_OPCODE_RC_RDMA_WRITE_FIRST", |
| 177 | .mask = RXE_RETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 178 | | RXE_WRITE_MASK | RXE_START_MASK, |
| 179 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES, |
| 180 | .offset = { |
| 181 | [RXE_BTH] = 0, |
| 182 | [RXE_RETH] = RXE_BTH_BYTES, |
| 183 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 184 | + RXE_RETH_BYTES, |
| 185 | } |
| 186 | }, |
| 187 | [IB_OPCODE_RC_RDMA_WRITE_MIDDLE] = { |
| 188 | .name = "IB_OPCODE_RC_RDMA_WRITE_MIDDLE", |
| 189 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_WRITE_MASK |
| 190 | | RXE_MIDDLE_MASK, |
| 191 | .length = RXE_BTH_BYTES, |
| 192 | .offset = { |
| 193 | [RXE_BTH] = 0, |
| 194 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 195 | } |
| 196 | }, |
| 197 | [IB_OPCODE_RC_RDMA_WRITE_LAST] = { |
| 198 | .name = "IB_OPCODE_RC_RDMA_WRITE_LAST", |
| 199 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_WRITE_MASK |
| 200 | | RXE_END_MASK, |
| 201 | .length = RXE_BTH_BYTES, |
| 202 | .offset = { |
| 203 | [RXE_BTH] = 0, |
| 204 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 205 | } |
| 206 | }, |
| 207 | [IB_OPCODE_RC_RDMA_WRITE_LAST_WITH_IMMEDIATE] = { |
| 208 | .name = "IB_OPCODE_RC_RDMA_WRITE_LAST_WITH_IMMEDIATE", |
| 209 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 210 | | RXE_WRITE_MASK | RXE_COMP_MASK | RXE_RWR_MASK |
| 211 | | RXE_END_MASK, |
| 212 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 213 | .offset = { |
| 214 | [RXE_BTH] = 0, |
| 215 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 216 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 217 | + RXE_IMMDT_BYTES, |
| 218 | } |
| 219 | }, |
| 220 | [IB_OPCODE_RC_RDMA_WRITE_ONLY] = { |
| 221 | .name = "IB_OPCODE_RC_RDMA_WRITE_ONLY", |
| 222 | .mask = RXE_RETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 223 | | RXE_WRITE_MASK | RXE_START_MASK |
| 224 | | RXE_END_MASK, |
| 225 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES, |
| 226 | .offset = { |
| 227 | [RXE_BTH] = 0, |
| 228 | [RXE_RETH] = RXE_BTH_BYTES, |
| 229 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 230 | + RXE_RETH_BYTES, |
| 231 | } |
| 232 | }, |
| 233 | [IB_OPCODE_RC_RDMA_WRITE_ONLY_WITH_IMMEDIATE] = { |
| 234 | .name = "IB_OPCODE_RC_RDMA_WRITE_ONLY_WITH_IMMEDIATE", |
| 235 | .mask = RXE_RETH_MASK | RXE_IMMDT_MASK | RXE_PAYLOAD_MASK |
| 236 | | RXE_REQ_MASK | RXE_WRITE_MASK |
| 237 | | RXE_COMP_MASK | RXE_RWR_MASK |
| 238 | | RXE_START_MASK | RXE_END_MASK, |
| 239 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_RETH_BYTES, |
| 240 | .offset = { |
| 241 | [RXE_BTH] = 0, |
| 242 | [RXE_RETH] = RXE_BTH_BYTES, |
| 243 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 244 | + RXE_RETH_BYTES, |
| 245 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 246 | + RXE_RETH_BYTES |
| 247 | + RXE_IMMDT_BYTES, |
| 248 | } |
| 249 | }, |
| 250 | [IB_OPCODE_RC_RDMA_READ_REQUEST] = { |
| 251 | .name = "IB_OPCODE_RC_RDMA_READ_REQUEST", |
| 252 | .mask = RXE_RETH_MASK | RXE_REQ_MASK | RXE_READ_MASK |
| 253 | | RXE_START_MASK | RXE_END_MASK, |
| 254 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES, |
| 255 | .offset = { |
| 256 | [RXE_BTH] = 0, |
| 257 | [RXE_RETH] = RXE_BTH_BYTES, |
| 258 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 259 | + RXE_RETH_BYTES, |
| 260 | } |
| 261 | }, |
| 262 | [IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST] = { |
| 263 | .name = "IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST", |
| 264 | .mask = RXE_AETH_MASK | RXE_PAYLOAD_MASK | RXE_ACK_MASK |
| 265 | | RXE_START_MASK, |
| 266 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES, |
| 267 | .offset = { |
| 268 | [RXE_BTH] = 0, |
| 269 | [RXE_AETH] = RXE_BTH_BYTES, |
| 270 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 271 | + RXE_AETH_BYTES, |
| 272 | } |
| 273 | }, |
| 274 | [IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE] = { |
| 275 | .name = "IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE", |
| 276 | .mask = RXE_PAYLOAD_MASK | RXE_ACK_MASK | RXE_MIDDLE_MASK, |
| 277 | .length = RXE_BTH_BYTES, |
| 278 | .offset = { |
| 279 | [RXE_BTH] = 0, |
| 280 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 281 | } |
| 282 | }, |
| 283 | [IB_OPCODE_RC_RDMA_READ_RESPONSE_LAST] = { |
| 284 | .name = "IB_OPCODE_RC_RDMA_READ_RESPONSE_LAST", |
| 285 | .mask = RXE_AETH_MASK | RXE_PAYLOAD_MASK | RXE_ACK_MASK |
| 286 | | RXE_END_MASK, |
| 287 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES, |
| 288 | .offset = { |
| 289 | [RXE_BTH] = 0, |
| 290 | [RXE_AETH] = RXE_BTH_BYTES, |
| 291 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 292 | + RXE_AETH_BYTES, |
| 293 | } |
| 294 | }, |
| 295 | [IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY] = { |
| 296 | .name = "IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY", |
| 297 | .mask = RXE_AETH_MASK | RXE_PAYLOAD_MASK | RXE_ACK_MASK |
| 298 | | RXE_START_MASK | RXE_END_MASK, |
| 299 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES, |
| 300 | .offset = { |
| 301 | [RXE_BTH] = 0, |
| 302 | [RXE_AETH] = RXE_BTH_BYTES, |
| 303 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 304 | + RXE_AETH_BYTES, |
| 305 | } |
| 306 | }, |
| 307 | [IB_OPCODE_RC_ACKNOWLEDGE] = { |
| 308 | .name = "IB_OPCODE_RC_ACKNOWLEDGE", |
| 309 | .mask = RXE_AETH_MASK | RXE_ACK_MASK | RXE_START_MASK |
| 310 | | RXE_END_MASK, |
| 311 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES, |
| 312 | .offset = { |
| 313 | [RXE_BTH] = 0, |
| 314 | [RXE_AETH] = RXE_BTH_BYTES, |
| 315 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 316 | + RXE_AETH_BYTES, |
| 317 | } |
| 318 | }, |
| 319 | [IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE] = { |
| 320 | .name = "IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE", |
| 321 | .mask = RXE_AETH_MASK | RXE_ATMACK_MASK | RXE_ACK_MASK |
| 322 | | RXE_START_MASK | RXE_END_MASK, |
| 323 | .length = RXE_BTH_BYTES + RXE_ATMACK_BYTES + RXE_AETH_BYTES, |
| 324 | .offset = { |
| 325 | [RXE_BTH] = 0, |
| 326 | [RXE_AETH] = RXE_BTH_BYTES, |
| 327 | [RXE_ATMACK] = RXE_BTH_BYTES |
| 328 | + RXE_AETH_BYTES, |
| 329 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 330 | + RXE_ATMACK_BYTES + RXE_AETH_BYTES, |
| 331 | } |
| 332 | }, |
| 333 | [IB_OPCODE_RC_COMPARE_SWAP] = { |
| 334 | .name = "IB_OPCODE_RC_COMPARE_SWAP", |
| 335 | .mask = RXE_ATMETH_MASK | RXE_REQ_MASK | RXE_ATOMIC_MASK |
| 336 | | RXE_START_MASK | RXE_END_MASK, |
| 337 | .length = RXE_BTH_BYTES + RXE_ATMETH_BYTES, |
| 338 | .offset = { |
| 339 | [RXE_BTH] = 0, |
| 340 | [RXE_ATMETH] = RXE_BTH_BYTES, |
| 341 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 342 | + RXE_ATMETH_BYTES, |
| 343 | } |
| 344 | }, |
| 345 | [IB_OPCODE_RC_FETCH_ADD] = { |
| 346 | .name = "IB_OPCODE_RC_FETCH_ADD", |
| 347 | .mask = RXE_ATMETH_MASK | RXE_REQ_MASK | RXE_ATOMIC_MASK |
| 348 | | RXE_START_MASK | RXE_END_MASK, |
| 349 | .length = RXE_BTH_BYTES + RXE_ATMETH_BYTES, |
| 350 | .offset = { |
| 351 | [RXE_BTH] = 0, |
| 352 | [RXE_ATMETH] = RXE_BTH_BYTES, |
| 353 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 354 | + RXE_ATMETH_BYTES, |
| 355 | } |
| 356 | }, |
| 357 | [IB_OPCODE_RC_SEND_LAST_WITH_INVALIDATE] = { |
| 358 | .name = "IB_OPCODE_RC_SEND_LAST_WITH_INVALIDATE", |
| 359 | .mask = RXE_IETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 360 | | RXE_COMP_MASK | RXE_SEND_MASK | RXE_END_MASK, |
| 361 | .length = RXE_BTH_BYTES + RXE_IETH_BYTES, |
| 362 | .offset = { |
| 363 | [RXE_BTH] = 0, |
| 364 | [RXE_IETH] = RXE_BTH_BYTES, |
| 365 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 366 | + RXE_IETH_BYTES, |
| 367 | } |
| 368 | }, |
| 369 | [IB_OPCODE_RC_SEND_ONLY_WITH_INVALIDATE] = { |
| 370 | .name = "IB_OPCODE_RC_SEND_ONLY_INV", |
| 371 | .mask = RXE_IETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 372 | | RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
Jianchao Wang | 2da36d4 | 2018-04-26 11:52:39 +0800 | [diff] [blame] | 373 | | RXE_END_MASK | RXE_START_MASK, |
Moni Shoua | 8700e3e | 2016-06-16 16:45:23 +0300 | [diff] [blame] | 374 | .length = RXE_BTH_BYTES + RXE_IETH_BYTES, |
| 375 | .offset = { |
| 376 | [RXE_BTH] = 0, |
| 377 | [RXE_IETH] = RXE_BTH_BYTES, |
| 378 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 379 | + RXE_IETH_BYTES, |
| 380 | } |
| 381 | }, |
| 382 | |
| 383 | /* UC */ |
| 384 | [IB_OPCODE_UC_SEND_FIRST] = { |
| 385 | .name = "IB_OPCODE_UC_SEND_FIRST", |
| 386 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_RWR_MASK |
| 387 | | RXE_SEND_MASK | RXE_START_MASK, |
| 388 | .length = RXE_BTH_BYTES, |
| 389 | .offset = { |
| 390 | [RXE_BTH] = 0, |
| 391 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 392 | } |
| 393 | }, |
| 394 | [IB_OPCODE_UC_SEND_MIDDLE] = { |
| 395 | .name = "IB_OPCODE_UC_SEND_MIDDLE", |
| 396 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_SEND_MASK |
| 397 | | RXE_MIDDLE_MASK, |
| 398 | .length = RXE_BTH_BYTES, |
| 399 | .offset = { |
| 400 | [RXE_BTH] = 0, |
| 401 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 402 | } |
| 403 | }, |
| 404 | [IB_OPCODE_UC_SEND_LAST] = { |
| 405 | .name = "IB_OPCODE_UC_SEND_LAST", |
| 406 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_COMP_MASK |
| 407 | | RXE_SEND_MASK | RXE_END_MASK, |
| 408 | .length = RXE_BTH_BYTES, |
| 409 | .offset = { |
| 410 | [RXE_BTH] = 0, |
| 411 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 412 | } |
| 413 | }, |
| 414 | [IB_OPCODE_UC_SEND_LAST_WITH_IMMEDIATE] = { |
| 415 | .name = "IB_OPCODE_UC_SEND_LAST_WITH_IMMEDIATE", |
| 416 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 417 | | RXE_COMP_MASK | RXE_SEND_MASK | RXE_END_MASK, |
| 418 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 419 | .offset = { |
| 420 | [RXE_BTH] = 0, |
| 421 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 422 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 423 | + RXE_IMMDT_BYTES, |
| 424 | } |
| 425 | }, |
| 426 | [IB_OPCODE_UC_SEND_ONLY] = { |
| 427 | .name = "IB_OPCODE_UC_SEND_ONLY", |
| 428 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_COMP_MASK |
| 429 | | RXE_RWR_MASK | RXE_SEND_MASK |
| 430 | | RXE_START_MASK | RXE_END_MASK, |
| 431 | .length = RXE_BTH_BYTES, |
| 432 | .offset = { |
| 433 | [RXE_BTH] = 0, |
| 434 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 435 | } |
| 436 | }, |
| 437 | [IB_OPCODE_UC_SEND_ONLY_WITH_IMMEDIATE] = { |
| 438 | .name = "IB_OPCODE_UC_SEND_ONLY_WITH_IMMEDIATE", |
| 439 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 440 | | RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
| 441 | | RXE_START_MASK | RXE_END_MASK, |
| 442 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 443 | .offset = { |
| 444 | [RXE_BTH] = 0, |
| 445 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 446 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 447 | + RXE_IMMDT_BYTES, |
| 448 | } |
| 449 | }, |
| 450 | [IB_OPCODE_UC_RDMA_WRITE_FIRST] = { |
| 451 | .name = "IB_OPCODE_UC_RDMA_WRITE_FIRST", |
| 452 | .mask = RXE_RETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 453 | | RXE_WRITE_MASK | RXE_START_MASK, |
| 454 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES, |
| 455 | .offset = { |
| 456 | [RXE_BTH] = 0, |
| 457 | [RXE_RETH] = RXE_BTH_BYTES, |
| 458 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 459 | + RXE_RETH_BYTES, |
| 460 | } |
| 461 | }, |
| 462 | [IB_OPCODE_UC_RDMA_WRITE_MIDDLE] = { |
| 463 | .name = "IB_OPCODE_UC_RDMA_WRITE_MIDDLE", |
| 464 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_WRITE_MASK |
| 465 | | RXE_MIDDLE_MASK, |
| 466 | .length = RXE_BTH_BYTES, |
| 467 | .offset = { |
| 468 | [RXE_BTH] = 0, |
| 469 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 470 | } |
| 471 | }, |
| 472 | [IB_OPCODE_UC_RDMA_WRITE_LAST] = { |
| 473 | .name = "IB_OPCODE_UC_RDMA_WRITE_LAST", |
| 474 | .mask = RXE_PAYLOAD_MASK | RXE_REQ_MASK | RXE_WRITE_MASK |
| 475 | | RXE_END_MASK, |
| 476 | .length = RXE_BTH_BYTES, |
| 477 | .offset = { |
| 478 | [RXE_BTH] = 0, |
| 479 | [RXE_PAYLOAD] = RXE_BTH_BYTES, |
| 480 | } |
| 481 | }, |
| 482 | [IB_OPCODE_UC_RDMA_WRITE_LAST_WITH_IMMEDIATE] = { |
| 483 | .name = "IB_OPCODE_UC_RDMA_WRITE_LAST_WITH_IMMEDIATE", |
| 484 | .mask = RXE_IMMDT_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 485 | | RXE_WRITE_MASK | RXE_COMP_MASK | RXE_RWR_MASK |
| 486 | | RXE_END_MASK, |
| 487 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, |
| 488 | .offset = { |
| 489 | [RXE_BTH] = 0, |
| 490 | [RXE_IMMDT] = RXE_BTH_BYTES, |
| 491 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 492 | + RXE_IMMDT_BYTES, |
| 493 | } |
| 494 | }, |
| 495 | [IB_OPCODE_UC_RDMA_WRITE_ONLY] = { |
| 496 | .name = "IB_OPCODE_UC_RDMA_WRITE_ONLY", |
| 497 | .mask = RXE_RETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 498 | | RXE_WRITE_MASK | RXE_START_MASK |
| 499 | | RXE_END_MASK, |
| 500 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES, |
| 501 | .offset = { |
| 502 | [RXE_BTH] = 0, |
| 503 | [RXE_RETH] = RXE_BTH_BYTES, |
| 504 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 505 | + RXE_RETH_BYTES, |
| 506 | } |
| 507 | }, |
| 508 | [IB_OPCODE_UC_RDMA_WRITE_ONLY_WITH_IMMEDIATE] = { |
| 509 | .name = "IB_OPCODE_UC_RDMA_WRITE_ONLY_WITH_IMMEDIATE", |
| 510 | .mask = RXE_RETH_MASK | RXE_IMMDT_MASK | RXE_PAYLOAD_MASK |
| 511 | | RXE_REQ_MASK | RXE_WRITE_MASK |
| 512 | | RXE_COMP_MASK | RXE_RWR_MASK |
| 513 | | RXE_START_MASK | RXE_END_MASK, |
| 514 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_RETH_BYTES, |
| 515 | .offset = { |
| 516 | [RXE_BTH] = 0, |
| 517 | [RXE_RETH] = RXE_BTH_BYTES, |
| 518 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 519 | + RXE_RETH_BYTES, |
| 520 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 521 | + RXE_RETH_BYTES |
| 522 | + RXE_IMMDT_BYTES, |
| 523 | } |
| 524 | }, |
| 525 | |
| 526 | /* RD */ |
| 527 | [IB_OPCODE_RD_SEND_FIRST] = { |
| 528 | .name = "IB_OPCODE_RD_SEND_FIRST", |
| 529 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 530 | | RXE_REQ_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
| 531 | | RXE_START_MASK, |
| 532 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 533 | .offset = { |
| 534 | [RXE_BTH] = 0, |
| 535 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 536 | [RXE_DETH] = RXE_BTH_BYTES |
| 537 | + RXE_RDETH_BYTES, |
| 538 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 539 | + RXE_RDETH_BYTES |
| 540 | + RXE_DETH_BYTES, |
| 541 | } |
| 542 | }, |
| 543 | [IB_OPCODE_RD_SEND_MIDDLE] = { |
| 544 | .name = "IB_OPCODE_RD_SEND_MIDDLE", |
| 545 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 546 | | RXE_REQ_MASK | RXE_SEND_MASK |
| 547 | | RXE_MIDDLE_MASK, |
| 548 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 549 | .offset = { |
| 550 | [RXE_BTH] = 0, |
| 551 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 552 | [RXE_DETH] = RXE_BTH_BYTES |
| 553 | + RXE_RDETH_BYTES, |
| 554 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 555 | + RXE_RDETH_BYTES |
| 556 | + RXE_DETH_BYTES, |
| 557 | } |
| 558 | }, |
| 559 | [IB_OPCODE_RD_SEND_LAST] = { |
| 560 | .name = "IB_OPCODE_RD_SEND_LAST", |
| 561 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 562 | | RXE_REQ_MASK | RXE_COMP_MASK | RXE_SEND_MASK |
| 563 | | RXE_END_MASK, |
| 564 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 565 | .offset = { |
| 566 | [RXE_BTH] = 0, |
| 567 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 568 | [RXE_DETH] = RXE_BTH_BYTES |
| 569 | + RXE_RDETH_BYTES, |
| 570 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 571 | + RXE_RDETH_BYTES |
| 572 | + RXE_DETH_BYTES, |
| 573 | } |
| 574 | }, |
| 575 | [IB_OPCODE_RD_SEND_LAST_WITH_IMMEDIATE] = { |
| 576 | .name = "IB_OPCODE_RD_SEND_LAST_WITH_IMMEDIATE", |
| 577 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_IMMDT_MASK |
| 578 | | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 579 | | RXE_COMP_MASK | RXE_SEND_MASK |
| 580 | | RXE_END_MASK, |
| 581 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_DETH_BYTES |
| 582 | + RXE_RDETH_BYTES, |
| 583 | .offset = { |
| 584 | [RXE_BTH] = 0, |
| 585 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 586 | [RXE_DETH] = RXE_BTH_BYTES |
| 587 | + RXE_RDETH_BYTES, |
| 588 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 589 | + RXE_RDETH_BYTES |
| 590 | + RXE_DETH_BYTES, |
| 591 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 592 | + RXE_RDETH_BYTES |
| 593 | + RXE_DETH_BYTES |
| 594 | + RXE_IMMDT_BYTES, |
| 595 | } |
| 596 | }, |
| 597 | [IB_OPCODE_RD_SEND_ONLY] = { |
| 598 | .name = "IB_OPCODE_RD_SEND_ONLY", |
| 599 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 600 | | RXE_REQ_MASK | RXE_COMP_MASK | RXE_RWR_MASK |
| 601 | | RXE_SEND_MASK | RXE_START_MASK | RXE_END_MASK, |
| 602 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 603 | .offset = { |
| 604 | [RXE_BTH] = 0, |
| 605 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 606 | [RXE_DETH] = RXE_BTH_BYTES |
| 607 | + RXE_RDETH_BYTES, |
| 608 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 609 | + RXE_RDETH_BYTES |
| 610 | + RXE_DETH_BYTES, |
| 611 | } |
| 612 | }, |
| 613 | [IB_OPCODE_RD_SEND_ONLY_WITH_IMMEDIATE] = { |
| 614 | .name = "IB_OPCODE_RD_SEND_ONLY_WITH_IMMEDIATE", |
| 615 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_IMMDT_MASK |
| 616 | | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 617 | | RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
| 618 | | RXE_START_MASK | RXE_END_MASK, |
| 619 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_DETH_BYTES |
| 620 | + RXE_RDETH_BYTES, |
| 621 | .offset = { |
| 622 | [RXE_BTH] = 0, |
| 623 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 624 | [RXE_DETH] = RXE_BTH_BYTES |
| 625 | + RXE_RDETH_BYTES, |
| 626 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 627 | + RXE_RDETH_BYTES |
| 628 | + RXE_DETH_BYTES, |
| 629 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 630 | + RXE_RDETH_BYTES |
| 631 | + RXE_DETH_BYTES |
| 632 | + RXE_IMMDT_BYTES, |
| 633 | } |
| 634 | }, |
| 635 | [IB_OPCODE_RD_RDMA_WRITE_FIRST] = { |
| 636 | .name = "IB_OPCODE_RD_RDMA_WRITE_FIRST", |
| 637 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_RETH_MASK |
| 638 | | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 639 | | RXE_WRITE_MASK | RXE_START_MASK, |
| 640 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES + RXE_DETH_BYTES |
| 641 | + RXE_RDETH_BYTES, |
| 642 | .offset = { |
| 643 | [RXE_BTH] = 0, |
| 644 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 645 | [RXE_DETH] = RXE_BTH_BYTES |
| 646 | + RXE_RDETH_BYTES, |
| 647 | [RXE_RETH] = RXE_BTH_BYTES |
| 648 | + RXE_RDETH_BYTES |
| 649 | + RXE_DETH_BYTES, |
| 650 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 651 | + RXE_RDETH_BYTES |
| 652 | + RXE_DETH_BYTES |
| 653 | + RXE_RETH_BYTES, |
| 654 | } |
| 655 | }, |
| 656 | [IB_OPCODE_RD_RDMA_WRITE_MIDDLE] = { |
| 657 | .name = "IB_OPCODE_RD_RDMA_WRITE_MIDDLE", |
| 658 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 659 | | RXE_REQ_MASK | RXE_WRITE_MASK |
| 660 | | RXE_MIDDLE_MASK, |
| 661 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 662 | .offset = { |
| 663 | [RXE_BTH] = 0, |
| 664 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 665 | [RXE_DETH] = RXE_BTH_BYTES |
| 666 | + RXE_RDETH_BYTES, |
| 667 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 668 | + RXE_RDETH_BYTES |
| 669 | + RXE_DETH_BYTES, |
| 670 | } |
| 671 | }, |
| 672 | [IB_OPCODE_RD_RDMA_WRITE_LAST] = { |
| 673 | .name = "IB_OPCODE_RD_RDMA_WRITE_LAST", |
| 674 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_PAYLOAD_MASK |
| 675 | | RXE_REQ_MASK | RXE_WRITE_MASK |
| 676 | | RXE_END_MASK, |
| 677 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 678 | .offset = { |
| 679 | [RXE_BTH] = 0, |
| 680 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 681 | [RXE_DETH] = RXE_BTH_BYTES |
| 682 | + RXE_RDETH_BYTES, |
| 683 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 684 | + RXE_RDETH_BYTES |
| 685 | + RXE_DETH_BYTES, |
| 686 | } |
| 687 | }, |
| 688 | [IB_OPCODE_RD_RDMA_WRITE_LAST_WITH_IMMEDIATE] = { |
| 689 | .name = "IB_OPCODE_RD_RDMA_WRITE_LAST_WITH_IMMEDIATE", |
| 690 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_IMMDT_MASK |
| 691 | | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 692 | | RXE_WRITE_MASK | RXE_COMP_MASK | RXE_RWR_MASK |
| 693 | | RXE_END_MASK, |
| 694 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_DETH_BYTES |
| 695 | + RXE_RDETH_BYTES, |
| 696 | .offset = { |
| 697 | [RXE_BTH] = 0, |
| 698 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 699 | [RXE_DETH] = RXE_BTH_BYTES |
| 700 | + RXE_RDETH_BYTES, |
| 701 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 702 | + RXE_RDETH_BYTES |
| 703 | + RXE_DETH_BYTES, |
| 704 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 705 | + RXE_RDETH_BYTES |
| 706 | + RXE_DETH_BYTES |
| 707 | + RXE_IMMDT_BYTES, |
| 708 | } |
| 709 | }, |
| 710 | [IB_OPCODE_RD_RDMA_WRITE_ONLY] = { |
| 711 | .name = "IB_OPCODE_RD_RDMA_WRITE_ONLY", |
| 712 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_RETH_MASK |
| 713 | | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 714 | | RXE_WRITE_MASK | RXE_START_MASK |
| 715 | | RXE_END_MASK, |
| 716 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES + RXE_DETH_BYTES |
| 717 | + RXE_RDETH_BYTES, |
| 718 | .offset = { |
| 719 | [RXE_BTH] = 0, |
| 720 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 721 | [RXE_DETH] = RXE_BTH_BYTES |
| 722 | + RXE_RDETH_BYTES, |
| 723 | [RXE_RETH] = RXE_BTH_BYTES |
| 724 | + RXE_RDETH_BYTES |
| 725 | + RXE_DETH_BYTES, |
| 726 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 727 | + RXE_RDETH_BYTES |
| 728 | + RXE_DETH_BYTES |
| 729 | + RXE_RETH_BYTES, |
| 730 | } |
| 731 | }, |
| 732 | [IB_OPCODE_RD_RDMA_WRITE_ONLY_WITH_IMMEDIATE] = { |
| 733 | .name = "IB_OPCODE_RD_RDMA_WRITE_ONLY_WITH_IMMEDIATE", |
| 734 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_RETH_MASK |
| 735 | | RXE_IMMDT_MASK | RXE_PAYLOAD_MASK |
| 736 | | RXE_REQ_MASK | RXE_WRITE_MASK |
| 737 | | RXE_COMP_MASK | RXE_RWR_MASK |
| 738 | | RXE_START_MASK | RXE_END_MASK, |
| 739 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_RETH_BYTES |
| 740 | + RXE_DETH_BYTES + RXE_RDETH_BYTES, |
| 741 | .offset = { |
| 742 | [RXE_BTH] = 0, |
| 743 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 744 | [RXE_DETH] = RXE_BTH_BYTES |
| 745 | + RXE_RDETH_BYTES, |
| 746 | [RXE_RETH] = RXE_BTH_BYTES |
| 747 | + RXE_RDETH_BYTES |
| 748 | + RXE_DETH_BYTES, |
| 749 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 750 | + RXE_RDETH_BYTES |
| 751 | + RXE_DETH_BYTES |
| 752 | + RXE_RETH_BYTES, |
| 753 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 754 | + RXE_RDETH_BYTES |
| 755 | + RXE_DETH_BYTES |
| 756 | + RXE_RETH_BYTES |
| 757 | + RXE_IMMDT_BYTES, |
| 758 | } |
| 759 | }, |
| 760 | [IB_OPCODE_RD_RDMA_READ_REQUEST] = { |
| 761 | .name = "IB_OPCODE_RD_RDMA_READ_REQUEST", |
| 762 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_RETH_MASK |
| 763 | | RXE_REQ_MASK | RXE_READ_MASK |
| 764 | | RXE_START_MASK | RXE_END_MASK, |
| 765 | .length = RXE_BTH_BYTES + RXE_RETH_BYTES + RXE_DETH_BYTES |
| 766 | + RXE_RDETH_BYTES, |
| 767 | .offset = { |
| 768 | [RXE_BTH] = 0, |
| 769 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 770 | [RXE_DETH] = RXE_BTH_BYTES |
| 771 | + RXE_RDETH_BYTES, |
| 772 | [RXE_RETH] = RXE_BTH_BYTES |
| 773 | + RXE_RDETH_BYTES |
| 774 | + RXE_DETH_BYTES, |
| 775 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 776 | + RXE_RETH_BYTES |
| 777 | + RXE_DETH_BYTES |
| 778 | + RXE_RDETH_BYTES, |
| 779 | } |
| 780 | }, |
| 781 | [IB_OPCODE_RD_RDMA_READ_RESPONSE_FIRST] = { |
| 782 | .name = "IB_OPCODE_RD_RDMA_READ_RESPONSE_FIRST", |
| 783 | .mask = RXE_RDETH_MASK | RXE_AETH_MASK |
| 784 | | RXE_PAYLOAD_MASK | RXE_ACK_MASK |
| 785 | | RXE_START_MASK, |
| 786 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES + RXE_RDETH_BYTES, |
| 787 | .offset = { |
| 788 | [RXE_BTH] = 0, |
| 789 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 790 | [RXE_AETH] = RXE_BTH_BYTES |
| 791 | + RXE_RDETH_BYTES, |
| 792 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 793 | + RXE_RDETH_BYTES |
| 794 | + RXE_AETH_BYTES, |
| 795 | } |
| 796 | }, |
| 797 | [IB_OPCODE_RD_RDMA_READ_RESPONSE_MIDDLE] = { |
| 798 | .name = "IB_OPCODE_RD_RDMA_READ_RESPONSE_MIDDLE", |
| 799 | .mask = RXE_RDETH_MASK | RXE_PAYLOAD_MASK | RXE_ACK_MASK |
| 800 | | RXE_MIDDLE_MASK, |
| 801 | .length = RXE_BTH_BYTES + RXE_RDETH_BYTES, |
| 802 | .offset = { |
| 803 | [RXE_BTH] = 0, |
| 804 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 805 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 806 | + RXE_RDETH_BYTES, |
| 807 | } |
| 808 | }, |
| 809 | [IB_OPCODE_RD_RDMA_READ_RESPONSE_LAST] = { |
| 810 | .name = "IB_OPCODE_RD_RDMA_READ_RESPONSE_LAST", |
| 811 | .mask = RXE_RDETH_MASK | RXE_AETH_MASK | RXE_PAYLOAD_MASK |
| 812 | | RXE_ACK_MASK | RXE_END_MASK, |
| 813 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES + RXE_RDETH_BYTES, |
| 814 | .offset = { |
| 815 | [RXE_BTH] = 0, |
| 816 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 817 | [RXE_AETH] = RXE_BTH_BYTES |
| 818 | + RXE_RDETH_BYTES, |
| 819 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 820 | + RXE_RDETH_BYTES |
| 821 | + RXE_AETH_BYTES, |
| 822 | } |
| 823 | }, |
| 824 | [IB_OPCODE_RD_RDMA_READ_RESPONSE_ONLY] = { |
| 825 | .name = "IB_OPCODE_RD_RDMA_READ_RESPONSE_ONLY", |
| 826 | .mask = RXE_RDETH_MASK | RXE_AETH_MASK | RXE_PAYLOAD_MASK |
| 827 | | RXE_ACK_MASK | RXE_START_MASK | RXE_END_MASK, |
| 828 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES + RXE_RDETH_BYTES, |
| 829 | .offset = { |
| 830 | [RXE_BTH] = 0, |
| 831 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 832 | [RXE_AETH] = RXE_BTH_BYTES |
| 833 | + RXE_RDETH_BYTES, |
| 834 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 835 | + RXE_RDETH_BYTES |
| 836 | + RXE_AETH_BYTES, |
| 837 | } |
| 838 | }, |
| 839 | [IB_OPCODE_RD_ACKNOWLEDGE] = { |
| 840 | .name = "IB_OPCODE_RD_ACKNOWLEDGE", |
| 841 | .mask = RXE_RDETH_MASK | RXE_AETH_MASK | RXE_ACK_MASK |
| 842 | | RXE_START_MASK | RXE_END_MASK, |
| 843 | .length = RXE_BTH_BYTES + RXE_AETH_BYTES + RXE_RDETH_BYTES, |
| 844 | .offset = { |
| 845 | [RXE_BTH] = 0, |
| 846 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 847 | [RXE_AETH] = RXE_BTH_BYTES |
| 848 | + RXE_RDETH_BYTES, |
| 849 | } |
| 850 | }, |
| 851 | [IB_OPCODE_RD_ATOMIC_ACKNOWLEDGE] = { |
| 852 | .name = "IB_OPCODE_RD_ATOMIC_ACKNOWLEDGE", |
| 853 | .mask = RXE_RDETH_MASK | RXE_AETH_MASK | RXE_ATMACK_MASK |
| 854 | | RXE_ACK_MASK | RXE_START_MASK | RXE_END_MASK, |
| 855 | .length = RXE_BTH_BYTES + RXE_ATMACK_BYTES + RXE_AETH_BYTES |
| 856 | + RXE_RDETH_BYTES, |
| 857 | .offset = { |
| 858 | [RXE_BTH] = 0, |
| 859 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 860 | [RXE_AETH] = RXE_BTH_BYTES |
| 861 | + RXE_RDETH_BYTES, |
| 862 | [RXE_ATMACK] = RXE_BTH_BYTES |
| 863 | + RXE_RDETH_BYTES |
| 864 | + RXE_AETH_BYTES, |
| 865 | } |
| 866 | }, |
| 867 | [IB_OPCODE_RD_COMPARE_SWAP] = { |
| 868 | .name = "RD_COMPARE_SWAP", |
| 869 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_ATMETH_MASK |
| 870 | | RXE_REQ_MASK | RXE_ATOMIC_MASK |
| 871 | | RXE_START_MASK | RXE_END_MASK, |
| 872 | .length = RXE_BTH_BYTES + RXE_ATMETH_BYTES + RXE_DETH_BYTES |
| 873 | + RXE_RDETH_BYTES, |
| 874 | .offset = { |
| 875 | [RXE_BTH] = 0, |
| 876 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 877 | [RXE_DETH] = RXE_BTH_BYTES |
| 878 | + RXE_RDETH_BYTES, |
| 879 | [RXE_ATMETH] = RXE_BTH_BYTES |
| 880 | + RXE_RDETH_BYTES |
| 881 | + RXE_DETH_BYTES, |
| 882 | [RXE_PAYLOAD] = RXE_BTH_BYTES + |
| 883 | + RXE_ATMETH_BYTES |
| 884 | + RXE_DETH_BYTES + |
| 885 | + RXE_RDETH_BYTES, |
| 886 | } |
| 887 | }, |
| 888 | [IB_OPCODE_RD_FETCH_ADD] = { |
| 889 | .name = "IB_OPCODE_RD_FETCH_ADD", |
| 890 | .mask = RXE_RDETH_MASK | RXE_DETH_MASK | RXE_ATMETH_MASK |
| 891 | | RXE_REQ_MASK | RXE_ATOMIC_MASK |
| 892 | | RXE_START_MASK | RXE_END_MASK, |
| 893 | .length = RXE_BTH_BYTES + RXE_ATMETH_BYTES + RXE_DETH_BYTES |
| 894 | + RXE_RDETH_BYTES, |
| 895 | .offset = { |
| 896 | [RXE_BTH] = 0, |
| 897 | [RXE_RDETH] = RXE_BTH_BYTES, |
| 898 | [RXE_DETH] = RXE_BTH_BYTES |
| 899 | + RXE_RDETH_BYTES, |
| 900 | [RXE_ATMETH] = RXE_BTH_BYTES |
| 901 | + RXE_RDETH_BYTES |
| 902 | + RXE_DETH_BYTES, |
| 903 | [RXE_PAYLOAD] = RXE_BTH_BYTES + |
| 904 | + RXE_ATMETH_BYTES |
| 905 | + RXE_DETH_BYTES + |
| 906 | + RXE_RDETH_BYTES, |
| 907 | } |
| 908 | }, |
| 909 | |
| 910 | /* UD */ |
| 911 | [IB_OPCODE_UD_SEND_ONLY] = { |
| 912 | .name = "IB_OPCODE_UD_SEND_ONLY", |
| 913 | .mask = RXE_DETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK |
| 914 | | RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK |
| 915 | | RXE_START_MASK | RXE_END_MASK, |
| 916 | .length = RXE_BTH_BYTES + RXE_DETH_BYTES, |
| 917 | .offset = { |
| 918 | [RXE_BTH] = 0, |
| 919 | [RXE_DETH] = RXE_BTH_BYTES, |
| 920 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 921 | + RXE_DETH_BYTES, |
| 922 | } |
| 923 | }, |
| 924 | [IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE] = { |
| 925 | .name = "IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE", |
| 926 | .mask = RXE_DETH_MASK | RXE_IMMDT_MASK | RXE_PAYLOAD_MASK |
| 927 | | RXE_REQ_MASK | RXE_COMP_MASK | RXE_RWR_MASK |
| 928 | | RXE_SEND_MASK | RXE_START_MASK | RXE_END_MASK, |
| 929 | .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES + RXE_DETH_BYTES, |
| 930 | .offset = { |
| 931 | [RXE_BTH] = 0, |
| 932 | [RXE_DETH] = RXE_BTH_BYTES, |
| 933 | [RXE_IMMDT] = RXE_BTH_BYTES |
| 934 | + RXE_DETH_BYTES, |
| 935 | [RXE_PAYLOAD] = RXE_BTH_BYTES |
| 936 | + RXE_DETH_BYTES |
| 937 | + RXE_IMMDT_BYTES, |
| 938 | } |
| 939 | }, |
| 940 | |
| 941 | }; |