tcb.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. /*
  2. * Copyright (c) 2007 Chelsio, Inc. All rights reserved.
  3. *
  4. * This software is available to you under a choice of one of two
  5. * licenses. You may choose to be licensed under the terms of the GNU
  6. * General Public License (GPL) Version 2, available from the file
  7. * COPYING in the main directory of this source tree, or the
  8. * OpenIB.org BSD license below:
  9. *
  10. * Redistribution and use in source and binary forms, with or
  11. * without modification, are permitted provided that the following
  12. * conditions are met:
  13. *
  14. * - Redistributions of source code must retain the above
  15. * copyright notice, this list of conditions and the following
  16. * disclaimer.
  17. *
  18. * - Redistributions in binary form must reproduce the above
  19. * copyright notice, this list of conditions and the following
  20. * disclaimer in the documentation and/or other materials
  21. * provided with the distribution.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  27. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  28. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  29. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30. * SOFTWARE.
  31. */
  32. #ifndef _TCB_DEFS_H
  33. #define _TCB_DEFS_H
  34. #define W_TCB_T_STATE 0
  35. #define S_TCB_T_STATE 0
  36. #define M_TCB_T_STATE 0xfULL
  37. #define V_TCB_T_STATE(x) ((x) << S_TCB_T_STATE)
  38. #define W_TCB_TIMER 0
  39. #define S_TCB_TIMER 4
  40. #define M_TCB_TIMER 0x1ULL
  41. #define V_TCB_TIMER(x) ((x) << S_TCB_TIMER)
  42. #define W_TCB_DACK_TIMER 0
  43. #define S_TCB_DACK_TIMER 5
  44. #define M_TCB_DACK_TIMER 0x1ULL
  45. #define V_TCB_DACK_TIMER(x) ((x) << S_TCB_DACK_TIMER)
  46. #define W_TCB_DEL_FLAG 0
  47. #define S_TCB_DEL_FLAG 6
  48. #define M_TCB_DEL_FLAG 0x1ULL
  49. #define V_TCB_DEL_FLAG(x) ((x) << S_TCB_DEL_FLAG)
  50. #define W_TCB_L2T_IX 0
  51. #define S_TCB_L2T_IX 7
  52. #define M_TCB_L2T_IX 0x7ffULL
  53. #define V_TCB_L2T_IX(x) ((x) << S_TCB_L2T_IX)
  54. #define W_TCB_SMAC_SEL 0
  55. #define S_TCB_SMAC_SEL 18
  56. #define M_TCB_SMAC_SEL 0x3ULL
  57. #define V_TCB_SMAC_SEL(x) ((x) << S_TCB_SMAC_SEL)
  58. #define W_TCB_TOS 0
  59. #define S_TCB_TOS 20
  60. #define M_TCB_TOS 0x3fULL
  61. #define V_TCB_TOS(x) ((x) << S_TCB_TOS)
  62. #define W_TCB_MAX_RT 0
  63. #define S_TCB_MAX_RT 26
  64. #define M_TCB_MAX_RT 0xfULL
  65. #define V_TCB_MAX_RT(x) ((x) << S_TCB_MAX_RT)
  66. #define W_TCB_T_RXTSHIFT 0
  67. #define S_TCB_T_RXTSHIFT 30
  68. #define M_TCB_T_RXTSHIFT 0xfULL
  69. #define V_TCB_T_RXTSHIFT(x) ((x) << S_TCB_T_RXTSHIFT)
  70. #define W_TCB_T_DUPACKS 1
  71. #define S_TCB_T_DUPACKS 2
  72. #define M_TCB_T_DUPACKS 0xfULL
  73. #define V_TCB_T_DUPACKS(x) ((x) << S_TCB_T_DUPACKS)
  74. #define W_TCB_T_MAXSEG 1
  75. #define S_TCB_T_MAXSEG 6
  76. #define M_TCB_T_MAXSEG 0xfULL
  77. #define V_TCB_T_MAXSEG(x) ((x) << S_TCB_T_MAXSEG)
  78. #define W_TCB_T_FLAGS1 1
  79. #define S_TCB_T_FLAGS1 10
  80. #define M_TCB_T_FLAGS1 0xffffffffULL
  81. #define V_TCB_T_FLAGS1(x) ((x) << S_TCB_T_FLAGS1)
  82. #define W_TCB_T_MIGRATION 1
  83. #define S_TCB_T_MIGRATION 20
  84. #define M_TCB_T_MIGRATION 0x1ULL
  85. #define V_TCB_T_MIGRATION(x) ((x) << S_TCB_T_MIGRATION)
  86. #define W_TCB_T_FLAGS2 2
  87. #define S_TCB_T_FLAGS2 10
  88. #define M_TCB_T_FLAGS2 0x7fULL
  89. #define V_TCB_T_FLAGS2(x) ((x) << S_TCB_T_FLAGS2)
  90. #define W_TCB_SND_SCALE 2
  91. #define S_TCB_SND_SCALE 17
  92. #define M_TCB_SND_SCALE 0xfULL
  93. #define V_TCB_SND_SCALE(x) ((x) << S_TCB_SND_SCALE)
  94. #define W_TCB_RCV_SCALE 2
  95. #define S_TCB_RCV_SCALE 21
  96. #define M_TCB_RCV_SCALE 0xfULL
  97. #define V_TCB_RCV_SCALE(x) ((x) << S_TCB_RCV_SCALE)
  98. #define W_TCB_SND_UNA_RAW 2
  99. #define S_TCB_SND_UNA_RAW 25
  100. #define M_TCB_SND_UNA_RAW 0x7ffffffULL
  101. #define V_TCB_SND_UNA_RAW(x) ((x) << S_TCB_SND_UNA_RAW)
  102. #define W_TCB_SND_NXT_RAW 3
  103. #define S_TCB_SND_NXT_RAW 20
  104. #define M_TCB_SND_NXT_RAW 0x7ffffffULL
  105. #define V_TCB_SND_NXT_RAW(x) ((x) << S_TCB_SND_NXT_RAW)
  106. #define W_TCB_RCV_NXT 4
  107. #define S_TCB_RCV_NXT 15
  108. #define M_TCB_RCV_NXT 0xffffffffULL
  109. #define V_TCB_RCV_NXT(x) ((x) << S_TCB_RCV_NXT)
  110. #define W_TCB_RCV_ADV 5
  111. #define S_TCB_RCV_ADV 15
  112. #define M_TCB_RCV_ADV 0xffffULL
  113. #define V_TCB_RCV_ADV(x) ((x) << S_TCB_RCV_ADV)
  114. #define W_TCB_SND_MAX_RAW 5
  115. #define S_TCB_SND_MAX_RAW 31
  116. #define M_TCB_SND_MAX_RAW 0x7ffffffULL
  117. #define V_TCB_SND_MAX_RAW(x) ((x) << S_TCB_SND_MAX_RAW)
  118. #define W_TCB_SND_CWND 6
  119. #define S_TCB_SND_CWND 26
  120. #define M_TCB_SND_CWND 0x7ffffffULL
  121. #define V_TCB_SND_CWND(x) ((x) << S_TCB_SND_CWND)
  122. #define W_TCB_SND_SSTHRESH 7
  123. #define S_TCB_SND_SSTHRESH 21
  124. #define M_TCB_SND_SSTHRESH 0x7ffffffULL
  125. #define V_TCB_SND_SSTHRESH(x) ((x) << S_TCB_SND_SSTHRESH)
  126. #define W_TCB_T_RTT_TS_RECENT_AGE 8
  127. #define S_TCB_T_RTT_TS_RECENT_AGE 16
  128. #define M_TCB_T_RTT_TS_RECENT_AGE 0xffffffffULL
  129. #define V_TCB_T_RTT_TS_RECENT_AGE(x) ((x) << S_TCB_T_RTT_TS_RECENT_AGE)
  130. #define W_TCB_T_RTSEQ_RECENT 9
  131. #define S_TCB_T_RTSEQ_RECENT 16
  132. #define M_TCB_T_RTSEQ_RECENT 0xffffffffULL
  133. #define V_TCB_T_RTSEQ_RECENT(x) ((x) << S_TCB_T_RTSEQ_RECENT)
  134. #define W_TCB_T_SRTT 10
  135. #define S_TCB_T_SRTT 16
  136. #define M_TCB_T_SRTT 0xffffULL
  137. #define V_TCB_T_SRTT(x) ((x) << S_TCB_T_SRTT)
  138. #define W_TCB_T_RTTVAR 11
  139. #define S_TCB_T_RTTVAR 0
  140. #define M_TCB_T_RTTVAR 0xffffULL
  141. #define V_TCB_T_RTTVAR(x) ((x) << S_TCB_T_RTTVAR)
  142. #define W_TCB_TS_LAST_ACK_SENT_RAW 11
  143. #define S_TCB_TS_LAST_ACK_SENT_RAW 16
  144. #define M_TCB_TS_LAST_ACK_SENT_RAW 0x7ffffffULL
  145. #define V_TCB_TS_LAST_ACK_SENT_RAW(x) ((x) << S_TCB_TS_LAST_ACK_SENT_RAW)
  146. #define W_TCB_DIP 12
  147. #define S_TCB_DIP 11
  148. #define M_TCB_DIP 0xffffffffULL
  149. #define V_TCB_DIP(x) ((x) << S_TCB_DIP)
  150. #define W_TCB_SIP 13
  151. #define S_TCB_SIP 11
  152. #define M_TCB_SIP 0xffffffffULL
  153. #define V_TCB_SIP(x) ((x) << S_TCB_SIP)
  154. #define W_TCB_DP 14
  155. #define S_TCB_DP 11
  156. #define M_TCB_DP 0xffffULL
  157. #define V_TCB_DP(x) ((x) << S_TCB_DP)
  158. #define W_TCB_SP 14
  159. #define S_TCB_SP 27
  160. #define M_TCB_SP 0xffffULL
  161. #define V_TCB_SP(x) ((x) << S_TCB_SP)
  162. #define W_TCB_TIMESTAMP 15
  163. #define S_TCB_TIMESTAMP 11
  164. #define M_TCB_TIMESTAMP 0xffffffffULL
  165. #define V_TCB_TIMESTAMP(x) ((x) << S_TCB_TIMESTAMP)
  166. #define W_TCB_TIMESTAMP_OFFSET 16
  167. #define S_TCB_TIMESTAMP_OFFSET 11
  168. #define M_TCB_TIMESTAMP_OFFSET 0xfULL
  169. #define V_TCB_TIMESTAMP_OFFSET(x) ((x) << S_TCB_TIMESTAMP_OFFSET)
  170. #define W_TCB_TX_MAX 16
  171. #define S_TCB_TX_MAX 15
  172. #define M_TCB_TX_MAX 0xffffffffULL
  173. #define V_TCB_TX_MAX(x) ((x) << S_TCB_TX_MAX)
  174. #define W_TCB_TX_HDR_PTR_RAW 17
  175. #define S_TCB_TX_HDR_PTR_RAW 15
  176. #define M_TCB_TX_HDR_PTR_RAW 0x1ffffULL
  177. #define V_TCB_TX_HDR_PTR_RAW(x) ((x) << S_TCB_TX_HDR_PTR_RAW)
  178. #define W_TCB_TX_LAST_PTR_RAW 18
  179. #define S_TCB_TX_LAST_PTR_RAW 0
  180. #define M_TCB_TX_LAST_PTR_RAW 0x1ffffULL
  181. #define V_TCB_TX_LAST_PTR_RAW(x) ((x) << S_TCB_TX_LAST_PTR_RAW)
  182. #define W_TCB_TX_COMPACT 18
  183. #define S_TCB_TX_COMPACT 17
  184. #define M_TCB_TX_COMPACT 0x1ULL
  185. #define V_TCB_TX_COMPACT(x) ((x) << S_TCB_TX_COMPACT)
  186. #define W_TCB_RX_COMPACT 18
  187. #define S_TCB_RX_COMPACT 18
  188. #define M_TCB_RX_COMPACT 0x1ULL
  189. #define V_TCB_RX_COMPACT(x) ((x) << S_TCB_RX_COMPACT)
  190. #define W_TCB_RCV_WND 18
  191. #define S_TCB_RCV_WND 19
  192. #define M_TCB_RCV_WND 0x7ffffffULL
  193. #define V_TCB_RCV_WND(x) ((x) << S_TCB_RCV_WND)
  194. #define W_TCB_RX_HDR_OFFSET 19
  195. #define S_TCB_RX_HDR_OFFSET 14
  196. #define M_TCB_RX_HDR_OFFSET 0x7ffffffULL
  197. #define V_TCB_RX_HDR_OFFSET(x) ((x) << S_TCB_RX_HDR_OFFSET)
  198. #define W_TCB_RX_FRAG0_START_IDX_RAW 20
  199. #define S_TCB_RX_FRAG0_START_IDX_RAW 9
  200. #define M_TCB_RX_FRAG0_START_IDX_RAW 0x7ffffffULL
  201. #define V_TCB_RX_FRAG0_START_IDX_RAW(x) ((x) << S_TCB_RX_FRAG0_START_IDX_RAW)
  202. #define W_TCB_RX_FRAG1_START_IDX_OFFSET 21
  203. #define S_TCB_RX_FRAG1_START_IDX_OFFSET 4
  204. #define M_TCB_RX_FRAG1_START_IDX_OFFSET 0x7ffffffULL
  205. #define V_TCB_RX_FRAG1_START_IDX_OFFSET(x) ((x) << S_TCB_RX_FRAG1_START_IDX_OFFSET)
  206. #define W_TCB_RX_FRAG0_LEN 21
  207. #define S_TCB_RX_FRAG0_LEN 31
  208. #define M_TCB_RX_FRAG0_LEN 0x7ffffffULL
  209. #define V_TCB_RX_FRAG0_LEN(x) ((x) << S_TCB_RX_FRAG0_LEN)
  210. #define W_TCB_RX_FRAG1_LEN 22
  211. #define S_TCB_RX_FRAG1_LEN 26
  212. #define M_TCB_RX_FRAG1_LEN 0x7ffffffULL
  213. #define V_TCB_RX_FRAG1_LEN(x) ((x) << S_TCB_RX_FRAG1_LEN)
  214. #define W_TCB_NEWRENO_RECOVER 23
  215. #define S_TCB_NEWRENO_RECOVER 21
  216. #define M_TCB_NEWRENO_RECOVER 0x7ffffffULL
  217. #define V_TCB_NEWRENO_RECOVER(x) ((x) << S_TCB_NEWRENO_RECOVER)
  218. #define W_TCB_PDU_HAVE_LEN 24
  219. #define S_TCB_PDU_HAVE_LEN 16
  220. #define M_TCB_PDU_HAVE_LEN 0x1ULL
  221. #define V_TCB_PDU_HAVE_LEN(x) ((x) << S_TCB_PDU_HAVE_LEN)
  222. #define W_TCB_PDU_LEN 24
  223. #define S_TCB_PDU_LEN 17
  224. #define M_TCB_PDU_LEN 0xffffULL
  225. #define V_TCB_PDU_LEN(x) ((x) << S_TCB_PDU_LEN)
  226. #define W_TCB_RX_QUIESCE 25
  227. #define S_TCB_RX_QUIESCE 1
  228. #define M_TCB_RX_QUIESCE 0x1ULL
  229. #define V_TCB_RX_QUIESCE(x) ((x) << S_TCB_RX_QUIESCE)
  230. #define W_TCB_RX_PTR_RAW 25
  231. #define S_TCB_RX_PTR_RAW 2
  232. #define M_TCB_RX_PTR_RAW 0x1ffffULL
  233. #define V_TCB_RX_PTR_RAW(x) ((x) << S_TCB_RX_PTR_RAW)
  234. #define W_TCB_CPU_NO 25
  235. #define S_TCB_CPU_NO 19
  236. #define M_TCB_CPU_NO 0x7fULL
  237. #define V_TCB_CPU_NO(x) ((x) << S_TCB_CPU_NO)
  238. #define W_TCB_ULP_TYPE 25
  239. #define S_TCB_ULP_TYPE 26
  240. #define M_TCB_ULP_TYPE 0xfULL
  241. #define V_TCB_ULP_TYPE(x) ((x) << S_TCB_ULP_TYPE)
  242. #define W_TCB_RX_FRAG1_PTR_RAW 25
  243. #define S_TCB_RX_FRAG1_PTR_RAW 30
  244. #define M_TCB_RX_FRAG1_PTR_RAW 0x1ffffULL
  245. #define V_TCB_RX_FRAG1_PTR_RAW(x) ((x) << S_TCB_RX_FRAG1_PTR_RAW)
  246. #define W_TCB_RX_FRAG2_START_IDX_OFFSET_RAW 26
  247. #define S_TCB_RX_FRAG2_START_IDX_OFFSET_RAW 15
  248. #define M_TCB_RX_FRAG2_START_IDX_OFFSET_RAW 0x7ffffffULL
  249. #define V_TCB_RX_FRAG2_START_IDX_OFFSET_RAW(x) ((x) << S_TCB_RX_FRAG2_START_IDX_OFFSET_RAW)
  250. #define W_TCB_RX_FRAG2_PTR_RAW 27
  251. #define S_TCB_RX_FRAG2_PTR_RAW 10
  252. #define M_TCB_RX_FRAG2_PTR_RAW 0x1ffffULL
  253. #define V_TCB_RX_FRAG2_PTR_RAW(x) ((x) << S_TCB_RX_FRAG2_PTR_RAW)
  254. #define W_TCB_RX_FRAG2_LEN_RAW 27
  255. #define S_TCB_RX_FRAG2_LEN_RAW 27
  256. #define M_TCB_RX_FRAG2_LEN_RAW 0x7ffffffULL
  257. #define V_TCB_RX_FRAG2_LEN_RAW(x) ((x) << S_TCB_RX_FRAG2_LEN_RAW)
  258. #define W_TCB_RX_FRAG3_PTR_RAW 28
  259. #define S_TCB_RX_FRAG3_PTR_RAW 22
  260. #define M_TCB_RX_FRAG3_PTR_RAW 0x1ffffULL
  261. #define V_TCB_RX_FRAG3_PTR_RAW(x) ((x) << S_TCB_RX_FRAG3_PTR_RAW)
  262. #define W_TCB_RX_FRAG3_LEN_RAW 29
  263. #define S_TCB_RX_FRAG3_LEN_RAW 7
  264. #define M_TCB_RX_FRAG3_LEN_RAW 0x7ffffffULL
  265. #define V_TCB_RX_FRAG3_LEN_RAW(x) ((x) << S_TCB_RX_FRAG3_LEN_RAW)
  266. #define W_TCB_RX_FRAG3_START_IDX_OFFSET_RAW 30
  267. #define S_TCB_RX_FRAG3_START_IDX_OFFSET_RAW 2
  268. #define M_TCB_RX_FRAG3_START_IDX_OFFSET_RAW 0x7ffffffULL
  269. #define V_TCB_RX_FRAG3_START_IDX_OFFSET_RAW(x) ((x) << S_TCB_RX_FRAG3_START_IDX_OFFSET_RAW)
  270. #define W_TCB_PDU_HDR_LEN 30
  271. #define S_TCB_PDU_HDR_LEN 29
  272. #define M_TCB_PDU_HDR_LEN 0xffULL
  273. #define V_TCB_PDU_HDR_LEN(x) ((x) << S_TCB_PDU_HDR_LEN)
  274. #define W_TCB_SLUSH1 31
  275. #define S_TCB_SLUSH1 5
  276. #define M_TCB_SLUSH1 0x7ffffULL
  277. #define V_TCB_SLUSH1(x) ((x) << S_TCB_SLUSH1)
  278. #define W_TCB_ULP_RAW 31
  279. #define S_TCB_ULP_RAW 24
  280. #define M_TCB_ULP_RAW 0xffULL
  281. #define V_TCB_ULP_RAW(x) ((x) << S_TCB_ULP_RAW)
  282. #define W_TCB_DDP_RDMAP_VERSION 25
  283. #define S_TCB_DDP_RDMAP_VERSION 30
  284. #define M_TCB_DDP_RDMAP_VERSION 0x1ULL
  285. #define V_TCB_DDP_RDMAP_VERSION(x) ((x) << S_TCB_DDP_RDMAP_VERSION)
  286. #define W_TCB_MARKER_ENABLE_RX 25
  287. #define S_TCB_MARKER_ENABLE_RX 31
  288. #define M_TCB_MARKER_ENABLE_RX 0x1ULL
  289. #define V_TCB_MARKER_ENABLE_RX(x) ((x) << S_TCB_MARKER_ENABLE_RX)
  290. #define W_TCB_MARKER_ENABLE_TX 26
  291. #define S_TCB_MARKER_ENABLE_TX 0
  292. #define M_TCB_MARKER_ENABLE_TX 0x1ULL
  293. #define V_TCB_MARKER_ENABLE_TX(x) ((x) << S_TCB_MARKER_ENABLE_TX)
  294. #define W_TCB_CRC_ENABLE 26
  295. #define S_TCB_CRC_ENABLE 1
  296. #define M_TCB_CRC_ENABLE 0x1ULL
  297. #define V_TCB_CRC_ENABLE(x) ((x) << S_TCB_CRC_ENABLE)
  298. #define W_TCB_IRS_ULP 26
  299. #define S_TCB_IRS_ULP 2
  300. #define M_TCB_IRS_ULP 0x1ffULL
  301. #define V_TCB_IRS_ULP(x) ((x) << S_TCB_IRS_ULP)
  302. #define W_TCB_ISS_ULP 26
  303. #define S_TCB_ISS_ULP 11
  304. #define M_TCB_ISS_ULP 0x1ffULL
  305. #define V_TCB_ISS_ULP(x) ((x) << S_TCB_ISS_ULP)
  306. #define W_TCB_TX_PDU_LEN 26
  307. #define S_TCB_TX_PDU_LEN 20
  308. #define M_TCB_TX_PDU_LEN 0x3fffULL
  309. #define V_TCB_TX_PDU_LEN(x) ((x) << S_TCB_TX_PDU_LEN)
  310. #define W_TCB_TX_PDU_OUT 27
  311. #define S_TCB_TX_PDU_OUT 2
  312. #define M_TCB_TX_PDU_OUT 0x1ULL
  313. #define V_TCB_TX_PDU_OUT(x) ((x) << S_TCB_TX_PDU_OUT)
  314. #define W_TCB_CQ_IDX_SQ 27
  315. #define S_TCB_CQ_IDX_SQ 3
  316. #define M_TCB_CQ_IDX_SQ 0xffffULL
  317. #define V_TCB_CQ_IDX_SQ(x) ((x) << S_TCB_CQ_IDX_SQ)
  318. #define W_TCB_CQ_IDX_RQ 27
  319. #define S_TCB_CQ_IDX_RQ 19
  320. #define M_TCB_CQ_IDX_RQ 0xffffULL
  321. #define V_TCB_CQ_IDX_RQ(x) ((x) << S_TCB_CQ_IDX_RQ)
  322. #define W_TCB_QP_ID 28
  323. #define S_TCB_QP_ID 3
  324. #define M_TCB_QP_ID 0xffffULL
  325. #define V_TCB_QP_ID(x) ((x) << S_TCB_QP_ID)
  326. #define W_TCB_PD_ID 28
  327. #define S_TCB_PD_ID 19
  328. #define M_TCB_PD_ID 0xffffULL
  329. #define V_TCB_PD_ID(x) ((x) << S_TCB_PD_ID)
  330. #define W_TCB_STAG 29
  331. #define S_TCB_STAG 3
  332. #define M_TCB_STAG 0xffffffffULL
  333. #define V_TCB_STAG(x) ((x) << S_TCB_STAG)
  334. #define W_TCB_RQ_START 30
  335. #define S_TCB_RQ_START 3
  336. #define M_TCB_RQ_START 0x3ffffffULL
  337. #define V_TCB_RQ_START(x) ((x) << S_TCB_RQ_START)
  338. #define W_TCB_RQ_MSN 30
  339. #define S_TCB_RQ_MSN 29
  340. #define M_TCB_RQ_MSN 0x3ffULL
  341. #define V_TCB_RQ_MSN(x) ((x) << S_TCB_RQ_MSN)
  342. #define W_TCB_RQ_MAX_OFFSET 31
  343. #define S_TCB_RQ_MAX_OFFSET 7
  344. #define M_TCB_RQ_MAX_OFFSET 0xfULL
  345. #define V_TCB_RQ_MAX_OFFSET(x) ((x) << S_TCB_RQ_MAX_OFFSET)
  346. #define W_TCB_RQ_WRITE_PTR 31
  347. #define S_TCB_RQ_WRITE_PTR 11
  348. #define M_TCB_RQ_WRITE_PTR 0x3ffULL
  349. #define V_TCB_RQ_WRITE_PTR(x) ((x) << S_TCB_RQ_WRITE_PTR)
  350. #define W_TCB_INB_WRITE_PERM 31
  351. #define S_TCB_INB_WRITE_PERM 21
  352. #define M_TCB_INB_WRITE_PERM 0x1ULL
  353. #define V_TCB_INB_WRITE_PERM(x) ((x) << S_TCB_INB_WRITE_PERM)
  354. #define W_TCB_INB_READ_PERM 31
  355. #define S_TCB_INB_READ_PERM 22
  356. #define M_TCB_INB_READ_PERM 0x1ULL
  357. #define V_TCB_INB_READ_PERM(x) ((x) << S_TCB_INB_READ_PERM)
  358. #define W_TCB_ORD_L_BIT_VLD 31
  359. #define S_TCB_ORD_L_BIT_VLD 23
  360. #define M_TCB_ORD_L_BIT_VLD 0x1ULL
  361. #define V_TCB_ORD_L_BIT_VLD(x) ((x) << S_TCB_ORD_L_BIT_VLD)
  362. #define W_TCB_RDMAP_OPCODE 31
  363. #define S_TCB_RDMAP_OPCODE 24
  364. #define M_TCB_RDMAP_OPCODE 0xfULL
  365. #define V_TCB_RDMAP_OPCODE(x) ((x) << S_TCB_RDMAP_OPCODE)
  366. #define W_TCB_TX_FLUSH 31
  367. #define S_TCB_TX_FLUSH 28
  368. #define M_TCB_TX_FLUSH 0x1ULL
  369. #define V_TCB_TX_FLUSH(x) ((x) << S_TCB_TX_FLUSH)
  370. #define W_TCB_TX_OOS_RXMT 31
  371. #define S_TCB_TX_OOS_RXMT 29
  372. #define M_TCB_TX_OOS_RXMT 0x1ULL
  373. #define V_TCB_TX_OOS_RXMT(x) ((x) << S_TCB_TX_OOS_RXMT)
  374. #define W_TCB_TX_OOS_TXMT 31
  375. #define S_TCB_TX_OOS_TXMT 30
  376. #define M_TCB_TX_OOS_TXMT 0x1ULL
  377. #define V_TCB_TX_OOS_TXMT(x) ((x) << S_TCB_TX_OOS_TXMT)
  378. #define W_TCB_SLUSH_AUX2 31
  379. #define S_TCB_SLUSH_AUX2 31
  380. #define M_TCB_SLUSH_AUX2 0x1ULL
  381. #define V_TCB_SLUSH_AUX2(x) ((x) << S_TCB_SLUSH_AUX2)
  382. #define W_TCB_RX_FRAG1_PTR_RAW2 25
  383. #define S_TCB_RX_FRAG1_PTR_RAW2 30
  384. #define M_TCB_RX_FRAG1_PTR_RAW2 0x1ffffULL
  385. #define V_TCB_RX_FRAG1_PTR_RAW2(x) ((x) << S_TCB_RX_FRAG1_PTR_RAW2)
  386. #define W_TCB_RX_DDP_FLAGS 26
  387. #define S_TCB_RX_DDP_FLAGS 15
  388. #define M_TCB_RX_DDP_FLAGS 0x3ffULL
  389. #define V_TCB_RX_DDP_FLAGS(x) ((x) << S_TCB_RX_DDP_FLAGS)
  390. #define W_TCB_SLUSH_AUX3 26
  391. #define S_TCB_SLUSH_AUX3 31
  392. #define M_TCB_SLUSH_AUX3 0x1ffULL
  393. #define V_TCB_SLUSH_AUX3(x) ((x) << S_TCB_SLUSH_AUX3)
  394. #define W_TCB_RX_DDP_BUF0_OFFSET 27
  395. #define S_TCB_RX_DDP_BUF0_OFFSET 8
  396. #define M_TCB_RX_DDP_BUF0_OFFSET 0x3fffffULL
  397. #define V_TCB_RX_DDP_BUF0_OFFSET(x) ((x) << S_TCB_RX_DDP_BUF0_OFFSET)
  398. #define W_TCB_RX_DDP_BUF0_LEN 27
  399. #define S_TCB_RX_DDP_BUF0_LEN 30
  400. #define M_TCB_RX_DDP_BUF0_LEN 0x3fffffULL
  401. #define V_TCB_RX_DDP_BUF0_LEN(x) ((x) << S_TCB_RX_DDP_BUF0_LEN)
  402. #define W_TCB_RX_DDP_BUF1_OFFSET 28
  403. #define S_TCB_RX_DDP_BUF1_OFFSET 20
  404. #define M_TCB_RX_DDP_BUF1_OFFSET 0x3fffffULL
  405. #define V_TCB_RX_DDP_BUF1_OFFSET(x) ((x) << S_TCB_RX_DDP_BUF1_OFFSET)
  406. #define W_TCB_RX_DDP_BUF1_LEN 29
  407. #define S_TCB_RX_DDP_BUF1_LEN 10
  408. #define M_TCB_RX_DDP_BUF1_LEN 0x3fffffULL
  409. #define V_TCB_RX_DDP_BUF1_LEN(x) ((x) << S_TCB_RX_DDP_BUF1_LEN)
  410. #define W_TCB_RX_DDP_BUF0_TAG 30
  411. #define S_TCB_RX_DDP_BUF0_TAG 0
  412. #define M_TCB_RX_DDP_BUF0_TAG 0xffffffffULL
  413. #define V_TCB_RX_DDP_BUF0_TAG(x) ((x) << S_TCB_RX_DDP_BUF0_TAG)
  414. #define W_TCB_RX_DDP_BUF1_TAG 31
  415. #define S_TCB_RX_DDP_BUF1_TAG 0
  416. #define M_TCB_RX_DDP_BUF1_TAG 0xffffffffULL
  417. #define V_TCB_RX_DDP_BUF1_TAG(x) ((x) << S_TCB_RX_DDP_BUF1_TAG)
  418. #define S_TF_DACK 10
  419. #define V_TF_DACK(x) ((x) << S_TF_DACK)
  420. #define S_TF_NAGLE 11
  421. #define V_TF_NAGLE(x) ((x) << S_TF_NAGLE)
  422. #define S_TF_RECV_SCALE 12
  423. #define V_TF_RECV_SCALE(x) ((x) << S_TF_RECV_SCALE)
  424. #define S_TF_RECV_TSTMP 13
  425. #define V_TF_RECV_TSTMP(x) ((x) << S_TF_RECV_TSTMP)
  426. #define S_TF_RECV_SACK 14
  427. #define V_TF_RECV_SACK(x) ((x) << S_TF_RECV_SACK)
  428. #define S_TF_TURBO 15
  429. #define V_TF_TURBO(x) ((x) << S_TF_TURBO)
  430. #define S_TF_KEEPALIVE 16
  431. #define V_TF_KEEPALIVE(x) ((x) << S_TF_KEEPALIVE)
  432. #define S_TF_TCAM_BYPASS 17
  433. #define V_TF_TCAM_BYPASS(x) ((x) << S_TF_TCAM_BYPASS)
  434. #define S_TF_CORE_FIN 18
  435. #define V_TF_CORE_FIN(x) ((x) << S_TF_CORE_FIN)
  436. #define S_TF_CORE_MORE 19
  437. #define V_TF_CORE_MORE(x) ((x) << S_TF_CORE_MORE)
  438. #define S_TF_MIGRATING 20
  439. #define V_TF_MIGRATING(x) ((x) << S_TF_MIGRATING)
  440. #define S_TF_ACTIVE_OPEN 21
  441. #define V_TF_ACTIVE_OPEN(x) ((x) << S_TF_ACTIVE_OPEN)
  442. #define S_TF_ASK_MODE 22
  443. #define V_TF_ASK_MODE(x) ((x) << S_TF_ASK_MODE)
  444. #define S_TF_NON_OFFLOAD 23
  445. #define V_TF_NON_OFFLOAD(x) ((x) << S_TF_NON_OFFLOAD)
  446. #define S_TF_MOD_SCHD 24
  447. #define V_TF_MOD_SCHD(x) ((x) << S_TF_MOD_SCHD)
  448. #define S_TF_MOD_SCHD_REASON0 25
  449. #define V_TF_MOD_SCHD_REASON0(x) ((x) << S_TF_MOD_SCHD_REASON0)
  450. #define S_TF_MOD_SCHD_REASON1 26
  451. #define V_TF_MOD_SCHD_REASON1(x) ((x) << S_TF_MOD_SCHD_REASON1)
  452. #define S_TF_MOD_SCHD_RX 27
  453. #define V_TF_MOD_SCHD_RX(x) ((x) << S_TF_MOD_SCHD_RX)
  454. #define S_TF_CORE_PUSH 28
  455. #define V_TF_CORE_PUSH(x) ((x) << S_TF_CORE_PUSH)
  456. #define S_TF_RCV_COALESCE_ENABLE 29
  457. #define V_TF_RCV_COALESCE_ENABLE(x) ((x) << S_TF_RCV_COALESCE_ENABLE)
  458. #define S_TF_RCV_COALESCE_PUSH 30
  459. #define V_TF_RCV_COALESCE_PUSH(x) ((x) << S_TF_RCV_COALESCE_PUSH)
  460. #define S_TF_RCV_COALESCE_LAST_PSH 31
  461. #define V_TF_RCV_COALESCE_LAST_PSH(x) ((x) << S_TF_RCV_COALESCE_LAST_PSH)
  462. #define S_TF_RCV_COALESCE_HEARTBEAT 32
  463. #define V_TF_RCV_COALESCE_HEARTBEAT(x) ((x) << S_TF_RCV_COALESCE_HEARTBEAT)
  464. #define S_TF_HALF_CLOSE 33
  465. #define V_TF_HALF_CLOSE(x) ((x) << S_TF_HALF_CLOSE)
  466. #define S_TF_DACK_MSS 34
  467. #define V_TF_DACK_MSS(x) ((x) << S_TF_DACK_MSS)
  468. #define S_TF_CCTRL_SEL0 35
  469. #define V_TF_CCTRL_SEL0(x) ((x) << S_TF_CCTRL_SEL0)
  470. #define S_TF_CCTRL_SEL1 36
  471. #define V_TF_CCTRL_SEL1(x) ((x) << S_TF_CCTRL_SEL1)
  472. #define S_TF_TCP_NEWRENO_FAST_RECOVERY 37
  473. #define V_TF_TCP_NEWRENO_FAST_RECOVERY(x) ((x) << S_TF_TCP_NEWRENO_FAST_RECOVERY)
  474. #define S_TF_TX_PACE_AUTO 38
  475. #define V_TF_TX_PACE_AUTO(x) ((x) << S_TF_TX_PACE_AUTO)
  476. #define S_TF_PEER_FIN_HELD 39
  477. #define V_TF_PEER_FIN_HELD(x) ((x) << S_TF_PEER_FIN_HELD)
  478. #define S_TF_CORE_URG 40
  479. #define V_TF_CORE_URG(x) ((x) << S_TF_CORE_URG)
  480. #define S_TF_RDMA_ERROR 41
  481. #define V_TF_RDMA_ERROR(x) ((x) << S_TF_RDMA_ERROR)
  482. #define S_TF_SSWS_DISABLED 42
  483. #define V_TF_SSWS_DISABLED(x) ((x) << S_TF_SSWS_DISABLED)
  484. #define S_TF_DUPACK_COUNT_ODD 43
  485. #define V_TF_DUPACK_COUNT_ODD(x) ((x) << S_TF_DUPACK_COUNT_ODD)
  486. #define S_TF_TX_CHANNEL 44
  487. #define V_TF_TX_CHANNEL(x) ((x) << S_TF_TX_CHANNEL)
  488. #define S_TF_RX_CHANNEL 45
  489. #define V_TF_RX_CHANNEL(x) ((x) << S_TF_RX_CHANNEL)
  490. #define S_TF_TX_PACE_FIXED 46
  491. #define V_TF_TX_PACE_FIXED(x) ((x) << S_TF_TX_PACE_FIXED)
  492. #define S_TF_RDMA_FLM_ERROR 47
  493. #define V_TF_RDMA_FLM_ERROR(x) ((x) << S_TF_RDMA_FLM_ERROR)
  494. #define S_TF_RX_FLOW_CONTROL_DISABLE 48
  495. #define V_TF_RX_FLOW_CONTROL_DISABLE(x) ((x) << S_TF_RX_FLOW_CONTROL_DISABLE)
  496. #endif /* _TCB_DEFS_H */