IxQMgr.h 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210
  1. /**
  2. * @file IxQMgr.h
  3. *
  4. * @date 30-Oct-2001
  5. *
  6. * @brief This file contains the public API of IxQMgr component.
  7. *
  8. * Some functions contained in this module are inline to achieve better
  9. * data-path performance. For this to work, the function definitions are
  10. * contained in this header file. The "normal" use of inline functions
  11. * is to use the inline functions in the module in which they are
  12. * defined. In this case these inline functions are used in external
  13. * modules and therefore the use of "inline extern". What this means
  14. * is as follows: if a function foo is declared as "inline extern" this
  15. * definition is only used for inlining, in no case is the function
  16. * compiled on its own. If the compiler cannot inline the function it
  17. * becomes an external reference. Therefore in IxQMgrQAccess.c all
  18. * inline functions are defined without the "inline extern" specifier
  19. * and so define the external references. In all other source files
  20. * including this header file, these funtions are defined as "inline
  21. * extern".
  22. *
  23. *
  24. * @par
  25. * IXP400 SW Release version 2.0
  26. *
  27. * -- Copyright Notice --
  28. *
  29. * @par
  30. * Copyright 2001-2005, Intel Corporation.
  31. * All rights reserved.
  32. *
  33. * @par
  34. * Redistribution and use in source and binary forms, with or without
  35. * modification, are permitted provided that the following conditions
  36. * are met:
  37. * 1. Redistributions of source code must retain the above copyright
  38. * notice, this list of conditions and the following disclaimer.
  39. * 2. Redistributions in binary form must reproduce the above copyright
  40. * notice, this list of conditions and the following disclaimer in the
  41. * documentation and/or other materials provided with the distribution.
  42. * 3. Neither the name of the Intel Corporation nor the names of its contributors
  43. * may be used to endorse or promote products derived from this software
  44. * without specific prior written permission.
  45. *
  46. * @par
  47. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
  48. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  49. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  50. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  51. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  52. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  53. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  54. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  55. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  56. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  57. * SUCH DAMAGE.
  58. *
  59. * @par
  60. * -- End of Copyright Notice --
  61. */
  62. /* ------------------------------------------------------
  63. Doxygen group definitions
  64. ------------------------------------------------------ */
  65. /**
  66. * @defgroup IxQMgrAPI IXP400 Queue Manager (IxQMgr) API
  67. *
  68. * @brief The public API for the IXP400 QMgr component.
  69. *
  70. * IxQMgr is a low level interface to the AHB Queue Manager
  71. *
  72. * @{
  73. */
  74. #ifndef IXQMGR_H
  75. #define IXQMGR_H
  76. /*
  77. * User defined include files
  78. */
  79. #include "IxOsal.h"
  80. /*
  81. * Define QMgr's IoMem macros, in DC mode if in LE
  82. * regular if in BE. (Note: For Linux LSP gold release
  83. * may need to adjust mode.
  84. */
  85. #if defined (__BIG_ENDIAN)
  86. #define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_BE
  87. #define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_BE
  88. #else
  89. #define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC
  90. #define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC
  91. #endif
  92. /*
  93. * #defines and macros
  94. */
  95. /**
  96. *
  97. * @ingroup IxQMgrAPI
  98. *
  99. * @def IX_QMGR_INLINE
  100. *
  101. * @brief Inline definition, for inlining of Queue Access functions on API
  102. *
  103. * Please read the header information in this file for more details on the
  104. * use of function inlining in this component.
  105. *
  106. */
  107. #ifndef __wince
  108. #ifdef IXQMGRQACCESS_C
  109. /* If IXQMGRQACCESS_C is set then the IxQmgrQAccess.c is including this file
  110. and must instantiate a concrete definition for each inlineable API function
  111. whether or not that function actually gets inlined. */
  112. # ifdef NO_INLINE_APIS
  113. # undef NO_INLINE_APIS
  114. # endif
  115. # define IX_QMGR_INLINE /* Empty Define */
  116. #else
  117. # ifndef NO_INLINE_APIS
  118. # define IX_QMGR_INLINE IX_OSAL_INLINE_EXTERN
  119. # else
  120. # define IX_QMGR_INLINE /* Empty Define */
  121. # endif
  122. #endif
  123. #else /* ndef __wince */
  124. # ifndef NO_INLINE_APIS
  125. # define NO_INLINE_APIS
  126. # endif
  127. # define IX_QMGR_INLINE
  128. #endif
  129. /**
  130. *
  131. * @ingroup IxQMgrAPI
  132. *
  133. * @def IX_QMGR_MAX_NUM_QUEUES
  134. *
  135. * @brief Number of queues supported by the AQM.
  136. *
  137. * This constant is used to indicate the number of AQM queues
  138. *
  139. */
  140. #define IX_QMGR_MAX_NUM_QUEUES 64
  141. /**
  142. *
  143. * @ingroup IxQMgrAPI
  144. *
  145. * @def IX_QMGR_MIN_QID
  146. *
  147. * @brief Minimum queue identifier.
  148. *
  149. * This constant is used to indicate the smallest queue identifier
  150. *
  151. */
  152. #define IX_QMGR_MIN_QID IX_QMGR_QUEUE_0
  153. /**
  154. *
  155. * @ingroup IxQMgrAPI
  156. *
  157. * @def IX_QMGR_MAX_QID
  158. *
  159. * @brief Maximum queue identifier.
  160. *
  161. * This constant is used to indicate the largest queue identifier
  162. *
  163. */
  164. #define IX_QMGR_MAX_QID IX_QMGR_QUEUE_63
  165. /**
  166. *
  167. * @ingroup IxQMgrAPI
  168. *
  169. * @def IX_QMGR_MIN_QUEUPP_QID
  170. *
  171. * @brief Minimum queue identifier for reduced functionality queues.
  172. *
  173. * This constant is used to indicate Minimum queue identifier for reduced
  174. * functionality queues
  175. *
  176. */
  177. #define IX_QMGR_MIN_QUEUPP_QID 32
  178. /**
  179. *
  180. * @ingroup IxQMgrAPI
  181. *
  182. * @def IX_QMGR_MAX_QNAME_LEN
  183. *
  184. * @brief Maximum queue name length.
  185. *
  186. * This constant is used to indicate the maximum null terminated string length
  187. * (excluding '\0') for a queue name
  188. *
  189. */
  190. #define IX_QMGR_MAX_QNAME_LEN 16
  191. /**
  192. *
  193. * @ingroup IxQMgrAPI
  194. *
  195. * @def IX_QMGR_WARNING
  196. *
  197. * @brief Warning return code.
  198. *
  199. * Execution complete, but there is a special case to handle
  200. *
  201. */
  202. #define IX_QMGR_WARNING 2
  203. /**
  204. *
  205. * @ingroup IxQMgrAPI
  206. *
  207. * @def IX_QMGR_PARAMETER_ERROR
  208. *
  209. * @brief Parameter error return code (NULL pointer etc..).
  210. *
  211. * parameter error out of range/invalid
  212. *
  213. */
  214. #define IX_QMGR_PARAMETER_ERROR 3
  215. /**
  216. *
  217. * @ingroup IxQMgrAPI
  218. *
  219. * @def IX_QMGR_INVALID_Q_ENTRY_SIZE
  220. *
  221. * @brief Invalid entry size return code.
  222. *
  223. * Invalid queue entry size for a queue read/write
  224. *
  225. */
  226. #define IX_QMGR_INVALID_Q_ENTRY_SIZE 4
  227. /**
  228. *
  229. * @ingroup IxQMgrAPI
  230. *
  231. * @def IX_QMGR_INVALID_Q_ID
  232. *
  233. * @brief Invalid queue identifier return code.
  234. *
  235. * Invalid queue id, not in range 0-63
  236. *
  237. */
  238. #define IX_QMGR_INVALID_Q_ID 5
  239. /**
  240. *
  241. * @ingroup IxQMgrAPI
  242. *
  243. * @def IX_QMGR_INVALID_CB_ID
  244. *
  245. * @brief Invalid callback identifier return code.
  246. *
  247. * Invalid callback id
  248. */
  249. #define IX_QMGR_INVALID_CB_ID 6
  250. /**
  251. *
  252. * @ingroup IxQMgrAPI
  253. *
  254. * @def IX_QMGR_CB_ALREADY_SET
  255. *
  256. * @brief Callback set error return code.
  257. *
  258. * The specified callback has already been for this queue
  259. *
  260. */
  261. #define IX_QMGR_CB_ALREADY_SET 7
  262. /**
  263. *
  264. * @ingroup IxQMgrAPI
  265. *
  266. * @def IX_QMGR_NO_AVAILABLE_SRAM
  267. *
  268. * @brief Sram consumed return code.
  269. *
  270. * All AQM Sram is consumed by queue configuration
  271. *
  272. */
  273. #define IX_QMGR_NO_AVAILABLE_SRAM 8
  274. /**
  275. *
  276. * @ingroup IxQMgrAPI
  277. *
  278. * @def IX_QMGR_INVALID_INT_SOURCE_ID
  279. *
  280. * @brief Invalid queue interrupt source identifier return code.
  281. *
  282. * Invalid queue interrupt source given for notification enable
  283. */
  284. #define IX_QMGR_INVALID_INT_SOURCE_ID 9
  285. /**
  286. *
  287. * @ingroup IxQMgrAPI
  288. *
  289. * @def IX_QMGR_INVALID_QSIZE
  290. *
  291. * @brief Invalid queue size error code.
  292. *
  293. * Invalid queue size not one of 16,32, 64, 128
  294. *
  295. *
  296. */
  297. #define IX_QMGR_INVALID_QSIZE 10
  298. /**
  299. *
  300. * @ingroup IxQMgrAPI
  301. *
  302. * @def IX_QMGR_INVALID_Q_WM
  303. *
  304. * @brief Invalid queue watermark return code.
  305. *
  306. * Invalid queue watermark given for watermark set
  307. */
  308. #define IX_QMGR_INVALID_Q_WM 11
  309. /**
  310. *
  311. * @ingroup IxQMgrAPI
  312. *
  313. * @def IX_QMGR_Q_NOT_CONFIGURED
  314. *
  315. * @brief Queue not configured return code.
  316. *
  317. * Returned to the client when a function has been called on an unconfigured
  318. * queue
  319. *
  320. */
  321. #define IX_QMGR_Q_NOT_CONFIGURED 12
  322. /**
  323. *
  324. * @ingroup IxQMgrAPI
  325. *
  326. * @def IX_QMGR_Q_ALREADY_CONFIGURED
  327. *
  328. * @brief Queue already configured return code.
  329. *
  330. * Returned to client to indicate that a queue has already been configured
  331. */
  332. #define IX_QMGR_Q_ALREADY_CONFIGURED 13
  333. /**
  334. *
  335. * @ingroup IxQMgrAPI
  336. *
  337. * @def IX_QMGR_Q_UNDERFLOW
  338. *
  339. * @brief Underflow return code.
  340. *
  341. * Underflow on a queue read has occurred
  342. *
  343. */
  344. #define IX_QMGR_Q_UNDERFLOW 14
  345. /**
  346. *
  347. * @ingroup IxQMgrAPI
  348. *
  349. * @def IX_QMGR_Q_OVERFLOW
  350. *
  351. * @brief Overflow return code.
  352. *
  353. * Overflow on a queue write has occurred
  354. *
  355. */
  356. #define IX_QMGR_Q_OVERFLOW 15
  357. /**
  358. *
  359. * @ingroup IxQMgrAPI
  360. *
  361. * @def IX_QMGR_Q_INVALID_PRIORITY
  362. *
  363. * @brief Invalid priority return code.
  364. *
  365. * Invalid priority, not one of 0,1,2
  366. */
  367. #define IX_QMGR_Q_INVALID_PRIORITY 16
  368. /**
  369. *
  370. * @ingroup IxQMgrAPI
  371. *
  372. * @def IX_QMGR_ENTRY_INDEX_OUT_OF_BOUNDS
  373. *
  374. * @brief Entry index out of bounds return code.
  375. *
  376. * Entry index is greater than number of entries in queue.
  377. */
  378. #define IX_QMGR_ENTRY_INDEX_OUT_OF_BOUNDS 17
  379. /**
  380. *
  381. * @ingroup IxQMgrAPI
  382. *
  383. * @def ixQMgrDispatcherLoopRun
  384. *
  385. * @brief Map old function name ixQMgrDispatcherLoopRun ()
  386. * to @ref ixQMgrDispatcherLoopRunA0 ().
  387. *
  388. */
  389. #define ixQMgrDispatcherLoopRun ixQMgrDispatcherLoopRunA0
  390. /**
  391. *
  392. * @ingroup IxQMgrAPI
  393. *
  394. * @def IX_QMGR_QUEUE
  395. *
  396. * @brief Definition of AQM queue numbers
  397. *
  398. */
  399. #define IX_QMGR_QUEUE_0 (0) /**< Queue Number 0 */
  400. #define IX_QMGR_QUEUE_1 (1) /**< Queue Number 1 */
  401. #define IX_QMGR_QUEUE_2 (2) /**< Queue Number 2 */
  402. #define IX_QMGR_QUEUE_3 (3) /**< Queue Number 3 */
  403. #define IX_QMGR_QUEUE_4 (4) /**< Queue Number 4 */
  404. #define IX_QMGR_QUEUE_5 (5) /**< Queue Number 5 */
  405. #define IX_QMGR_QUEUE_6 (6) /**< Queue Number 6 */
  406. #define IX_QMGR_QUEUE_7 (7) /**< Queue Number 7 */
  407. #define IX_QMGR_QUEUE_8 (8) /**< Queue Number 8 */
  408. #define IX_QMGR_QUEUE_9 (9) /**< Queue Number 9 */
  409. #define IX_QMGR_QUEUE_10 (10) /**< Queue Number 10 */
  410. #define IX_QMGR_QUEUE_11 (11) /**< Queue Number 11 */
  411. #define IX_QMGR_QUEUE_12 (12) /**< Queue Number 12 */
  412. #define IX_QMGR_QUEUE_13 (13) /**< Queue Number 13 */
  413. #define IX_QMGR_QUEUE_14 (14) /**< Queue Number 14 */
  414. #define IX_QMGR_QUEUE_15 (15) /**< Queue Number 15 */
  415. #define IX_QMGR_QUEUE_16 (16) /**< Queue Number 16 */
  416. #define IX_QMGR_QUEUE_17 (17) /**< Queue Number 17 */
  417. #define IX_QMGR_QUEUE_18 (18) /**< Queue Number 18 */
  418. #define IX_QMGR_QUEUE_19 (19) /**< Queue Number 19 */
  419. #define IX_QMGR_QUEUE_20 (20) /**< Queue Number 20 */
  420. #define IX_QMGR_QUEUE_21 (21) /**< Queue Number 21 */
  421. #define IX_QMGR_QUEUE_22 (22) /**< Queue Number 22 */
  422. #define IX_QMGR_QUEUE_23 (23) /**< Queue Number 23 */
  423. #define IX_QMGR_QUEUE_24 (24) /**< Queue Number 24 */
  424. #define IX_QMGR_QUEUE_25 (25) /**< Queue Number 25 */
  425. #define IX_QMGR_QUEUE_26 (26) /**< Queue Number 26 */
  426. #define IX_QMGR_QUEUE_27 (27) /**< Queue Number 27 */
  427. #define IX_QMGR_QUEUE_28 (28) /**< Queue Number 28 */
  428. #define IX_QMGR_QUEUE_29 (29) /**< Queue Number 29 */
  429. #define IX_QMGR_QUEUE_30 (30) /**< Queue Number 30 */
  430. #define IX_QMGR_QUEUE_31 (31) /**< Queue Number 31 */
  431. #define IX_QMGR_QUEUE_32 (32) /**< Queue Number 32 */
  432. #define IX_QMGR_QUEUE_33 (33) /**< Queue Number 33 */
  433. #define IX_QMGR_QUEUE_34 (34) /**< Queue Number 34 */
  434. #define IX_QMGR_QUEUE_35 (35) /**< Queue Number 35 */
  435. #define IX_QMGR_QUEUE_36 (36) /**< Queue Number 36 */
  436. #define IX_QMGR_QUEUE_37 (37) /**< Queue Number 37 */
  437. #define IX_QMGR_QUEUE_38 (38) /**< Queue Number 38 */
  438. #define IX_QMGR_QUEUE_39 (39) /**< Queue Number 39 */
  439. #define IX_QMGR_QUEUE_40 (40) /**< Queue Number 40 */
  440. #define IX_QMGR_QUEUE_41 (41) /**< Queue Number 41 */
  441. #define IX_QMGR_QUEUE_42 (42) /**< Queue Number 42 */
  442. #define IX_QMGR_QUEUE_43 (43) /**< Queue Number 43 */
  443. #define IX_QMGR_QUEUE_44 (44) /**< Queue Number 44 */
  444. #define IX_QMGR_QUEUE_45 (45) /**< Queue Number 45 */
  445. #define IX_QMGR_QUEUE_46 (46) /**< Queue Number 46 */
  446. #define IX_QMGR_QUEUE_47 (47) /**< Queue Number 47 */
  447. #define IX_QMGR_QUEUE_48 (48) /**< Queue Number 48 */
  448. #define IX_QMGR_QUEUE_49 (49) /**< Queue Number 49 */
  449. #define IX_QMGR_QUEUE_50 (50) /**< Queue Number 50 */
  450. #define IX_QMGR_QUEUE_51 (51) /**< Queue Number 51 */
  451. #define IX_QMGR_QUEUE_52 (52) /**< Queue Number 52 */
  452. #define IX_QMGR_QUEUE_53 (53) /**< Queue Number 53 */
  453. #define IX_QMGR_QUEUE_54 (54) /**< Queue Number 54 */
  454. #define IX_QMGR_QUEUE_55 (55) /**< Queue Number 55 */
  455. #define IX_QMGR_QUEUE_56 (56) /**< Queue Number 56 */
  456. #define IX_QMGR_QUEUE_57 (57) /**< Queue Number 57 */
  457. #define IX_QMGR_QUEUE_58 (58) /**< Queue Number 58 */
  458. #define IX_QMGR_QUEUE_59 (59) /**< Queue Number 59 */
  459. #define IX_QMGR_QUEUE_60 (60) /**< Queue Number 60 */
  460. #define IX_QMGR_QUEUE_61 (61) /**< Queue Number 61 */
  461. #define IX_QMGR_QUEUE_62 (62) /**< Queue Number 62 */
  462. #define IX_QMGR_QUEUE_63 (63) /**< Queue Number 63 */
  463. #define IX_QMGR_QUEUE_INVALID (64) /**< AQM Queue Number Delimiter */
  464. /*
  465. * Typedefs
  466. */
  467. /**
  468. * @typedef IxQMgrQId
  469. *
  470. * @ingroup IxQMgrAPI
  471. *
  472. * @brief Used in the API to identify the AQM queues.
  473. *
  474. */
  475. typedef int IxQMgrQId;
  476. /**
  477. * @typedef IxQMgrQStatus
  478. *
  479. * @ingroup IxQMgrAPI
  480. *
  481. * @brief Queue status.
  482. *
  483. * A queues status is defined by its relative fullness or relative emptiness.
  484. * Each of the queues 0-31 have Nearly Empty, Nearly Full, Empty, Full,
  485. * Underflow and Overflow status flags. Queues 32-63 have just Nearly Empty and
  486. * Full status flags.
  487. * The flags bit positions are outlined below:
  488. *
  489. * OF - bit-5<br>
  490. * UF - bit-4<br>
  491. * F - bit-3<br>
  492. * NF - bit-2<br>
  493. * NE - bit-1<br>
  494. * E - bit-0<br>
  495. *
  496. */
  497. typedef UINT32 IxQMgrQStatus;
  498. /**
  499. * @enum IxQMgrQStatusMask
  500. *
  501. * @ingroup IxQMgrAPI
  502. *
  503. * @brief Queue status mask.
  504. *
  505. * Masks for extracting the individual status flags from the IxQMgrStatus
  506. * word.
  507. *
  508. */
  509. typedef enum
  510. {
  511. IX_QMGR_Q_STATUS_E_BIT_MASK = 0x1,
  512. IX_QMGR_Q_STATUS_NE_BIT_MASK = 0x2,
  513. IX_QMGR_Q_STATUS_NF_BIT_MASK = 0x4,
  514. IX_QMGR_Q_STATUS_F_BIT_MASK = 0x8,
  515. IX_QMGR_Q_STATUS_UF_BIT_MASK = 0x10,
  516. IX_QMGR_Q_STATUS_OF_BIT_MASK = 0x20
  517. } IxQMgrQStatusMask;
  518. /**
  519. * @enum IxQMgrSourceId
  520. *
  521. * @ingroup IxQMgrAPI
  522. *
  523. * @brief Queue interrupt source select.
  524. *
  525. * This enum defines the different source conditions on a queue that result in
  526. * an interrupt being fired by the AQM. Interrupt source is configurable for
  527. * queues 0-31 only. The interrupt source for queues 32-63 is hardwired to the
  528. * NE(Nearly Empty) status flag.
  529. *
  530. */
  531. typedef enum
  532. {
  533. IX_QMGR_Q_SOURCE_ID_E = 0, /**< Queue Empty due to last read */
  534. IX_QMGR_Q_SOURCE_ID_NE, /**< Queue Nearly Empty due to last read */
  535. IX_QMGR_Q_SOURCE_ID_NF, /**< Queue Nearly Full due to last write */
  536. IX_QMGR_Q_SOURCE_ID_F, /**< Queue Full due to last write */
  537. IX_QMGR_Q_SOURCE_ID_NOT_E, /**< Queue Not Empty due to last write */
  538. IX_QMGR_Q_SOURCE_ID_NOT_NE, /**< Queue Not Nearly Empty due to last write */
  539. IX_QMGR_Q_SOURCE_ID_NOT_NF, /**< Queue Not Nearly Full due to last read */
  540. IX_QMGR_Q_SOURCE_ID_NOT_F /**< Queue Not Full due to last read */
  541. } IxQMgrSourceId;
  542. /**
  543. * @enum IxQMgrQEntrySizeInWords
  544. *
  545. * @ingroup IxQMgrAPI
  546. *
  547. * @brief QMgr queue entry sizes.
  548. *
  549. * The entry size of a queue specifies the size of a queues entry in words.
  550. *
  551. */
  552. typedef enum
  553. {
  554. IX_QMGR_Q_ENTRY_SIZE1 = 1, /**< 1 word entry */
  555. IX_QMGR_Q_ENTRY_SIZE2 = 2, /**< 2 word entry */
  556. IX_QMGR_Q_ENTRY_SIZE4 = 4 /**< 4 word entry */
  557. } IxQMgrQEntrySizeInWords;
  558. /**
  559. * @enum IxQMgrQSizeInWords
  560. *
  561. * @ingroup IxQMgrAPI
  562. *
  563. * @brief QMgr queue sizes.
  564. *
  565. * These values define the allowed queue sizes for AQM queue. The sizes are
  566. * specified in words.
  567. *
  568. */
  569. typedef enum
  570. {
  571. IX_QMGR_Q_SIZE16 = 16, /**< 16 word buffer */
  572. IX_QMGR_Q_SIZE32 = 32, /**< 32 word buffer */
  573. IX_QMGR_Q_SIZE64 = 64, /**< 64 word buffer */
  574. IX_QMGR_Q_SIZE128 = 128, /**< 128 word buffer */
  575. IX_QMGR_Q_SIZE_INVALID = 129 /**< Insure that this is greater than largest
  576. * queue size supported by the hardware
  577. */
  578. } IxQMgrQSizeInWords;
  579. /**
  580. * @enum IxQMgrWMLevel
  581. *
  582. * @ingroup IxQMgrAPI
  583. *
  584. * @brief QMgr watermark levels.
  585. *
  586. * These values define the valid watermark levels(in ENTRIES) for queues. Each
  587. * queue 0-63 have configurable Nearly full and Nearly empty watermarks. For
  588. * queues 32-63 the Nearly full watermark has NO EFFECT.
  589. * If the Nearly full watermark is set to IX_QMGR_Q_WM_LEVEL16 this means that
  590. * the nearly full flag will be set by the hardware when there are >= 16 empty
  591. * entries in the specified queue.
  592. * If the Nearly empty watermark is set to IX_QMGR_Q_WM_LEVEL16 this means that
  593. * the Nearly empty flag will be set by the hardware when there are <= 16 full
  594. * entries in the specified queue.
  595. */
  596. typedef enum
  597. {
  598. IX_QMGR_Q_WM_LEVEL0 = 0, /**< 0 entry watermark */
  599. IX_QMGR_Q_WM_LEVEL1 = 1, /**< 1 entry watermark */
  600. IX_QMGR_Q_WM_LEVEL2 = 2, /**< 2 entry watermark */
  601. IX_QMGR_Q_WM_LEVEL4 = 4, /**< 4 entry watermark */
  602. IX_QMGR_Q_WM_LEVEL8 = 8, /**< 8 entry watermark */
  603. IX_QMGR_Q_WM_LEVEL16 = 16, /**< 16 entry watermark */
  604. IX_QMGR_Q_WM_LEVEL32 = 32, /**< 32 entry watermark */
  605. IX_QMGR_Q_WM_LEVEL64 = 64 /**< 64 entry watermark */
  606. } IxQMgrWMLevel;
  607. /**
  608. * @ingroup IxQMgrAPI
  609. *
  610. * @enum IxQMgrDispatchGroup
  611. *
  612. * @brief QMgr dispatch group select identifiers.
  613. *
  614. * This enum defines the groups over which the dispatcher will process when
  615. * called. One of the enum values must be used as a input to
  616. * @a ixQMgrDispatcherLoopRunA0, @a ixQMgrDispatcherLoopRunB0
  617. * or @a ixQMgrDispatcherLoopRunB0LLP.
  618. *
  619. */
  620. typedef enum
  621. {
  622. IX_QMGR_QUELOW_GROUP = 0, /**< Queues 0-31 */
  623. IX_QMGR_QUEUPP_GROUP /**< Queues 32-63 */
  624. } IxQMgrDispatchGroup;
  625. /**
  626. * @ingroup IxQMgrAPI
  627. *
  628. * @enum IxQMgrPriority
  629. *
  630. * @brief Dispatcher priority levels.
  631. *
  632. * This enum defines the different queue dispatch priority levels.
  633. * The lowest priority number (0) is the highest priority level.
  634. *
  635. */
  636. typedef enum
  637. {
  638. IX_QMGR_Q_PRIORITY_0 = 0, /**< Priority level 0 */
  639. IX_QMGR_Q_PRIORITY_1, /**< Priority level 1 */
  640. IX_QMGR_Q_PRIORITY_2, /**< Priority level 2 */
  641. IX_QMGR_Q_PRIORITY_INVALID /**< Invalid Priority level */
  642. } IxQMgrPriority;
  643. /**
  644. * @ingroup IxQMgrAPI
  645. *
  646. * @enum IxQMgrType
  647. *
  648. * @brief Callback types as used with livelock prevention
  649. *
  650. * This enum defines the different callback types.
  651. * These types are only used when Livelock prevention is enabled.
  652. * The default is IX_QMGR_TYPE_REALTIME_OTHER.
  653. *
  654. */
  655. typedef enum
  656. {
  657. IX_QMGR_TYPE_REALTIME_OTHER = 0, /**< Real time callbacks-always allowed run*/
  658. IX_QMGR_TYPE_REALTIME_PERIODIC, /**< Periodic callbacks-always allowed run */
  659. IX_QMGR_TYPE_REALTIME_SPORADIC /**< Sporadic callbacks-only run if no
  660. periodic callbacks are in progress */
  661. } IxQMgrType;
  662. /**
  663. * @ingroup IxQMgrAPI
  664. *
  665. * @typedef IxQMgrCallbackId
  666. *
  667. * @brief Uniquely identifies a callback function.
  668. *
  669. * A unique callback identifier associated with each callback
  670. * registered by clients.
  671. *
  672. */
  673. typedef unsigned IxQMgrCallbackId;
  674. /**
  675. * @typedef IxQMgrCallback
  676. *
  677. * @brief QMgr notification callback type.
  678. *
  679. * This defines the interface to all client callback functions.
  680. *
  681. * @param qId @ref IxQMgrQId [in] - the queue identifier
  682. * @param cbId @ref IxQMgrCallbackId [in] - the callback identifier
  683. */
  684. typedef void (*IxQMgrCallback)(IxQMgrQId qId,
  685. IxQMgrCallbackId cbId);
  686. /**
  687. * @ingroup IxQMgrAPI
  688. *
  689. * @typedef IxQMgrDispatcherFuncPtr
  690. *
  691. * @brief QMgr Dispatcher Loop function pointer.
  692. *
  693. * This defines the interface for QMgr Dispather functions.
  694. *
  695. * @param group @ref IxQMgrDispatchGroup [in] - the group of the
  696. * queue of which the dispatcher will run
  697. */
  698. typedef void (*IxQMgrDispatcherFuncPtr)(IxQMgrDispatchGroup group);
  699. /*
  700. * Function Prototypes
  701. */
  702. /* ------------------------------------------------------------
  703. Initialisation related functions
  704. ---------------------------------------------------------- */
  705. /**
  706. *
  707. * @ingroup IxQMgrAPI
  708. *
  709. * @fn ixQMgrInit (void)
  710. *
  711. * @brief Initialise the QMgr.
  712. *
  713. * This function must be called before and other QMgr function. It
  714. * sets up internal data structures.
  715. *
  716. * @return @li IX_SUCCESS, the IxQMgr successfully initialised
  717. * @return @li IX_FAIL, failed to initialize the Qmgr
  718. *
  719. */
  720. PUBLIC IX_STATUS
  721. ixQMgrInit (void);
  722. /**
  723. *
  724. * @ingroup IxQMgrAPI
  725. *
  726. * @fn ixQMgrUnload (void)
  727. *
  728. * @brief Uninitialise the QMgr.
  729. *
  730. * This function will perform the tasks required to unload the QMgr component
  731. * cleanly. This includes unmapping kernel memory.
  732. * This should be called before a soft reboot or unloading of a kernel module.
  733. *
  734. * @pre It should only be called if @ref ixQMgrInit has already been called.
  735. *
  736. * @post No QMgr functions should be called until ixQMgrInit is called again.
  737. *
  738. * @return @li IX_SUCCESS, the IxQMgr successfully uninitialised
  739. * @return @li IX_FAIL, failed to uninitialize the Qmgr
  740. *
  741. */
  742. PUBLIC IX_STATUS
  743. ixQMgrUnload (void);
  744. /**
  745. *
  746. * @ingroup IxQMgrAPI
  747. *
  748. * @fn ixQMgrShow (void)
  749. *
  750. * @brief Describe queue configuration and statistics for active queues.
  751. *
  752. * This function shows active queues, their configurations and statistics.
  753. *
  754. * @return @li void
  755. *
  756. */
  757. PUBLIC void
  758. ixQMgrShow (void);
  759. /**
  760. *
  761. * @ingroup IxQMgrAPI
  762. *
  763. * @fn ixQMgrQShow (IxQMgrQId qId)
  764. *
  765. * @brief Display aqueue configuration and statistics for a queue.
  766. *
  767. * This function shows queue configuration and statistics for a queue.
  768. *
  769. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  770. *
  771. * @return @li IX_SUCCESS, success
  772. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  773. *
  774. */
  775. PUBLIC IX_STATUS
  776. ixQMgrQShow (IxQMgrQId qId);
  777. /* ------------------------------------------------------------
  778. Configuration related functions
  779. ---------------------------------------------------------- */
  780. /**
  781. *
  782. * @ingroup IxQMgrAPI
  783. *
  784. * @fn ixQMgrQConfig (char *qName,
  785. IxQMgrQId qId,
  786. IxQMgrQSizeInWords qSizeInWords,
  787. IxQMgrQEntrySizeInWords qEntrySizeInWords)
  788. *
  789. * @brief Configure an AQM queue.
  790. *
  791. * This function is called by a client to setup a queue. The size and entrySize
  792. * qId and qName(NULL pointer) are checked for valid values. This function must
  793. * be called for each queue, before any queue accesses are made and after
  794. * ixQMgrInit() has been called. qName is assumed to be a '\0' terminated array
  795. * of 16 charachters or less.
  796. *
  797. * @param *qName char [in] - is the name provided by the client and is associated
  798. * with a QId by the QMgr.
  799. * @param qId @ref IxQMgrQId [in] - the qId of this queue
  800. * @param qSizeInWords @ref IxQMgrQSize [in] - the size of the queue can be one of 16,32
  801. * 64, 128 words.
  802. * @param qEntrySizeInWords @ref IxQMgrQEntrySizeInWords [in] - the size of a queue entry
  803. * can be one of 1,2,4 words.
  804. *
  805. * @return @li IX_SUCCESS, a specified queue has been successfully configured.
  806. * @return @li IX_FAIL, IxQMgr has not been initialised.
  807. * @return @li IX_QMGR_PARAMETER_ERROR, invalid parameter(s).
  808. * @return @li IX_QMGR_INVALID_QSIZE, invalid queue size
  809. * @return @li IX_QMGR_INVALID_Q_ID, invalid queue id
  810. * @return @li IX_QMGR_INVALID_Q_ENTRY_SIZE, invalid queue entry size
  811. * @return @li IX_QMGR_Q_ALREADY_CONFIGURED, queue already configured
  812. *
  813. */
  814. PUBLIC IX_STATUS
  815. ixQMgrQConfig (char *qName,
  816. IxQMgrQId qId,
  817. IxQMgrQSizeInWords qSizeInWords,
  818. IxQMgrQEntrySizeInWords qEntrySizeInWords);
  819. /**
  820. * @ingroup IxQMgrAPI
  821. *
  822. * @fn ixQMgrQSizeInEntriesGet (IxQMgrQId qId,
  823. unsigned *qSizeInEntries)
  824. *
  825. * @brief Return the size of a queue in entries.
  826. *
  827. * This function returns the the size of the queue in entriese.
  828. *
  829. * @param qId @ref IxQMgrQId [in] - the queue identifier
  830. * @param *qSizeInEntries @ref IxQMgrQSize [out] - queue size in entries
  831. *
  832. * @return @li IX_SUCCESS, successfully retrieved the number of full entrie
  833. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  834. * @return @li IX_QMGR_PARAMETER_ERROR, invalid parameter(s).
  835. *
  836. */
  837. PUBLIC IX_STATUS
  838. ixQMgrQSizeInEntriesGet (IxQMgrQId qId,
  839. unsigned *qSizeInEntries);
  840. /**
  841. *
  842. * @ingroup IxQMgrAPI
  843. *
  844. * @fn ixQMgrWatermarkSet (IxQMgrQId qId,
  845. IxQMgrWMLevel ne,
  846. IxQMgrWMLevel nf)
  847. *
  848. * @brief Set the Nearly Empty and Nearly Full Watermarks fo a queue.
  849. *
  850. * This function is called by a client to set the watermarks NE and NF for the
  851. * queue specified by qId.
  852. * The queue must be empty at the time this function is called, it is the clients
  853. * responsibility to ensure that the queue is empty.
  854. * This function will read the status of the queue before the watermarks are set
  855. * and again after the watermarks are set. If the status register has changed,
  856. * due to a queue access by an NPE for example, a warning is returned.
  857. * Queues 32-63 only support the NE flag, therefore the value of nf will be ignored
  858. * for these queues.
  859. *
  860. * @param qId @ref IxQMgrQId [in] - the QId of the queue.
  861. * @param ne @ref IxQMgrWMLevel [in] - the NE(Nearly Empty) watermark for this
  862. * queue. Valid values are 0,1,2,4,8,16,32 and
  863. * 64 entries.
  864. * @param nf @ref IxQMgrWMLevel [in] - the NF(Nearly Full) watermark for this queue.
  865. * Valid values are 0,1,2,4,8,16,32 and 64
  866. * entries.
  867. *
  868. * @return @li IX_SUCCESS, watermarks have been set for the queu
  869. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  870. * @return @li IX_QMGR_INVALID_Q_WM, invalid watermark
  871. * @return @li IX_QMGR_WARNING, the status register may not be constistent
  872. *
  873. */
  874. PUBLIC IX_STATUS
  875. ixQMgrWatermarkSet (IxQMgrQId qId,
  876. IxQMgrWMLevel ne,
  877. IxQMgrWMLevel nf);
  878. /**
  879. * @ingroup IxQMgrAPI
  880. *
  881. * @fn ixQMgrAvailableSramAddressGet (UINT32 *address,
  882. unsigned *sizeOfFreeSram)
  883. *
  884. * @brief Return the address of available AQM SRAM.
  885. *
  886. * This function returns the starting address in AQM SRAM not used by the
  887. * current queue configuration and should only be called after all queues
  888. * have been configured.
  889. * Calling this function before all queues have been configured will will return
  890. * the currently available SRAM. A call to configure another queue will use some
  891. * of the available SRAM.
  892. * The amount of SRAM available is specified in sizeOfFreeSram. The address is the
  893. * address of the bottom of available SRAM. Available SRAM extends from address
  894. * from address to address + sizeOfFreeSram.
  895. *
  896. * @param **address UINT32 [out] - the address of the available SRAM, NULL if
  897. * none available.
  898. * @param *sizeOfFreeSram unsigned [out]- the size in words of available SRAM
  899. *
  900. * @return @li IX_SUCCESS, there is available SRAM and is pointed to by address
  901. * @return @li IX_QMGR_PARAMETER_ERROR, invalid parameter(s)
  902. * @return @li IX_QMGR_NO_AVAILABLE_SRAM, all AQM SRAM is consumed by the queue
  903. * configuration.
  904. *
  905. */
  906. PUBLIC IX_STATUS
  907. ixQMgrAvailableSramAddressGet (UINT32 *address,
  908. unsigned *sizeOfFreeSram);
  909. /* ------------------------------------------------------------
  910. Queue access related functions
  911. ---------------------------------------------------------- */
  912. /**
  913. *
  914. * @ingroup IxQMgrAPI
  915. *
  916. * @fn ixQMgrQReadWithChecks (IxQMgrQId qId,
  917. UINT32 *entry)
  918. *
  919. * @brief Read an entry from a queue.
  920. *
  921. * This function reads an entire entry from a queue returning it in entry. The
  922. * queue configuration word is read to determine what entry size this queue is
  923. * configured for and then the number of words specified by the entry size is
  924. * read. entry must be a pointer to a previously allocated array of sufficient
  925. * size to hold an entry.
  926. *
  927. * @note - IX_QMGR_Q_UNDERFLOW is only returned for queues 0-31 as queues 32-63
  928. * do not have an underflow status maintained.
  929. *
  930. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  931. * @param *entry UINT32 [out] - pointer to the entry word(s).
  932. *
  933. * @return @li IX_SUCCESS, entry was successfully read.
  934. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter(s).
  935. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  936. * @return @li IX_QMGR_Q_UNDERFLOW, attempt to read from an empty queue
  937. *
  938. */
  939. PUBLIC IX_STATUS
  940. ixQMgrQReadWithChecks (IxQMgrQId qId,
  941. UINT32 *entry);
  942. /**
  943. * @brief Internal structure to facilitate inlining functions in IxQMgr.h
  944. */
  945. typedef struct
  946. {
  947. /* fields related to write functions */
  948. UINT32 qOflowStatBitMask; /**< overflow status mask */
  949. UINT32 qWriteCount; /**< queue write count */
  950. /* fields related to read and write functions */
  951. volatile UINT32 *qAccRegAddr; /**< access register */
  952. volatile UINT32 *qUOStatRegAddr; /**< status register */
  953. volatile UINT32 *qConfigRegAddr; /**< config register */
  954. UINT32 qEntrySizeInWords; /**< queue entry size in words */
  955. UINT32 qSizeInEntries; /**< queue size in entries */
  956. /* fields related to read functions */
  957. UINT32 qUflowStatBitMask; /**< underflow status mask */
  958. UINT32 qReadCount; /**< queue read count */
  959. } IxQMgrQInlinedReadWriteInfo;
  960. /**
  961. *
  962. * @ingroup IxQMgrAPI
  963. *
  964. * @fn ixQMgrQReadMWordsMinus1 (IxQMgrQId qId,
  965. UINT32 *entry)
  966. *
  967. * @brief This function reads the remaining of the q entry
  968. * for queues configured with many words.
  969. * (the first word of the entry is already read
  970. * in the inlined function and the entry pointer already
  971. * incremented
  972. *
  973. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  974. * @param *entry UINT32 [out] - pointer to the entry word(s).
  975. *
  976. * @return @li IX_SUCCESS, entry was successfully read.
  977. * @return @li IX_QMGR_Q_UNDERFLOW, attempt to read from an empty queue
  978. *
  979. */
  980. PUBLIC IX_STATUS
  981. ixQMgrQReadMWordsMinus1 (IxQMgrQId qId,
  982. UINT32 *entry);
  983. /**
  984. *
  985. * @ingroup IxQMgrAPI
  986. *
  987. * @fn ixQMgrQRead (IxQMgrQId qId,
  988. UINT32 *entry)
  989. *
  990. * @brief Fast read of an entry from a queue.
  991. *
  992. * This function is a heavily streamlined version of ixQMgrQReadWithChecks(),
  993. * but performs essentially the same task. It reads an entire entry from a
  994. * queue, returning it in entry which must be a pointer to a previously
  995. * allocated array of sufficient size to hold an entry.
  996. *
  997. * @note - This function is inlined, to reduce unnecessary function call
  998. * overhead. It does not perform any parameter checks, or update any statistics.
  999. * Also, it does not check that the queue specified by qId has been configured.
  1000. * or is in range. It simply reads an entry from the queue, and checks for
  1001. * underflow.
  1002. *
  1003. * @note - IX_QMGR_Q_UNDERFLOW is only returned for queues 0-31 as queues 32-63
  1004. * do not have an underflow status maintained.
  1005. *
  1006. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1007. * @param *entry UINT32 [out] - pointer to the entry word(s).
  1008. *
  1009. * @return @li IX_SUCCESS, entry was successfully read.
  1010. * @return @li IX_QMGR_Q_UNDERFLOW, attempt to read from an empty queue
  1011. *
  1012. */
  1013. #ifdef NO_INLINE_APIS
  1014. PUBLIC IX_STATUS
  1015. ixQMgrQRead (IxQMgrQId qId,
  1016. UINT32 *entryPtr);
  1017. #else
  1018. extern IxQMgrQInlinedReadWriteInfo ixQMgrQInlinedReadWriteInfo[];
  1019. extern IX_STATUS ixQMgrQReadMWordsMinus1 (IxQMgrQId qId, UINT32 *entryPtr);
  1020. IX_QMGR_INLINE PUBLIC IX_STATUS
  1021. ixQMgrQRead (IxQMgrQId qId,
  1022. UINT32 *entryPtr);
  1023. #endif
  1024. IX_QMGR_INLINE PUBLIC IX_STATUS
  1025. ixQMgrQRead (IxQMgrQId qId,
  1026. UINT32 *entryPtr)
  1027. #ifdef NO_INLINE_APIS
  1028. ;
  1029. #else
  1030. {
  1031. IxQMgrQInlinedReadWriteInfo *infoPtr = &ixQMgrQInlinedReadWriteInfo[qId];
  1032. UINT32 entry, entrySize;
  1033. /* get a new entry */
  1034. entrySize = infoPtr->qEntrySizeInWords;
  1035. entry = IX_QMGR_INLINE_READ_LONG(infoPtr->qAccRegAddr);
  1036. if (entrySize != IX_QMGR_Q_ENTRY_SIZE1)
  1037. {
  1038. *entryPtr = entry;
  1039. /* process the remaining part of the entry */
  1040. return ixQMgrQReadMWordsMinus1(qId, entryPtr);
  1041. }
  1042. /* underflow is available for lower queues only */
  1043. if (qId < IX_QMGR_MIN_QUEUPP_QID)
  1044. {
  1045. /* the counter of queue entries is decremented. In happy
  1046. * day scenario there are many entries in the queue
  1047. * and the counter does not reach zero.
  1048. */
  1049. if (infoPtr->qReadCount-- == 0)
  1050. {
  1051. /* There is maybe no entry in the queue
  1052. * qReadCount is now negative, but will be corrected before
  1053. * the function returns.
  1054. */
  1055. UINT32 qPtrs; /* queue internal pointers */
  1056. /* when a queue is empty, the hw guarantees to return
  1057. * a null value. If the value is not null, the queue is
  1058. * not empty.
  1059. */
  1060. if (entry == 0)
  1061. {
  1062. /* get the queue status */
  1063. UINT32 status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr);
  1064. /* check the underflow status */
  1065. if (status & infoPtr->qUflowStatBitMask)
  1066. {
  1067. /* the queue is empty
  1068. * clear the underflow status bit if it was set
  1069. */
  1070. IX_QMGR_INLINE_WRITE_LONG(infoPtr->qUOStatRegAddr,
  1071. status & ~infoPtr->qUflowStatBitMask);
  1072. *entryPtr = 0;
  1073. infoPtr->qReadCount = 0;
  1074. return IX_QMGR_Q_UNDERFLOW;
  1075. }
  1076. }
  1077. /* store the result */
  1078. *entryPtr = entry;
  1079. /* No underflow occured : someone is filling the queue
  1080. * or the queue contains null entries.
  1081. * The current counter needs to be
  1082. * updated from the current number of entries in the queue
  1083. */
  1084. /* get snapshot of queue pointers */
  1085. qPtrs = IX_QMGR_INLINE_READ_LONG(infoPtr->qConfigRegAddr);
  1086. /* Mod subtraction of pointers to get number of words in Q. */
  1087. qPtrs = (qPtrs - (qPtrs >> 7)) & 0x7f;
  1088. if (qPtrs == 0)
  1089. {
  1090. /* no entry in the queue */
  1091. infoPtr->qReadCount = 0;
  1092. }
  1093. else
  1094. {
  1095. /* convert the number of words inside the queue
  1096. * to a number of entries
  1097. */
  1098. infoPtr->qReadCount = qPtrs & (infoPtr->qSizeInEntries - 1);
  1099. }
  1100. return IX_SUCCESS;
  1101. }
  1102. }
  1103. *entryPtr = entry;
  1104. return IX_SUCCESS;
  1105. }
  1106. #endif
  1107. /**
  1108. *
  1109. * @ingroup IxQMgrAPI
  1110. *
  1111. * @fn ixQMgrQBurstRead (IxQMgrQId qId,
  1112. UINT32 numEntries,
  1113. UINT32 *entries)
  1114. *
  1115. * @brief Read a number of entries from an AQM queue.
  1116. *
  1117. * This function will burst read a number of entries from the specified queue.
  1118. * The entry size of queue is auto-detected. The function will attempt to
  1119. * read as many entries as specified by the numEntries parameter and will
  1120. * return an UNDERFLOW if any one of the individual entry reads fail.
  1121. *
  1122. * @warning
  1123. * IX_QMGR_Q_UNDERFLOW is only returned for queues 0-31 as queues 32-63
  1124. * do not have an underflow status maintained, hence there is a potential for
  1125. * silent failure here. This function must be used with caution.
  1126. *
  1127. * @note
  1128. * This function is intended for fast draining of queues, so to make it
  1129. * as efficient as possible, it has the following features:
  1130. * - This function is inlined, to reduce unnecessary function call overhead.
  1131. * - It does not perform any parameter checks, or update any statistics.
  1132. * - It does not check that the queue specified by qId has been configured.
  1133. * - It does not check that the queue has the number of full entries that
  1134. * have been specified to be read. It will read until it finds a NULL entry or
  1135. * until the number of specified entries have been read. It always checks for
  1136. * underflow after all the reads have been performed.
  1137. * Therefore, the client should ensure before calling this function that there
  1138. * are enough entries in the queue to read. ixQMgrQNumEntriesGet() will
  1139. * provide the number of full entries in a queue.
  1140. * ixQMgrQRead() or ixQMgrQReadWithChecks(), which only reads
  1141. * a single queue entry per call, should be used instead if the user requires
  1142. * checks for UNDERFLOW after each entry read.
  1143. *
  1144. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1145. * @param numEntries unsigned [in] - the number of entries to read.
  1146. * This number should be greater than 0
  1147. * @param *entries UINT32 [out] - the word(s) read.
  1148. *
  1149. * @return @li IX_SUCCESS, entries were successfully read.
  1150. * @return @li IX_QMGR_Q_UNDERFLOW, attempt to read from an empty queue
  1151. *
  1152. */
  1153. #ifdef NO_INLINE_APIS
  1154. PUBLIC IX_STATUS
  1155. ixQMgrQBurstRead (IxQMgrQId qId,
  1156. UINT32 numEntries,
  1157. UINT32 *entries);
  1158. #else
  1159. IX_QMGR_INLINE PUBLIC IX_STATUS
  1160. ixQMgrQBurstRead (IxQMgrQId qId,
  1161. UINT32 numEntries,
  1162. UINT32 *entries);
  1163. #endif /* endif NO_INLINE_APIS */
  1164. IX_QMGR_INLINE PUBLIC IX_STATUS
  1165. ixQMgrQBurstRead (IxQMgrQId qId,
  1166. UINT32 numEntries,
  1167. UINT32 *entries)
  1168. #ifdef NO_INLINE_APIS
  1169. ;
  1170. #else
  1171. {
  1172. IxQMgrQInlinedReadWriteInfo *infoPtr = &ixQMgrQInlinedReadWriteInfo[qId];
  1173. UINT32 nullCheckEntry;
  1174. if (infoPtr->qEntrySizeInWords == IX_QMGR_Q_ENTRY_SIZE1)
  1175. {
  1176. volatile UINT32 *qAccRegAddr = infoPtr->qAccRegAddr;
  1177. /* the code is optimized to take care of data dependencies:
  1178. * Durig a read, there are a few cycles needed to get the
  1179. * read complete. During these cycles, it is poossible to
  1180. * do some CPU, e.g. increment pointers and decrement
  1181. * counters.
  1182. */
  1183. /* fetch a queue entry */
  1184. nullCheckEntry = IX_QMGR_INLINE_READ_LONG(infoPtr->qAccRegAddr);
  1185. /* iterate the specified number of queue entries */
  1186. while (--numEntries)
  1187. {
  1188. /* check the result of the previous read */
  1189. if (nullCheckEntry == 0)
  1190. {
  1191. /* if we read a NULL entry, stop. We have underflowed */
  1192. break;
  1193. }
  1194. else
  1195. {
  1196. /* write the entry */
  1197. *entries = nullCheckEntry;
  1198. /* fetch next entry */
  1199. nullCheckEntry = IX_QMGR_INLINE_READ_LONG(qAccRegAddr);
  1200. /* increment the write address */
  1201. entries++;
  1202. }
  1203. }
  1204. /* write the pre-fetched entry */
  1205. *entries = nullCheckEntry;
  1206. }
  1207. else
  1208. {
  1209. IxQMgrQEntrySizeInWords entrySizeInWords = infoPtr->qEntrySizeInWords;
  1210. /* read the specified number of queue entries */
  1211. nullCheckEntry = 0;
  1212. while (numEntries--)
  1213. {
  1214. UINT32 i;
  1215. for (i = 0; i < (UINT32)entrySizeInWords; i++)
  1216. {
  1217. *entries = IX_QMGR_INLINE_READ_LONG(infoPtr->qAccRegAddr + i);
  1218. nullCheckEntry |= *entries++;
  1219. }
  1220. /* if we read a NULL entry, stop. We have underflowed */
  1221. if (nullCheckEntry == 0)
  1222. {
  1223. break;
  1224. }
  1225. nullCheckEntry = 0;
  1226. }
  1227. }
  1228. /* reset the current read count : next access to the read function
  1229. * will force a underflow status check
  1230. */
  1231. infoPtr->qReadCount = 0;
  1232. /* Check if underflow occurred on the read */
  1233. if (nullCheckEntry == 0 && qId < IX_QMGR_MIN_QUEUPP_QID)
  1234. {
  1235. /* get the queue status */
  1236. UINT32 status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr);
  1237. if (status & infoPtr->qUflowStatBitMask)
  1238. {
  1239. /* clear the underflow status bit if it was set */
  1240. IX_QMGR_INLINE_WRITE_LONG(infoPtr->qUOStatRegAddr,
  1241. status & ~infoPtr->qUflowStatBitMask);
  1242. return IX_QMGR_Q_UNDERFLOW;
  1243. }
  1244. }
  1245. return IX_SUCCESS;
  1246. }
  1247. #endif
  1248. /**
  1249. * @ingroup IxQMgrAPI
  1250. *
  1251. * @fn ixQMgrQPeek (IxQMgrQId qId,
  1252. unsigned int entryIndex,
  1253. UINT32 *entry)
  1254. *
  1255. * @brief Read an entry from a queue without moving the read pointer.
  1256. *
  1257. * This function inspects an entry in a queue. The entry is inspected directly
  1258. * in AQM SRAM and is not read from queue access registers. The entry is NOT removed
  1259. * from the queue and the read/write pointers are unchanged.
  1260. * N.B: The queue should not be accessed when this function is called.
  1261. *
  1262. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1263. * @param entryIndex unsigned int [in] - index of entry in queue in the range
  1264. * [0].......[current number of entries in queue].
  1265. * @param *entry UINT32 [out] - pointer to the entry word(s).
  1266. *
  1267. * @return @li IX_SUCCESS, entry was successfully inspected.
  1268. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter(s).
  1269. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId.
  1270. * @return @li IX_QMGR_ENTRY_INDEX_OUT_OF_BOUNDS, an entry does not exist at
  1271. * specified index.
  1272. * @return @li IX_FAIL, failed to inpected the queue entry.
  1273. */
  1274. PUBLIC IX_STATUS
  1275. ixQMgrQPeek (IxQMgrQId qId,
  1276. unsigned int entryIndex,
  1277. UINT32 *entry);
  1278. /**
  1279. *
  1280. * @ingroup IxQMgrAPI
  1281. *
  1282. * @fn ixQMgrQWriteWithChecks (IxQMgrQId qId,
  1283. UINT32 *entry)
  1284. *
  1285. * @brief Write an entry to an AQM queue.
  1286. *
  1287. * This function will write the entry size number of words pointed to by entry to
  1288. * the queue specified by qId. The queue configuration word is read to
  1289. * determine the entry size of queue and the corresponding number of words is
  1290. * then written to the queue.
  1291. *
  1292. * @note - IX_QMGR_Q_OVERFLOW is only returned for queues 0-31 as queues 32-63
  1293. * do not have an overflow status maintained.
  1294. *
  1295. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1296. * @param *entry UINT32 [in] - the word(s) to write.
  1297. *
  1298. * @return @li IX_SUCCESS, value was successfully written.
  1299. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter(s).
  1300. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  1301. * @return @li IX_QMGR_Q_OVERFLOW, attempt to write to a full queue
  1302. *
  1303. */
  1304. PUBLIC IX_STATUS
  1305. ixQMgrQWriteWithChecks (IxQMgrQId qId,
  1306. UINT32 *entry);
  1307. /**
  1308. *
  1309. * @ingroup IxQMgrAPI
  1310. *
  1311. * @fn ixQMgrQWrite (IxQMgrQId qId,
  1312. UINT32 *entry)
  1313. *
  1314. * @brief Fast write of an entry to a queue.
  1315. *
  1316. * This function is a heavily streamlined version of ixQMgrQWriteWithChecks(),
  1317. * but performs essentially the same task. It will write the entry size number
  1318. * of words pointed to by entry to the queue specified by qId.
  1319. *
  1320. * @note - This function is inlined, to reduce unnecessary function call
  1321. * overhead. It does not perform any parameter checks, or update any
  1322. * statistics. Also, it does not check that the queue specified by qId has
  1323. * been configured. It simply writes an entry to the queue, and checks for
  1324. * overflow.
  1325. *
  1326. * @note - IX_QMGR_Q_OVERFLOW is only returned for queues 0-31 as queues 32-63
  1327. * do not have an overflow status maintained.
  1328. *
  1329. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1330. * @param *entry UINT32 [in] - pointer to the entry word(s).
  1331. *
  1332. * @return @li IX_SUCCESS, entry was successfully read.
  1333. * @return @li IX_QMGR_Q_OVERFLOW, attempt to write to a full queue
  1334. *
  1335. */
  1336. #ifdef NO_INLINE_APIS
  1337. PUBLIC IX_STATUS
  1338. ixQMgrQWrite (IxQMgrQId qId,
  1339. UINT32 *entry);
  1340. #else
  1341. IX_QMGR_INLINE PUBLIC IX_STATUS
  1342. ixQMgrQWrite (IxQMgrQId qId,
  1343. UINT32 *entry);
  1344. #endif /* NO_INLINE_APIS */
  1345. IX_QMGR_INLINE PUBLIC IX_STATUS
  1346. ixQMgrQWrite (IxQMgrQId qId,
  1347. UINT32 *entry)
  1348. #ifdef NO_INLINE_APIS
  1349. ;
  1350. #else
  1351. {
  1352. IxQMgrQInlinedReadWriteInfo *infoPtr = &ixQMgrQInlinedReadWriteInfo[qId];
  1353. UINT32 entrySize;
  1354. /* write the entry */
  1355. IX_QMGR_INLINE_WRITE_LONG(infoPtr->qAccRegAddr, *entry);
  1356. entrySize = infoPtr->qEntrySizeInWords;
  1357. if (entrySize != IX_QMGR_Q_ENTRY_SIZE1)
  1358. {
  1359. /* process the remaining part of the entry */
  1360. volatile UINT32 *qAccRegAddr = infoPtr->qAccRegAddr;
  1361. while (--entrySize)
  1362. {
  1363. ++entry;
  1364. IX_QMGR_INLINE_WRITE_LONG(++qAccRegAddr, *entry);
  1365. }
  1366. entrySize = infoPtr->qEntrySizeInWords;
  1367. }
  1368. /* overflow is available for lower queues only */
  1369. if (qId < IX_QMGR_MIN_QUEUPP_QID)
  1370. {
  1371. UINT32 qSize = infoPtr->qSizeInEntries;
  1372. /* increment the current number of entries in the queue
  1373. * and check for overflow
  1374. */
  1375. if (infoPtr->qWriteCount++ == qSize)
  1376. {
  1377. /* the queue may have overflow */
  1378. UINT32 qPtrs; /* queue internal pointers */
  1379. /* get the queue status */
  1380. UINT32 status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr);
  1381. /* read the status twice because the status may
  1382. * not be immediately ready after the write operation
  1383. */
  1384. if ((status & infoPtr->qOflowStatBitMask) ||
  1385. ((status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr))
  1386. & infoPtr->qOflowStatBitMask))
  1387. {
  1388. /* the queue is full, clear the overflow status
  1389. * bit if it was set
  1390. */
  1391. IX_QMGR_INLINE_WRITE_LONG(infoPtr->qUOStatRegAddr,
  1392. status & ~infoPtr->qOflowStatBitMask);
  1393. infoPtr->qWriteCount = infoPtr->qSizeInEntries;
  1394. return IX_QMGR_Q_OVERFLOW;
  1395. }
  1396. /* No overflow occured : someone is draining the queue
  1397. * and the current counter needs to be
  1398. * updated from the current number of entries in the queue
  1399. */
  1400. /* get q pointer snapshot */
  1401. qPtrs = IX_QMGR_INLINE_READ_LONG(infoPtr->qConfigRegAddr);
  1402. /* Mod subtraction of pointers to get number of words in Q. */
  1403. qPtrs = (qPtrs - (qPtrs >> 7)) & 0x7f;
  1404. if (qPtrs == 0)
  1405. {
  1406. /* the queue may be full at the time of the
  1407. * snapshot. Next access will check
  1408. * the overflow status again.
  1409. */
  1410. infoPtr->qWriteCount = qSize;
  1411. }
  1412. else
  1413. {
  1414. /* convert the number of words to a number of entries */
  1415. if (entrySize == IX_QMGR_Q_ENTRY_SIZE1)
  1416. {
  1417. infoPtr->qWriteCount = qPtrs & (qSize - 1);
  1418. }
  1419. else
  1420. {
  1421. infoPtr->qWriteCount = (qPtrs / entrySize) & (qSize - 1);
  1422. }
  1423. }
  1424. }
  1425. }
  1426. return IX_SUCCESS;
  1427. }
  1428. #endif
  1429. /**
  1430. *
  1431. * @ingroup IxQMgrAPI
  1432. *
  1433. * @fn ixQMgrQBurstWrite (IxQMgrQId qId,
  1434. unsigned numEntries,
  1435. UINT32 *entries)
  1436. *
  1437. * @brief Write a number of entries to an AQM queue.
  1438. *
  1439. * This function will burst write a number of entries to the specified queue.
  1440. * The entry size of queue is auto-detected. The function will attempt to
  1441. * write as many entries as specified by the numEntries parameter and will
  1442. * return an OVERFLOW if any one of the individual entry writes fail.
  1443. *
  1444. * @warning
  1445. * IX_QMGR_Q_OVERFLOW is only returned for queues 0-31 as queues 32-63
  1446. * do not have an overflow status maintained, hence there is a potential for
  1447. * silent failure here. This function must be used with caution.
  1448. *
  1449. * @note
  1450. * This function is intended for fast population of queues, so to make it
  1451. * as efficient as possible, it has the following features:
  1452. * - This function is inlined, to reduce unnecessary function call overhead.
  1453. * - It does not perform any parameter checks, or update any statistics.
  1454. * - It does not check that the queue specified by qId has been configured.
  1455. * - It does not check that the queue has enough free space to hold the entries
  1456. * before writing, and only checks for overflow after all writes have been
  1457. * performed. Therefore, the client should ensure before calling this function
  1458. * that there is enough free space in the queue to hold the number of entries
  1459. * to be written. ixQMgrQWrite() or ixQMgrQWriteWithChecks(), which only writes
  1460. * a single queue entry per call, should be used instead if the user requires
  1461. * checks for OVERFLOW after each entry written.
  1462. *
  1463. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1464. * @param numEntries unsigned [in] - the number of entries to write.
  1465. * @param *entries UINT32 [in] - the word(s) to write.
  1466. *
  1467. * @return @li IX_SUCCESS, value was successfully written.
  1468. * @return @li IX_QMGR_Q_OVERFLOW, attempt to write to a full queue
  1469. *
  1470. */
  1471. #ifdef NO_INLINE_APIS
  1472. PUBLIC IX_STATUS
  1473. ixQMgrQBurstWrite (IxQMgrQId qId,
  1474. unsigned numEntries,
  1475. UINT32 *entries);
  1476. #else
  1477. IX_QMGR_INLINE PUBLIC IX_STATUS
  1478. ixQMgrQBurstWrite (IxQMgrQId qId,
  1479. unsigned numEntries,
  1480. UINT32 *entries);
  1481. #endif /* NO_INLINE_APIS */
  1482. IX_QMGR_INLINE PUBLIC IX_STATUS
  1483. ixQMgrQBurstWrite (IxQMgrQId qId,
  1484. unsigned numEntries,
  1485. UINT32 *entries)
  1486. #ifdef NO_INLINE_APIS
  1487. ;
  1488. #else
  1489. {
  1490. IxQMgrQInlinedReadWriteInfo *infoPtr = &ixQMgrQInlinedReadWriteInfo[qId];
  1491. UINT32 status;
  1492. /* update the current write count */
  1493. infoPtr->qWriteCount += numEntries;
  1494. if (infoPtr->qEntrySizeInWords == IX_QMGR_Q_ENTRY_SIZE1)
  1495. {
  1496. volatile UINT32 *qAccRegAddr = infoPtr->qAccRegAddr;
  1497. while (numEntries--)
  1498. {
  1499. IX_QMGR_INLINE_WRITE_LONG(qAccRegAddr, *entries);
  1500. entries++;
  1501. }
  1502. }
  1503. else
  1504. {
  1505. IxQMgrQEntrySizeInWords entrySizeInWords = infoPtr->qEntrySizeInWords;
  1506. UINT32 i;
  1507. /* write each queue entry */
  1508. while (numEntries--)
  1509. {
  1510. /* write the queueEntrySize number of words for each entry */
  1511. for (i = 0; i < (UINT32)entrySizeInWords; i++)
  1512. {
  1513. IX_QMGR_INLINE_WRITE_LONG((infoPtr->qAccRegAddr + i), *entries);
  1514. entries++;
  1515. }
  1516. }
  1517. }
  1518. /* check if the write count overflows */
  1519. if (infoPtr->qWriteCount > infoPtr->qSizeInEntries)
  1520. {
  1521. /* reset the current write count */
  1522. infoPtr->qWriteCount = infoPtr->qSizeInEntries;
  1523. }
  1524. /* Check if overflow occurred on the write operation */
  1525. if (qId < IX_QMGR_MIN_QUEUPP_QID)
  1526. {
  1527. /* get the queue status */
  1528. status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr);
  1529. /* read the status twice because the status may
  1530. * not be ready at the time of the write
  1531. */
  1532. if ((status & infoPtr->qOflowStatBitMask) ||
  1533. ((status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr))
  1534. & infoPtr->qOflowStatBitMask))
  1535. {
  1536. /* clear the underflow status bit if it was set */
  1537. IX_QMGR_INLINE_WRITE_LONG(infoPtr->qUOStatRegAddr,
  1538. status & ~infoPtr->qOflowStatBitMask);
  1539. return IX_QMGR_Q_OVERFLOW;
  1540. }
  1541. }
  1542. return IX_SUCCESS;
  1543. }
  1544. #endif
  1545. /**
  1546. * @ingroup IxQMgrAPI
  1547. *
  1548. * @fn ixQMgrQPoke (IxQMgrQId qId,
  1549. unsigned int entryIndex,
  1550. UINT32 *entry)
  1551. *
  1552. * @brief Write an entry to a queue without moving the write pointer.
  1553. *
  1554. * This function modifies an entry in a queue. The entry is modified directly
  1555. * in AQM SRAM and not using the queue access registers. The entry is NOT added to the
  1556. * queue and the read/write pointers are unchanged.
  1557. * N.B: The queue should not be accessed when this function is called.
  1558. *
  1559. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1560. * @param entryIndex unsigned int [in] - index of entry in queue in the range
  1561. * [0].......[current number of entries in queue].
  1562. * @param *entry UINT32 [in] - pointer to the entry word(s).
  1563. *
  1564. * @return @li IX_SUCCESS, entry was successfully modified.
  1565. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter(s).
  1566. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId.
  1567. * @return @li IX_QMGR_ENTRY_INDEX_OUT_OF_BOUNDS, an entry does not exist at
  1568. * specified index.
  1569. * @return @li IX_FAIL, failed to modify the queue entry.
  1570. */
  1571. PUBLIC IX_STATUS
  1572. ixQMgrQPoke (IxQMgrQId qId,
  1573. unsigned int entryIndex,
  1574. UINT32 *entry);
  1575. /**
  1576. *
  1577. * @ingroup IxQMgrAPI
  1578. *
  1579. * @fn ixQMgrQNumEntriesGet (IxQMgrQId qId,
  1580. unsigned *numEntries)
  1581. *
  1582. * @brief Get a snapshot of the number of entries in a queue.
  1583. *
  1584. * This function gets the number of entries in a queue.
  1585. *
  1586. * @param qId @ref IxQMgrQId [in] qId - the queue idenfifier
  1587. * @param *numEntries unsigned [out] - the number of entries in a queue
  1588. *
  1589. * @return @li IX_SUCCESS, got the number of entries for the queue
  1590. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter(s).
  1591. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1592. * @return @li IX_QMGR_WARNING, could not determine num entries at this time
  1593. *
  1594. */
  1595. PUBLIC IX_STATUS
  1596. ixQMgrQNumEntriesGet (IxQMgrQId qId,
  1597. unsigned *numEntries);
  1598. /**
  1599. *
  1600. * @ingroup IxQMgrAPI
  1601. *
  1602. * @fn ixQMgrQStatusGetWithChecks (IxQMgrQId qId,
  1603. IxQMgrQStatus *qStatus)
  1604. *
  1605. * @brief Get a queues status.
  1606. *
  1607. * This function reads the specified queues status. A queues status is defined
  1608. * by its status flags. For queues 0-31 these flags are E,NE,NF,F. For
  1609. * queues 32-63 these flags are NE and F.
  1610. *
  1611. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1612. * @param &qStatus @ref IxQMgrQStatus [out] - the status of the specified queue.
  1613. *
  1614. * @return @li IX_SUCCESS, queue status was successfully read.
  1615. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1616. * @return @li IX_QMGR_PARAMETER_ERROR, invalid paramter.
  1617. *
  1618. */
  1619. PUBLIC IX_STATUS
  1620. ixQMgrQStatusGetWithChecks (IxQMgrQId qId,
  1621. IxQMgrQStatus *qStatus);
  1622. /**
  1623. *
  1624. * @ingroup IxQMgrAPI
  1625. *
  1626. * @fn ixQMgrQStatusGet (IxQMgrQId qId,
  1627. IxQMgrQStatus *qStatus)
  1628. *
  1629. * @brief Fast get of a queue's status.
  1630. *
  1631. * This function is a streamlined version of ixQMgrQStatusGetWithChecks(), but
  1632. * performs essentially the same task. It reads the specified queue's status.
  1633. * A queues status is defined by its status flags. For queues 0-31 these flags
  1634. * are E,NE,NF,F. For queues 32-63 these flags are NE and F.
  1635. *
  1636. * @note - This function is inlined, to reduce unnecessary function call
  1637. * overhead. It does not perform any parameter checks, or update any
  1638. * statistics. Also, it does not check that the queue specified by qId has
  1639. * been configured. It simply reads the specified queue's status.
  1640. *
  1641. * @param qId @ref IxQMgrQId [in] - the queue identifier.
  1642. * @param *qStatus @ref IxQMgrQStatus [out] - the status of the specified queue.
  1643. *
  1644. * @return @li void.
  1645. *
  1646. */
  1647. #ifdef NO_INLINE_APIS
  1648. PUBLIC IX_STATUS
  1649. ixQMgrQStatusGet (IxQMgrQId qId,
  1650. IxQMgrQStatus *qStatus);
  1651. #else
  1652. extern UINT32 ixQMgrAqmIfQueLowStatRegAddr[];
  1653. extern UINT32 ixQMgrAqmIfQueLowStatBitsOffset[];
  1654. extern UINT32 ixQMgrAqmIfQueLowStatBitsMask;
  1655. extern UINT32 ixQMgrAqmIfQueUppStat0RegAddr;
  1656. extern UINT32 ixQMgrAqmIfQueUppStat1RegAddr;
  1657. extern UINT32 ixQMgrAqmIfQueUppStat0BitMask[];
  1658. extern UINT32 ixQMgrAqmIfQueUppStat1BitMask[];
  1659. IX_QMGR_INLINE PUBLIC IX_STATUS
  1660. ixQMgrQStatusGet (IxQMgrQId qId,
  1661. IxQMgrQStatus *qStatus);
  1662. #endif /* endif NO_INLINE_APIS */
  1663. IX_QMGR_INLINE PUBLIC IX_STATUS
  1664. ixQMgrQStatusGet (IxQMgrQId qId,
  1665. IxQMgrQStatus *qStatus)
  1666. #ifdef NO_INLINE_APIS
  1667. ;
  1668. #else
  1669. {
  1670. /* read the status of a queue in the range 0-31 */
  1671. if (qId < IX_QMGR_MIN_QUEUPP_QID)
  1672. {
  1673. volatile UINT32 *lowStatRegAddr = (UINT32*)ixQMgrAqmIfQueLowStatRegAddr[qId];
  1674. UINT32 lowStatBitsOffset = ixQMgrAqmIfQueLowStatBitsOffset[qId];
  1675. UINT32 lowStatBitsMask = ixQMgrAqmIfQueLowStatBitsMask;
  1676. /* read the status register for this queue */
  1677. *qStatus = IX_QMGR_INLINE_READ_LONG(lowStatRegAddr);
  1678. /* mask out the status bits relevant only to this queue */
  1679. *qStatus = (*qStatus >> lowStatBitsOffset) & lowStatBitsMask;
  1680. }
  1681. else /* read status of a queue in the range 32-63 */
  1682. {
  1683. volatile UINT32 *qNearEmptyStatRegAddr = (UINT32*)ixQMgrAqmIfQueUppStat0RegAddr;
  1684. volatile UINT32 *qFullStatRegAddr = (UINT32*)ixQMgrAqmIfQueUppStat1RegAddr;
  1685. int maskIndex = qId - IX_QMGR_MIN_QUEUPP_QID;
  1686. UINT32 qNearEmptyStatBitMask = ixQMgrAqmIfQueUppStat0BitMask[maskIndex];
  1687. UINT32 qFullStatBitMask = ixQMgrAqmIfQueUppStat1BitMask[maskIndex];
  1688. /* Reset the status bits */
  1689. *qStatus = 0;
  1690. /* Check if the queue is nearly empty */
  1691. if (IX_QMGR_INLINE_READ_LONG(qNearEmptyStatRegAddr) & qNearEmptyStatBitMask)
  1692. {
  1693. *qStatus |= IX_QMGR_Q_STATUS_NE_BIT_MASK;
  1694. }
  1695. /* Check if the queue is full */
  1696. if (IX_QMGR_INLINE_READ_LONG(qFullStatRegAddr) & qFullStatBitMask)
  1697. {
  1698. *qStatus |= IX_QMGR_Q_STATUS_F_BIT_MASK;
  1699. }
  1700. }
  1701. return IX_SUCCESS;
  1702. }
  1703. #endif
  1704. /* ------------------------------------------------------------
  1705. Queue dispatch related functions
  1706. ---------------------------------------------------------- */
  1707. /**
  1708. *
  1709. * @ingroup IxQMgrAPI
  1710. *
  1711. * @fn ixQMgrDispatcherPrioritySet (IxQMgrQId qId,
  1712. IxQMgrPriority priority)
  1713. *
  1714. * @brief Set the dispatch priority of a queue.
  1715. *
  1716. * This function is called to set the dispatch priority of queue. The effect of
  1717. * this function is to add a priority change request to a queue. This queue is
  1718. * serviced by @a ixQMgrDispatcherLoopRunA0, @a ixQMgrDispatcherLoopRunB0 or
  1719. * @a ixQMgrDispatcherLoopRunB0LLP.
  1720. *
  1721. * This function is re-entrant. and can be used from an interrupt context
  1722. *
  1723. * @param qId @ref IxQMgrQId [in] - the queue identifier
  1724. * @param priority @ref IxQMgrPriority [in] - the new queue dispatch priority
  1725. *
  1726. * @return @li IX_SUCCESS, priority change request is queued
  1727. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1728. * @return @li IX_QMGR_Q_INVALID_PRIORITY, specified priority is invalid
  1729. *
  1730. */
  1731. PUBLIC IX_STATUS
  1732. ixQMgrDispatcherPrioritySet (IxQMgrQId qId,
  1733. IxQMgrPriority priority);
  1734. /**
  1735. *
  1736. * @ingroup IxQMgrAPI
  1737. *
  1738. * @fn ixQMgrNotificationEnable (IxQMgrQId qId,
  1739. IxQMgrSourceId sourceId)
  1740. *
  1741. * @brief Enable notification on a queue for a specified queue source flag.
  1742. *
  1743. * This function is called by a client of the QMgr to enable notifications on a
  1744. * specified condition.
  1745. * If the condition for the notification is set after the client has called this
  1746. * function but before the function has enabled the interrupt source, then the
  1747. * notification will not occur.
  1748. * For queues 32-63 the notification source is fixed to the NE(Nearly Empty) flag
  1749. * and cannot be changed so the sourceId parameter is ignored for these queues.
  1750. * The status register is read before the notofication is enabled and is read again
  1751. * after the notification has been enabled, if they differ then the warning status
  1752. * is returned.
  1753. *
  1754. * This function is re-entrant. and can be used from an interrupt context
  1755. *
  1756. * @param qId @ref IxQMgrQId [in] - the queue identifier
  1757. * @param sourceId @ref IxQMgrSourceId [in] - the interrupt src condition identifier
  1758. *
  1759. * @return @li IX_SUCCESS, the interrupt has been enabled for the specified source
  1760. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1761. * @return @li IX_QMGR_INVALID_INT_SOURCE_ID, interrupt source invalid for this queue
  1762. * @return @li IX_QMGR_WARNING, the status register may not be constistent
  1763. *
  1764. */
  1765. PUBLIC IX_STATUS
  1766. ixQMgrNotificationEnable (IxQMgrQId qId,
  1767. IxQMgrSourceId sourceId);
  1768. /**
  1769. * @ingroup IxQMgrAPI
  1770. *
  1771. * @fn ixQMgrNotificationDisable (IxQMgrQId qId)
  1772. *
  1773. * @brief Disable notifications on a queue.
  1774. *
  1775. * This function is called to disable notifications on a specified queue.
  1776. *
  1777. * This function is re-entrant. and can be used from an interrupt context
  1778. *
  1779. * @param qId @ref IxQMgrQId [in] - the queue identifier
  1780. *
  1781. * @return @li IX_SUCCESS, the interrupt has been disabled
  1782. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1783. *
  1784. */
  1785. PUBLIC IX_STATUS
  1786. ixQMgrNotificationDisable (IxQMgrQId qId);
  1787. /**
  1788. *
  1789. * @ingroup IxQMgrAPI
  1790. *
  1791. * @fn ixQMgrDispatcherLoopRunA0 (IxQMgrDispatchGroup group)
  1792. *
  1793. * @brief Run the callback dispatcher.
  1794. *
  1795. * This function runs the dispatcher for a group of queues.
  1796. * Callbacks are made for interrupts that have occurred on queues within
  1797. * the group that have registered callbacks. The order in which queues are
  1798. * serviced depends on the queue priorities set by the client.
  1799. * This function may be called from interrupt or task context.
  1800. * For optimisations that were introduced in IXP42X B0 and supported IXP46X
  1801. * the @a ixQMgrDispatcherLoopRunB0, or @a ixQMgrDispatcherLoopRunB0LLP
  1802. * should be used.
  1803. *
  1804. * This function is not re-entrant.
  1805. *
  1806. * @param group @ref IxQMgrDispatchGroup [in] - the group of queues over which the
  1807. * dispatcher will run
  1808. *
  1809. * @return @li void
  1810. *
  1811. * @note This function may be called from interrupt or task context.
  1812. * However, for optimal performance the choice of context depends also on the
  1813. * operating system used.
  1814. *
  1815. */
  1816. PUBLIC void
  1817. ixQMgrDispatcherLoopRunA0 (IxQMgrDispatchGroup group);
  1818. /**
  1819. *
  1820. * @ingroup IxQMgrAPI
  1821. *
  1822. * @fn ixQMgrDispatcherLoopRunB0 (IxQMgrDispatchGroup group)
  1823. *
  1824. * @brief Run the callback dispatcher.
  1825. *
  1826. * The enhanced version of @a ixQMgrDispatcherLoopRunA0 that is optimised for
  1827. * features introduced in IXP42X B0 silicon and supported on IXP46X.
  1828. * This is the default dispatcher for IXP42X B0 and IXP46X silicon.
  1829. * The function runs the dispatcher for a group of queues.
  1830. * Callbacks are made for interrupts that have occurred on queues within
  1831. * the group that have registered callbacks. The order in which queues are
  1832. * serviced depends on the queue priorities set by the client.
  1833. * This function may be called from interrupt or task context.
  1834. *
  1835. * This function is not re-entrant.
  1836. *
  1837. * @param group @ref IxQMgrDispatchGroup [in] - the group of queues over which the
  1838. * dispatcher will run
  1839. *
  1840. * @return @li void
  1841. *
  1842. *
  1843. * @note This function may be called from interrupt or task context.
  1844. * However, for optimal performance the choice of context depends also on the
  1845. * operating system used.
  1846. *
  1847. */
  1848. PUBLIC void
  1849. ixQMgrDispatcherLoopRunB0 (IxQMgrDispatchGroup group);
  1850. /**
  1851. *
  1852. * @ingroup IxQMgrAPI
  1853. *
  1854. * @fn ixQMgrDispatcherLoopRunB0LLP (IxQMgrDispatchGroup group)
  1855. *
  1856. * @brief Run the callback dispatcher.
  1857. *
  1858. * This is a version of the optimised dispatcher for IXP42X B0 and IXP46X,
  1859. * @a ixQMgrDispatcherLoopRunB0, with added support for livelock prevention.
  1860. * This dispatcher will only be used for the IXP42X B0 or IXP46X silicon if
  1861. * feature control indicates that IX_FEATURECTRL_ORIGB0_DISPATCHER is set to
  1862. * IX_FEATURE_CTRL_SWCONFIG_DISABLED. Otherwise the @a ixQMgrDispatcherLoopRunB0
  1863. * dispatcher will be used (Default).
  1864. *
  1865. * When this dispatcher notifies for a queue that is type
  1866. * IX_QMGR_TYPE_REALTIME_PERIODIC, notifications for queues that are set
  1867. * as type IX_QMGR_REALTIME_SPORADIC are not processed and disabled.
  1868. * This helps prevent any tasks resulting from the notification of the
  1869. * IX_QMGR_TYPE_REALTIME_PERIODIC type queue to being subject to livelock.
  1870. * The function runs the dispatcher for a group of queues.
  1871. * Callbacks are made for interrupts that have occurred on queues within
  1872. * the group that have registered callbacks. The order in which queues are
  1873. * serviced depends on their type along with the queue priorities set by the
  1874. * client. This function may be called from interrupt or task context.
  1875. *
  1876. * This function is not re-entrant.
  1877. *
  1878. * @param group @ref IxQMgrDispatchGroup [in] - the group of queues over which
  1879. * the dispatcher will run
  1880. *
  1881. * @return @li void
  1882. *
  1883. * @note This function may be called from interrupt or task context.
  1884. * However, for optimal performance the choice of context depends also on the
  1885. * operating system used.
  1886. *
  1887. */
  1888. PUBLIC void
  1889. ixQMgrDispatcherLoopRunB0LLP (IxQMgrDispatchGroup group);
  1890. /**
  1891. *
  1892. * @ingroup IxQMgrAPI
  1893. *
  1894. * @fn ixQMgrNotificationCallbackSet (IxQMgrQId qId,
  1895. IxQMgrCallback callback,
  1896. IxQMgrCallbackId callbackId)
  1897. *
  1898. * @brief Set the notification callback for a queue.
  1899. *
  1900. * This function sets the callback for the specified queue. This callback will
  1901. * be called by the dispatcher, and may be called in the context of a interrupt
  1902. * If callback has a value of NULL the previously registered callback, if one
  1903. * exists will be unregistered.
  1904. *
  1905. * @param qId @ref IxQMgrQId [in] - the queue idenfifier
  1906. * @param callback @ref IxQMgrCallback [in] - the callback registered for this queue
  1907. * @param callbackId @ref IxQMgrCallbackId [in] - the callback identifier
  1908. *
  1909. * @return @li IX_SUCCESS, the callback for the specified queue has been set
  1910. * @return @li IX_QMGR_Q_NOT_CONFIGURED, the specified qId has not been configured
  1911. *
  1912. */
  1913. PUBLIC IX_STATUS
  1914. ixQMgrNotificationCallbackSet (IxQMgrQId qId,
  1915. IxQMgrCallback callback,
  1916. IxQMgrCallbackId callbackId);
  1917. /**
  1918. *
  1919. * @ingroup IxQMgrAPI
  1920. *
  1921. * @fn ixQMgrDispatcherLoopGet (IxQMgrDispatcherFuncPtr *qDispatcherFuncPtr)
  1922. *
  1923. * @brief Get QMgr DispatcherLoopRun for respective silicon device
  1924. *
  1925. * This function gets a function pointer to ixQMgrDispatcherLoopRunA0() for IXP42X A0
  1926. * Silicon. If the IXP42X B0 or 46X Silicon, the default is the ixQMgrDispatcherLoopRunB0()
  1927. * function, however if live lock prevention is enabled a function pointer to
  1928. * ixQMgrDispatcherLoopRunB0LLP() is given.
  1929. *
  1930. * @param *qDispatchFuncPtr @ref IxQMgrDispatcherFuncPtr [out] -
  1931. * the function pointer of QMgr Dispatcher
  1932. *
  1933. */
  1934. PUBLIC void
  1935. ixQMgrDispatcherLoopGet (IxQMgrDispatcherFuncPtr *qDispatcherFuncPtr);
  1936. /**
  1937. *
  1938. * @ingroup IxQMgrAPI
  1939. *
  1940. * @fn ixQMgrStickyInterruptRegEnable(void)
  1941. *
  1942. * @brief Enable AQM's sticky interrupt register behaviour only available
  1943. * on B0 Silicon.
  1944. *
  1945. * When AQM's sticky interrupt register is enabled, interrupt register bit will
  1946. * only be cleared when a '1' is written to interrupt register bit and the
  1947. * interrupting condition is satisfied, i.e.queue condition does not exist.
  1948. *
  1949. * @note This function must be called before any queue is enabled.
  1950. * Calling this function after queue is enabled will cause
  1951. * undefined results.
  1952. *
  1953. * @return none
  1954. *
  1955. */
  1956. PUBLIC void
  1957. ixQMgrStickyInterruptRegEnable(void);
  1958. /**
  1959. * @ingroup IxQMgrAPI
  1960. *
  1961. * @fn ixQMgrCallbackTypeSet(IxQMgrQId qId,
  1962. IxQMgrType type)
  1963. *
  1964. * @brief Set the Callback Type of a queue.
  1965. *
  1966. * This function is only used for live lock prevention.
  1967. * This function allows the callback type of a queue to be set. The default for
  1968. * all queues is IX_QMGR_TYPE_REALTIME_OTHER. Setting the type to
  1969. * IX_QMGR_TYPE_REALTIME_SPORADIC means that this queue will have it's
  1970. * notifications disabled while there is a task associated with a
  1971. * queue of type IX_QMGR_TYPE_REALTIME_PERIODIC running. As live lock
  1972. * prevention operates on lower queues, this function should
  1973. * be called for lower queues only.
  1974. * This function is not re-entrant.
  1975. *
  1976. * @param qId @ref IxQMgrQId [in] - the queue identifier
  1977. * @param type @ref IxQMgrType [in] - the type of callback
  1978. *
  1979. * @return @li IX_SUCCESS, successfully set callback type for the queue entry
  1980. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  1981. * @return @li IX_QMGR_PARAMETER_ERROR, invalid parameter(s).
  1982. *
  1983. */
  1984. PUBLIC IX_STATUS
  1985. ixQMgrCallbackTypeSet(IxQMgrQId qId,
  1986. IxQMgrType type);
  1987. /**
  1988. * @ingroup IxQMgrAPI
  1989. *
  1990. * @fn ixQMgrCallbackTypeGet(IxQMgrQId qId,
  1991. IxQMgrType *type)
  1992. *
  1993. * @brief Get the Callback Type of a queue.
  1994. *
  1995. * This function allows the callback type of a queue to be got. As live lock
  1996. * prevention operates on lower queues, this function should
  1997. * be called for lower queues only.
  1998. * This function is re-entrant.
  1999. *
  2000. * @param qId @ref IxQMgrQId [in] - the queue identifier
  2001. * @param *type @ref IxQMgrType [out] - the type of callback
  2002. *
  2003. * @return @li IX_SUCCESS, successfully set callback type for the queue entry
  2004. * @return @li IX_QMGR_Q_NOT_CONFIGURED, queue not configured for this QId
  2005. * @return @li IX_QMGR_PARAMETER_ERROR, invalid parameter(s)
  2006. *
  2007. */
  2008. PUBLIC IX_STATUS
  2009. ixQMgrCallbackTypeGet(IxQMgrQId qId,
  2010. IxQMgrType *type);
  2011. /**
  2012. * @ingroup IxQMgrAPI
  2013. *
  2014. * @fn ixQMgrPeriodicDone(void)
  2015. *
  2016. * @brief Indicate that the Periodic task is completed for LLP
  2017. *
  2018. * This function is used as part of live lock prevention.
  2019. * A periodic task is a task that results from a queue that
  2020. * is set as type IX_QMGR_TYPE_REALTIME_PERIODIC. This function
  2021. * should be called to indicate to the dispatcher that the
  2022. * the periodic task is completed. This ensures that the notifications
  2023. * for queues set as type sporadic queues are re-enabled.
  2024. * This function is re-entrant.
  2025. *
  2026. */
  2027. PUBLIC void
  2028. ixQMgrPeriodicDone(void);
  2029. /**
  2030. * @ingroup IxQMgrAPI
  2031. *
  2032. * @fn ixQMgrLLPShow(int resetStats)
  2033. *
  2034. * @brief Print out the live lock prevention statistics when in debug mode.
  2035. *
  2036. * This function prints out statistics related to the livelock. These
  2037. * statistics are only collected in debug mode.
  2038. * This function is not re-entrant.
  2039. *
  2040. * @param resetStats @ref int [in] - if set the the stats are reset.
  2041. *
  2042. */
  2043. PUBLIC void
  2044. ixQMgrLLPShow(int resetStats);
  2045. #endif /* IXQMGR_H */
  2046. /**
  2047. * @} defgroup IxQMgrAPI
  2048. */