rxe_opcode.c 27 KB

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