IxQMgrQCfg_p.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /**
  2. * @file IxQMgrQCfg_p.h
  3. *
  4. * @author Intel Corporation
  5. * @date 07-Feb-2002
  6. *
  7. * @brief This file contains the internal functions for config
  8. *
  9. *
  10. * @par
  11. * IXP400 SW Release version 2.0
  12. *
  13. * -- Copyright Notice --
  14. *
  15. * @par
  16. * Copyright 2001-2005, Intel Corporation.
  17. * All rights reserved.
  18. *
  19. * @par
  20. * Redistribution and use in source and binary forms, with or without
  21. * modification, are permitted provided that the following conditions
  22. * are met:
  23. * 1. Redistributions of source code must retain the above copyright
  24. * notice, this list of conditions and the following disclaimer.
  25. * 2. Redistributions in binary form must reproduce the above copyright
  26. * notice, this list of conditions and the following disclaimer in the
  27. * documentation and/or other materials provided with the distribution.
  28. * 3. Neither the name of the Intel Corporation nor the names of its contributors
  29. * may be used to endorse or promote products derived from this software
  30. * without specific prior written permission.
  31. *
  32. * @par
  33. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
  34. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  35. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  36. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  37. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  38. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  39. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  40. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  41. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  42. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  43. * SUCH DAMAGE.
  44. *
  45. * @par
  46. * -- End of Copyright Notice --
  47. */
  48. #ifndef IXQMGRQCFG_P_H
  49. #define IXQMGRQCFG_P_H
  50. /*
  51. * User defined header files
  52. */
  53. #include "IxQMgr.h"
  54. /*
  55. * Typedefs
  56. */
  57. typedef struct
  58. {
  59. unsigned wmSetCnt;
  60. struct
  61. {
  62. char *qName;
  63. BOOL isConfigured;
  64. unsigned int qSizeInWords;
  65. unsigned int qEntrySizeInWords;
  66. unsigned int ne;
  67. unsigned int nf;
  68. unsigned int numEntries;
  69. UINT32 baseAddress;
  70. UINT32 readPtr;
  71. UINT32 writePtr;
  72. } qStats[IX_QMGR_MAX_NUM_QUEUES];
  73. } IxQMgrQCfgStats;
  74. /*
  75. * Initialize the QCfg subcomponent
  76. */
  77. void
  78. ixQMgrQCfgInit (void);
  79. /*
  80. * Uninitialize the QCfg subcomponent
  81. */
  82. void
  83. ixQMgrQCfgUninit (void);
  84. /*
  85. * Get the Q size in words
  86. */
  87. IxQMgrQSizeInWords
  88. ixQMgrQSizeInWordsGet (IxQMgrQId qId);
  89. /*
  90. * Get the Q entry size in words
  91. */
  92. IxQMgrQEntrySizeInWords
  93. ixQMgrQEntrySizeInWordsGet (IxQMgrQId qId);
  94. /*
  95. * Get the generic cfg stats
  96. */
  97. IxQMgrQCfgStats*
  98. ixQMgrQCfgStatsGet (void);
  99. /*
  100. * Get queue specific stats
  101. */
  102. IxQMgrQCfgStats*
  103. ixQMgrQCfgQStatsGet (IxQMgrQId qId);
  104. /*
  105. * Check is the queue configured
  106. */
  107. BOOL
  108. ixQMgrQIsConfigured(IxQMgrQId qId);
  109. #endif /* IX_QMGRQCFG_P_H */