10aeed3e9SJustin Hibbits /****************************************************************************** 20aeed3e9SJustin Hibbits 30aeed3e9SJustin Hibbits � 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc. 40aeed3e9SJustin Hibbits All rights reserved. 50aeed3e9SJustin Hibbits 60aeed3e9SJustin Hibbits This is proprietary source code of Freescale Semiconductor Inc., 70aeed3e9SJustin Hibbits and its use is subject to the NetComm Device Drivers EULA. 80aeed3e9SJustin Hibbits The copyright notice above does not evidence any actual or intended 90aeed3e9SJustin Hibbits publication of such source code. 100aeed3e9SJustin Hibbits 110aeed3e9SJustin Hibbits ALTERNATIVELY, redistribution and use in source and binary forms, with 120aeed3e9SJustin Hibbits or without modification, are permitted provided that the following 130aeed3e9SJustin Hibbits conditions are met: 140aeed3e9SJustin Hibbits * Redistributions of source code must retain the above copyright 150aeed3e9SJustin Hibbits notice, this list of conditions and the following disclaimer. 160aeed3e9SJustin Hibbits * Redistributions in binary form must reproduce the above copyright 170aeed3e9SJustin Hibbits notice, this list of conditions and the following disclaimer in the 180aeed3e9SJustin Hibbits documentation and/or other materials provided with the distribution. 190aeed3e9SJustin Hibbits * Neither the name of Freescale Semiconductor nor the 200aeed3e9SJustin Hibbits names of its contributors may be used to endorse or promote products 210aeed3e9SJustin Hibbits derived from this software without specific prior written permission. 220aeed3e9SJustin Hibbits 230aeed3e9SJustin Hibbits THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY 240aeed3e9SJustin Hibbits EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 250aeed3e9SJustin Hibbits WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 260aeed3e9SJustin Hibbits DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 270aeed3e9SJustin Hibbits DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 280aeed3e9SJustin Hibbits (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 290aeed3e9SJustin Hibbits LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 300aeed3e9SJustin Hibbits ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 310aeed3e9SJustin Hibbits (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 320aeed3e9SJustin Hibbits SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 330aeed3e9SJustin Hibbits * 340aeed3e9SJustin Hibbits 350aeed3e9SJustin Hibbits **************************************************************************/ 360aeed3e9SJustin Hibbits /****************************************************************************** 370aeed3e9SJustin Hibbits @File qm_ext.h 380aeed3e9SJustin Hibbits 390aeed3e9SJustin Hibbits @Description QM & Portal API 400aeed3e9SJustin Hibbits *//***************************************************************************/ 410aeed3e9SJustin Hibbits #ifndef __QM_EXT_H 420aeed3e9SJustin Hibbits #define __QM_EXT_H 430aeed3e9SJustin Hibbits 440aeed3e9SJustin Hibbits #include "error_ext.h" 450aeed3e9SJustin Hibbits #include "std_ext.h" 460aeed3e9SJustin Hibbits #include "dpaa_ext.h" 470aeed3e9SJustin Hibbits #include "part_ext.h" 480aeed3e9SJustin Hibbits 490aeed3e9SJustin Hibbits 500aeed3e9SJustin Hibbits /**************************************************************************//** 510aeed3e9SJustin Hibbits @Group QM_grp Queue Manager API 520aeed3e9SJustin Hibbits 530aeed3e9SJustin Hibbits @Description QM API functions, definitions and enums. 540aeed3e9SJustin Hibbits 550aeed3e9SJustin Hibbits @{ 560aeed3e9SJustin Hibbits *//***************************************************************************/ 570aeed3e9SJustin Hibbits 580aeed3e9SJustin Hibbits /**************************************************************************//** 590aeed3e9SJustin Hibbits @Description This callback type is used when receiving frame. 600aeed3e9SJustin Hibbits 610aeed3e9SJustin Hibbits User provides this function. Driver invokes it. 620aeed3e9SJustin Hibbits 630aeed3e9SJustin Hibbits @Param[in] h_App A user argument to the callback 640aeed3e9SJustin Hibbits @Param[in] h_QmFqr A handle to an QM-FQR Module. 650aeed3e9SJustin Hibbits @Param[in] fqidOffset fqid offset from the FQR's fqid base. 660aeed3e9SJustin Hibbits @Param[in] p_Frame The Received Frame 670aeed3e9SJustin Hibbits 680aeed3e9SJustin Hibbits @Retval e_RX_STORE_RESPONSE_CONTINUE - order the driver to continue Rx 690aeed3e9SJustin Hibbits operation for all ready data. 700aeed3e9SJustin Hibbits @Retval e_RX_STORE_RESPONSE_PAUSE - order the driver to stop Rx operation. 710aeed3e9SJustin Hibbits 720aeed3e9SJustin Hibbits @Cautions p_Frame is local parameter; i.e. users must NOT access or use 730aeed3e9SJustin Hibbits this parameter in any means outside this callback context. 740aeed3e9SJustin Hibbits *//***************************************************************************/ 750aeed3e9SJustin Hibbits typedef e_RxStoreResponse (t_QmReceivedFrameCallback)(t_Handle h_App, 760aeed3e9SJustin Hibbits t_Handle h_QmFqr, 770aeed3e9SJustin Hibbits t_Handle h_QmPortal, 780aeed3e9SJustin Hibbits uint32_t fqidOffset, 790aeed3e9SJustin Hibbits t_DpaaFD *p_Frame); 800aeed3e9SJustin Hibbits 810aeed3e9SJustin Hibbits /**************************************************************************//** 820aeed3e9SJustin Hibbits @Description This callback type is used when the FQR is completely was drained. 830aeed3e9SJustin Hibbits 840aeed3e9SJustin Hibbits User provides this function. Driver invokes it. 850aeed3e9SJustin Hibbits 860aeed3e9SJustin Hibbits @Param[in] h_App A user argument to the callback 870aeed3e9SJustin Hibbits @Param[in] h_QmFqr A handle to an QM-FQR Module. 880aeed3e9SJustin Hibbits 890aeed3e9SJustin Hibbits @Retval E_OK on success; Error code otherwise. 900aeed3e9SJustin Hibbits *//***************************************************************************/ 910aeed3e9SJustin Hibbits typedef t_Error (t_QmFqrDrainedCompletionCB)(t_Handle h_App, 920aeed3e9SJustin Hibbits t_Handle h_QmFqr); 930aeed3e9SJustin Hibbits 940aeed3e9SJustin Hibbits /**************************************************************************//** 950aeed3e9SJustin Hibbits @Description QM Rejection code enum 960aeed3e9SJustin Hibbits *//***************************************************************************/ 970aeed3e9SJustin Hibbits typedef enum e_QmRejectionCode 980aeed3e9SJustin Hibbits { 990aeed3e9SJustin Hibbits e_QM_RC_NONE, 1000aeed3e9SJustin Hibbits 1010aeed3e9SJustin Hibbits e_QM_RC_CG_TAILDROP, /**< This frames was rejected due to congestion 1020aeed3e9SJustin Hibbits group taildrop situation */ 1030aeed3e9SJustin Hibbits e_QM_RC_CG_WRED, /**< This frames was rejected due to congestion 1040aeed3e9SJustin Hibbits group WRED situation */ 1050aeed3e9SJustin Hibbits e_QM_RC_FQ_TAILDROP /**< This frames was rejected due to FQID TD 1060aeed3e9SJustin Hibbits situation */ 1070aeed3e9SJustin Hibbits /* e_QM_RC_ERROR 1080aeed3e9SJustin Hibbits e_QM_RC_ORPWINDOW_EARLY 1090aeed3e9SJustin Hibbits e_QM_RC_ORPWINDOW_LATE 1100aeed3e9SJustin Hibbits e_QM_RC_ORPWINDOW_RETIRED */ 1110aeed3e9SJustin Hibbits } e_QmRejectionCode; 1120aeed3e9SJustin Hibbits 1130aeed3e9SJustin Hibbits /**************************************************************************//** 1140aeed3e9SJustin Hibbits @Description QM Rejected frame information 1150aeed3e9SJustin Hibbits *//***************************************************************************/ 1160aeed3e9SJustin Hibbits typedef struct t_QmRejectedFrameInfo 1170aeed3e9SJustin Hibbits { 1180aeed3e9SJustin Hibbits e_QmRejectionCode rejectionCode; /**< Rejection code */ 1190aeed3e9SJustin Hibbits union 1200aeed3e9SJustin Hibbits { 1210aeed3e9SJustin Hibbits struct 1220aeed3e9SJustin Hibbits { 1230aeed3e9SJustin Hibbits uint8_t cgId; /**< congestion group id*/ 1240aeed3e9SJustin Hibbits } cg; /**< rejection parameters when rejectionCode = 1250aeed3e9SJustin Hibbits e_QM_RC_CG_TAILDROP or e_QM_RC_CG_WRED. */ 1260aeed3e9SJustin Hibbits }; 1270aeed3e9SJustin Hibbits } t_QmRejectedFrameInfo; 1280aeed3e9SJustin Hibbits 1290aeed3e9SJustin Hibbits /**************************************************************************//** 1300aeed3e9SJustin Hibbits @Description This callback type is used when receiving rejected frames. 1310aeed3e9SJustin Hibbits 1320aeed3e9SJustin Hibbits User provides this function. Driver invokes it. 1330aeed3e9SJustin Hibbits 1340aeed3e9SJustin Hibbits @Param[in] h_App A user argument to the callback 1350aeed3e9SJustin Hibbits @Param[in] h_QmFqr A handle to an QM-FQR Module. 1360aeed3e9SJustin Hibbits @Param[in] fqidOffset fqid offset from the FQR's fqid base. 1370aeed3e9SJustin Hibbits @Param[in] p_Frame The Rejected Frame 1380aeed3e9SJustin Hibbits @Param[in] p_QmRejectedFrameInfo Rejected Frame information 1390aeed3e9SJustin Hibbits 1400aeed3e9SJustin Hibbits @Retval e_RX_STORE_RESPONSE_CONTINUE - order the driver to continue Rx 1410aeed3e9SJustin Hibbits operation for all ready data. 1420aeed3e9SJustin Hibbits @Retval e_RX_STORE_RESPONSE_PAUSE - order the driver to stop Rx operation. 1430aeed3e9SJustin Hibbits 1440aeed3e9SJustin Hibbits @Cautions p_Frame is local parameter; i.e. users must NOT access or use 1450aeed3e9SJustin Hibbits this parameter in any means outside this callback context. 1460aeed3e9SJustin Hibbits *//***************************************************************************/ 1470aeed3e9SJustin Hibbits typedef e_RxStoreResponse (t_QmRejectedFrameCallback)(t_Handle h_App, 1480aeed3e9SJustin Hibbits t_Handle h_QmFqr, 1490aeed3e9SJustin Hibbits t_Handle h_QmPortal, 1500aeed3e9SJustin Hibbits uint32_t fqidOffset, 1510aeed3e9SJustin Hibbits t_DpaaFD *p_Frame, 1520aeed3e9SJustin Hibbits t_QmRejectedFrameInfo *p_QmRejectedFrameInfo); 1530aeed3e9SJustin Hibbits 1540aeed3e9SJustin Hibbits 1550aeed3e9SJustin Hibbits 1560aeed3e9SJustin Hibbits /**************************************************************************//** 1570aeed3e9SJustin Hibbits @Group QM_lib_grp QM common API 1580aeed3e9SJustin Hibbits 1590aeed3e9SJustin Hibbits @Description QM common API functions, definitions and enums. 1600aeed3e9SJustin Hibbits 1610aeed3e9SJustin Hibbits @{ 1620aeed3e9SJustin Hibbits *//***************************************************************************/ 1630aeed3e9SJustin Hibbits 1640aeed3e9SJustin Hibbits /**************************************************************************//** 1650aeed3e9SJustin Hibbits @Description QM Exceptions 1660aeed3e9SJustin Hibbits *//***************************************************************************/ 1670aeed3e9SJustin Hibbits typedef enum e_QmExceptions { 1680aeed3e9SJustin Hibbits e_QM_EX_CORENET_INITIATOR_DATA = 0, /**< Initiator Data Error */ 1690aeed3e9SJustin Hibbits e_QM_EX_CORENET_TARGET_DATA, /**< CoreNet Target Data Error */ 1700aeed3e9SJustin Hibbits e_QM_EX_CORENET_INVALID_TARGET_TRANSACTION, /**< Invalid Target Transaction */ 1710aeed3e9SJustin Hibbits e_QM_EX_PFDR_THRESHOLD, /**< PFDR Low Watermark Interrupt */ 1720aeed3e9SJustin Hibbits e_QM_EX_PFDR_ENQUEUE_BLOCKED, /**< PFDR Enqueues Blocked Interrupt */ 1730aeed3e9SJustin Hibbits e_QM_EX_SINGLE_ECC, /**< Single Bit ECC Error Interrupt */ 1740aeed3e9SJustin Hibbits e_QM_EX_MULTI_ECC, /**< Multi Bit ECC Error Interrupt */ 1750aeed3e9SJustin Hibbits e_QM_EX_INVALID_COMMAND, /**< Invalid Command Verb Interrupt */ 1760aeed3e9SJustin Hibbits e_QM_EX_DEQUEUE_DCP, /**< Invalid Dequeue Direct Connect Portal Interrupt */ 1770aeed3e9SJustin Hibbits e_QM_EX_DEQUEUE_FQ, /**< Invalid Dequeue FQ Interrupt */ 1780aeed3e9SJustin Hibbits e_QM_EX_DEQUEUE_SOURCE, /**< Invalid Dequeue Source Interrupt */ 1790aeed3e9SJustin Hibbits e_QM_EX_DEQUEUE_QUEUE, /**< Invalid Dequeue Queue Interrupt */ 1800aeed3e9SJustin Hibbits e_QM_EX_ENQUEUE_OVERFLOW, /**< Invalid Enqueue Overflow Interrupt */ 1810aeed3e9SJustin Hibbits e_QM_EX_ENQUEUE_STATE, /**< Invalid Enqueue State Interrupt */ 1820aeed3e9SJustin Hibbits e_QM_EX_ENQUEUE_CHANNEL, /**< Invalid Enqueue Channel Interrupt */ 1830aeed3e9SJustin Hibbits e_QM_EX_ENQUEUE_QUEUE, /**< Invalid Enqueue Queue Interrupt */ 1840aeed3e9SJustin Hibbits e_QM_EX_CG_STATE_CHANGE /**< CG change state notification */ 1850aeed3e9SJustin Hibbits } e_QmExceptions; 1860aeed3e9SJustin Hibbits 1870aeed3e9SJustin Hibbits /**************************************************************************//** 1880aeed3e9SJustin Hibbits @Group QM_init_grp QM (common) Initialization Unit 1890aeed3e9SJustin Hibbits 1900aeed3e9SJustin Hibbits @Description QM (common) Initialization Unit 1910aeed3e9SJustin Hibbits 1920aeed3e9SJustin Hibbits @{ 1930aeed3e9SJustin Hibbits *//***************************************************************************/ 1940aeed3e9SJustin Hibbits 1950aeed3e9SJustin Hibbits /**************************************************************************//** 1960aeed3e9SJustin Hibbits @Function t_QmExceptionsCallback 1970aeed3e9SJustin Hibbits 1980aeed3e9SJustin Hibbits @Description Exceptions user callback routine, will be called upon an 1990aeed3e9SJustin Hibbits exception passing the exception identification. 2000aeed3e9SJustin Hibbits 2010aeed3e9SJustin Hibbits @Param[in] h_App - User's application descriptor. 2020aeed3e9SJustin Hibbits @Param[in] exception - The exception. 2030aeed3e9SJustin Hibbits *//***************************************************************************/ 2040aeed3e9SJustin Hibbits typedef void (t_QmExceptionsCallback) ( t_Handle h_App, 2050aeed3e9SJustin Hibbits e_QmExceptions exception); 2060aeed3e9SJustin Hibbits 2070aeed3e9SJustin Hibbits /**************************************************************************//** 2080aeed3e9SJustin Hibbits @Description Frame's Type to poll 2090aeed3e9SJustin Hibbits *//***************************************************************************/ 2100aeed3e9SJustin Hibbits typedef enum e_QmPortalPollSource { 2110aeed3e9SJustin Hibbits e_QM_PORTAL_POLL_SOURCE_DATA_FRAMES = 0, /**< Poll only data frames */ 2120aeed3e9SJustin Hibbits e_QM_PORTAL_POLL_SOURCE_CONTROL_FRAMES, /**< Poll only control frames */ 2130aeed3e9SJustin Hibbits e_QM_PORTAL_POLL_SOURCE_BOTH /**< Poll both */ 2140aeed3e9SJustin Hibbits } e_QmPortalPollSource; 2150aeed3e9SJustin Hibbits 2160aeed3e9SJustin Hibbits /**************************************************************************//** 2170aeed3e9SJustin Hibbits @Description structure representing QM contextA of FQ initialization parameters 2180aeed3e9SJustin Hibbits Note that this is only "space-holder" for the Context-A. The "real" 2190aeed3e9SJustin Hibbits Context-A is described in each specific driver (E.g. FM driver 2200aeed3e9SJustin Hibbits has its own Context-A API). 2210aeed3e9SJustin Hibbits *//***************************************************************************/ 2220aeed3e9SJustin Hibbits typedef struct { 2230aeed3e9SJustin Hibbits uint32_t res[2]; /**< reserved size for context-a */ 2240aeed3e9SJustin Hibbits } t_QmContextA; 2250aeed3e9SJustin Hibbits 2260aeed3e9SJustin Hibbits /**************************************************************************//** 2270aeed3e9SJustin Hibbits @Description structure representing QM contextB of FQ initialization parameters 2280aeed3e9SJustin Hibbits Note that this is only "space-holder" for the Context-B. The "real" 2290aeed3e9SJustin Hibbits Context-B is described in each specific driver (E.g. FM driver 2300aeed3e9SJustin Hibbits has its own Context-B API). 2310aeed3e9SJustin Hibbits *//***************************************************************************/ 2320aeed3e9SJustin Hibbits typedef uint32_t t_QmContextB; 2330aeed3e9SJustin Hibbits 2340aeed3e9SJustin Hibbits /**************************************************************************//** 2350aeed3e9SJustin Hibbits @Description structure representing QM initialization parameters 2360aeed3e9SJustin Hibbits *//***************************************************************************/ 2370aeed3e9SJustin Hibbits typedef struct { 2380aeed3e9SJustin Hibbits uint8_t guestId; /**< QM Partition Id */ 2390aeed3e9SJustin Hibbits 2400aeed3e9SJustin Hibbits uintptr_t baseAddress; /**< Qm base address (virtual) 2410aeed3e9SJustin Hibbits NOTE: this parameter relevant only for BM in master mode ('guestId'=NCSW_MASTER_ID). */ 2420aeed3e9SJustin Hibbits uintptr_t swPortalsBaseAddress; /**< QM Software Portals Base Address (virtual) */ 2430aeed3e9SJustin Hibbits uint16_t liodn; /**< This value is attached to every transaction initiated by QMan when accessing its private data structures */ 2440aeed3e9SJustin Hibbits uint32_t totalNumOfFqids; /**< Total number of frame-queue-ids in the system */ 2450aeed3e9SJustin Hibbits uint32_t fqdMemPartitionId; /**< FQD's mem partition id; 2460aeed3e9SJustin Hibbits NOTE: The memory partition must be non-cacheable and no-coherent area. */ 2470aeed3e9SJustin Hibbits uint32_t pfdrMemPartitionId; /**< PFDR's mem partition id; 2480aeed3e9SJustin Hibbits NOTE: The memory partition must be non-cacheable and no-coherent area. */ 2490aeed3e9SJustin Hibbits t_QmExceptionsCallback *f_Exception; /**< An application callback routine to handle exceptions.*/ 2500aeed3e9SJustin Hibbits t_Handle h_App; /**< A handle to an application layer object; This handle will 2510aeed3e9SJustin Hibbits be passed by the driver upon calling the above callbacks */ 252f77405e3SJustin Hibbits uintptr_t errIrq; /**< error interrupt line; NO_IRQ if interrupts not used */ 2530aeed3e9SJustin Hibbits uint32_t partFqidBase; /**< The first frame-queue-id dedicated to this partition. 2540aeed3e9SJustin Hibbits NOTE: this parameter relevant only when working with multiple partitions. */ 2550aeed3e9SJustin Hibbits uint32_t partNumOfFqids; /**< Number of frame-queue-ids dedicated to this partition. 2560aeed3e9SJustin Hibbits NOTE: this parameter relevant only when working with multiple partitions. */ 2570aeed3e9SJustin Hibbits uint16_t partCgsBase; /**< The first cgr dedicated to this partition. 2580aeed3e9SJustin Hibbits NOTE: this parameter relevant only when working with multiple partitions. */ 2590aeed3e9SJustin Hibbits uint16_t partNumOfCgs; /**< Number of cgr's dedicated to this partition. 2600aeed3e9SJustin Hibbits NOTE: this parameter relevant only when working with multiple partitions. */ 2610aeed3e9SJustin Hibbits } t_QmParam; 2620aeed3e9SJustin Hibbits 2630aeed3e9SJustin Hibbits 2640aeed3e9SJustin Hibbits /**************************************************************************//** 2650aeed3e9SJustin Hibbits @Function QM_Config 2660aeed3e9SJustin Hibbits 2670aeed3e9SJustin Hibbits @Description Creates descriptor for the QM module. 2680aeed3e9SJustin Hibbits 2690aeed3e9SJustin Hibbits The routine returns a handle (descriptor) to the QM object. 2700aeed3e9SJustin Hibbits This descriptor must be passed as first parameter to all other 2710aeed3e9SJustin Hibbits QM function calls. 2720aeed3e9SJustin Hibbits 2730aeed3e9SJustin Hibbits No actual initialization or configuration of QM hardware is 2740aeed3e9SJustin Hibbits done by this routine. 2750aeed3e9SJustin Hibbits 2760aeed3e9SJustin Hibbits @Param[in] p_QmParam - Pointer to data structure of parameters 2770aeed3e9SJustin Hibbits 2780aeed3e9SJustin Hibbits @Retval Handle to the QM object, or NULL for Failure. 2790aeed3e9SJustin Hibbits *//***************************************************************************/ 2800aeed3e9SJustin Hibbits t_Handle QM_Config(t_QmParam *p_QmParam); 2810aeed3e9SJustin Hibbits 2820aeed3e9SJustin Hibbits /**************************************************************************//** 2830aeed3e9SJustin Hibbits @Function QM_Init 2840aeed3e9SJustin Hibbits 2850aeed3e9SJustin Hibbits @Description Initializes the QM module 2860aeed3e9SJustin Hibbits 2870aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 2880aeed3e9SJustin Hibbits 2890aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 2900aeed3e9SJustin Hibbits *//***************************************************************************/ 2910aeed3e9SJustin Hibbits t_Error QM_Init(t_Handle h_Qm); 2920aeed3e9SJustin Hibbits 2930aeed3e9SJustin Hibbits /**************************************************************************//** 2940aeed3e9SJustin Hibbits @Function QM_Free 2950aeed3e9SJustin Hibbits 2960aeed3e9SJustin Hibbits @Description Frees all resources that were assigned to the QM module. 2970aeed3e9SJustin Hibbits 2980aeed3e9SJustin Hibbits Calling this routine invalidates the descriptor. 2990aeed3e9SJustin Hibbits 3000aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 3010aeed3e9SJustin Hibbits 3020aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 3030aeed3e9SJustin Hibbits *//***************************************************************************/ 3040aeed3e9SJustin Hibbits t_Error QM_Free(t_Handle h_Qm); 3050aeed3e9SJustin Hibbits 3060aeed3e9SJustin Hibbits 3070aeed3e9SJustin Hibbits /**************************************************************************//** 3080aeed3e9SJustin Hibbits @Group QM_advanced_init_grp QM (common) Advanced Configuration Unit 3090aeed3e9SJustin Hibbits 3100aeed3e9SJustin Hibbits @Description Configuration functions used to change default values. 3110aeed3e9SJustin Hibbits 3120aeed3e9SJustin Hibbits @{ 3130aeed3e9SJustin Hibbits *//***************************************************************************/ 3140aeed3e9SJustin Hibbits 3150aeed3e9SJustin Hibbits /**************************************************************************//** 3160aeed3e9SJustin Hibbits @Description structure for defining DC portal ERN destination 3170aeed3e9SJustin Hibbits *//***************************************************************************/ 3180aeed3e9SJustin Hibbits typedef struct t_QmDcPortalParams { 3190aeed3e9SJustin Hibbits bool sendToSw; 3200aeed3e9SJustin Hibbits e_DpaaSwPortal swPortalId; 3210aeed3e9SJustin Hibbits } t_QmDcPortalParams; 3220aeed3e9SJustin Hibbits 3230aeed3e9SJustin Hibbits 3240aeed3e9SJustin Hibbits /**************************************************************************//** 3250aeed3e9SJustin Hibbits @Function QM_ConfigRTFramesDepth 3260aeed3e9SJustin Hibbits 3270aeed3e9SJustin Hibbits @Description Change the run-time frames depth (i.e. the maximum total number 3280aeed3e9SJustin Hibbits of frames that may be inside QM at a certain time) from its default 3290aeed3e9SJustin Hibbits configuration [30000]. 3300aeed3e9SJustin Hibbits 3310aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 3320aeed3e9SJustin Hibbits @Param[in] rtFramesDepth - run-time max num of frames. 3330aeed3e9SJustin Hibbits 3340aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 3350aeed3e9SJustin Hibbits 3360aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Config() and before QM_Init(). 3370aeed3e9SJustin Hibbits *//***************************************************************************/ 3380aeed3e9SJustin Hibbits t_Error QM_ConfigRTFramesDepth(t_Handle h_Qm, uint32_t rtFramesDepth); 3390aeed3e9SJustin Hibbits 3400aeed3e9SJustin Hibbits /**************************************************************************//** 3410aeed3e9SJustin Hibbits @Function QM_ConfigPfdrThreshold 3420aeed3e9SJustin Hibbits 3430aeed3e9SJustin Hibbits @Description Change the pfdr threshold from its default 3440aeed3e9SJustin Hibbits configuration [0]. 3450aeed3e9SJustin Hibbits An interrupt if enables is asserted when the number of PFDRs is below this threshold. 3460aeed3e9SJustin Hibbits 3470aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 3480aeed3e9SJustin Hibbits @Param[in] threshold - threshold value. 3490aeed3e9SJustin Hibbits 3500aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 3510aeed3e9SJustin Hibbits 3520aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Config() and before QM_Init(). 3530aeed3e9SJustin Hibbits *//***************************************************************************/ 3540aeed3e9SJustin Hibbits t_Error QM_ConfigPfdrThreshold(t_Handle h_Qm, uint32_t threshold); 3550aeed3e9SJustin Hibbits 3560aeed3e9SJustin Hibbits /**************************************************************************//** 3570aeed3e9SJustin Hibbits @Function QM_ConfigSfdrReservationThreshold 3580aeed3e9SJustin Hibbits 3590aeed3e9SJustin Hibbits @Description Change the sfdr threshold from its default 3600aeed3e9SJustin Hibbits configuration [0]. 3610aeed3e9SJustin Hibbits 3620aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 3630aeed3e9SJustin Hibbits @Param[in] threshold - threshold value. 3640aeed3e9SJustin Hibbits 3650aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 3660aeed3e9SJustin Hibbits 3670aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Config() and before QM_Init(). 3680aeed3e9SJustin Hibbits *//***************************************************************************/ 3690aeed3e9SJustin Hibbits t_Error QM_ConfigSfdrReservationThreshold(t_Handle h_Qm, uint32_t threshold); 3700aeed3e9SJustin Hibbits 3710aeed3e9SJustin Hibbits /**************************************************************************//** 3720aeed3e9SJustin Hibbits @Function QM_ConfigErrorRejectionNotificationDest 3730aeed3e9SJustin Hibbits 3740aeed3e9SJustin Hibbits @Description Change the destination of rejected frames for DC portals. 3750aeed3e9SJustin Hibbits By default, depending on chip, some DC portals are set to reject 3760aeed3e9SJustin Hibbits frames to HW and some to SW. 3770aeed3e9SJustin Hibbits 3780aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 3790aeed3e9SJustin Hibbits @Param[in] id - DC Portal id. 3800aeed3e9SJustin Hibbits @Param[in] p_Params - Destination parameters. 3810aeed3e9SJustin Hibbits 3820aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 3830aeed3e9SJustin Hibbits 3840aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Config() and before QM_Init(). 3850aeed3e9SJustin Hibbits *//***************************************************************************/ 3860aeed3e9SJustin Hibbits t_Error QM_ConfigErrorRejectionNotificationDest(t_Handle h_Qm, e_DpaaDcPortal id, t_QmDcPortalParams *p_Params); 3870aeed3e9SJustin Hibbits 3880aeed3e9SJustin Hibbits /** @} */ /* end of QM_advanced_init_grp group */ 3890aeed3e9SJustin Hibbits /** @} */ /* end of QM_init_grp group */ 3900aeed3e9SJustin Hibbits 3910aeed3e9SJustin Hibbits 3920aeed3e9SJustin Hibbits /**************************************************************************//** 3930aeed3e9SJustin Hibbits @Group QM_runtime_control_grp QM (common) Runtime Control Unit 3940aeed3e9SJustin Hibbits 3950aeed3e9SJustin Hibbits @Description QM (common) Runtime control unit API functions, definitions and enums. 3960aeed3e9SJustin Hibbits 3970aeed3e9SJustin Hibbits @{ 3980aeed3e9SJustin Hibbits *//***************************************************************************/ 3990aeed3e9SJustin Hibbits 4000aeed3e9SJustin Hibbits /**************************************************************************//** 4010aeed3e9SJustin Hibbits @Description enum for defining QM counters 4020aeed3e9SJustin Hibbits *//***************************************************************************/ 4030aeed3e9SJustin Hibbits typedef enum e_QmCounters { 4040aeed3e9SJustin Hibbits e_QM_COUNTERS_SFDR_IN_USE = 0, /**< Total Single Frame Descriptor Record (SFDR) currently in use */ 4050aeed3e9SJustin Hibbits e_QM_COUNTERS_PFDR_IN_USE, /**< Total Packed Frame Descriptor Record (PFDR) currently in use */ 4060aeed3e9SJustin Hibbits e_QM_COUNTERS_PFDR_FREE_POOL /**< Total Packed Frame Descriptor Record (PFDR) Free Pool Count in external memory */ 4070aeed3e9SJustin Hibbits } e_QmCounters; 4080aeed3e9SJustin Hibbits 4090aeed3e9SJustin Hibbits /**************************************************************************//** 4100aeed3e9SJustin Hibbits @Description structure for returning revision information 4110aeed3e9SJustin Hibbits *//***************************************************************************/ 4120aeed3e9SJustin Hibbits typedef struct t_QmRevisionInfo { 4130aeed3e9SJustin Hibbits uint8_t majorRev; /**< Major revision */ 4140aeed3e9SJustin Hibbits uint8_t minorRev; /**< Minor revision */ 4150aeed3e9SJustin Hibbits } t_QmRevisionInfo; 4160aeed3e9SJustin Hibbits 4170aeed3e9SJustin Hibbits /**************************************************************************//** 4180aeed3e9SJustin Hibbits @Description structure representing QM FQ-Range reservation parameters 4190aeed3e9SJustin Hibbits *//***************************************************************************/ 4200aeed3e9SJustin Hibbits typedef struct t_QmRsrvFqrParams { 4210aeed3e9SJustin Hibbits bool useForce; /**< TRUE - force reservation of specific fqids; 4220aeed3e9SJustin Hibbits FALSE - reserve several fqids */ 4230aeed3e9SJustin Hibbits uint32_t numOfFqids; /**< number of fqids to be reserved. */ 4240aeed3e9SJustin Hibbits union{ 4250aeed3e9SJustin Hibbits struct { 4260aeed3e9SJustin Hibbits uint32_t align; /**< alignment. will be used if useForce=FALSE */ 4270aeed3e9SJustin Hibbits } nonFrcQs; 4280aeed3e9SJustin Hibbits struct { 4290aeed3e9SJustin Hibbits uint32_t fqid; /**< the fqid base of the forced fqids. will be used if useForce=TRUE */ 4300aeed3e9SJustin Hibbits } frcQ; 4310aeed3e9SJustin Hibbits } qs; 4320aeed3e9SJustin Hibbits } t_QmRsrvFqrParams; 4330aeed3e9SJustin Hibbits 4340aeed3e9SJustin Hibbits /**************************************************************************//** 4350aeed3e9SJustin Hibbits @Description structure representing QM Error information 4360aeed3e9SJustin Hibbits *//***************************************************************************/ 4370aeed3e9SJustin Hibbits typedef struct t_QmErrorInfo { 4380aeed3e9SJustin Hibbits bool portalValid; 4390aeed3e9SJustin Hibbits bool hwPortal; 4400aeed3e9SJustin Hibbits e_DpaaSwPortal swPortalId; /**< Sw Portal id */ 4410aeed3e9SJustin Hibbits e_DpaaDcPortal dcpId; /**< Dcp (hw Portal) id */ 4420aeed3e9SJustin Hibbits bool fqidValid; 4430aeed3e9SJustin Hibbits uint32_t fqid; 4440aeed3e9SJustin Hibbits } t_QmErrorInfo; 4450aeed3e9SJustin Hibbits 4460aeed3e9SJustin Hibbits 4470aeed3e9SJustin Hibbits /**************************************************************************//** 4480aeed3e9SJustin Hibbits @Function QM_ReserveQueues 4490aeed3e9SJustin Hibbits 4500aeed3e9SJustin Hibbits @Description Request to Reserved queues for future use. 4510aeed3e9SJustin Hibbits 4520aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM Module. 4530aeed3e9SJustin Hibbits @Param[in] p_QmFqrParams - A structure of parameters for defining the 4540aeed3e9SJustin Hibbits desired queues parameters. 4550aeed3e9SJustin Hibbits @Param[out] p_BaseFqid - base-fqid on success; '0' code otherwise. 4560aeed3e9SJustin Hibbits 4570aeed3e9SJustin Hibbits @Return E_OK on success; 4580aeed3e9SJustin Hibbits 4590aeed3e9SJustin Hibbits @Cautions Allowed only after QM_Init(). 4600aeed3e9SJustin Hibbits *//***************************************************************************/ 4610aeed3e9SJustin Hibbits t_Error QM_ReserveQueues(t_Handle h_Qm, t_QmRsrvFqrParams *p_QmFqrParams, uint32_t *p_BaseFqid); 4620aeed3e9SJustin Hibbits 4630aeed3e9SJustin Hibbits #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) 4640aeed3e9SJustin Hibbits /**************************************************************************//** 4650aeed3e9SJustin Hibbits @Function QM_DumpRegs 4660aeed3e9SJustin Hibbits 4670aeed3e9SJustin Hibbits @Description Dumps all QM registers 4680aeed3e9SJustin Hibbits 4690aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM Module. 4700aeed3e9SJustin Hibbits 4710aeed3e9SJustin Hibbits @Return E_OK on success; 4720aeed3e9SJustin Hibbits 4730aeed3e9SJustin Hibbits @Cautions Allowed only after QM_Init(). 4740aeed3e9SJustin Hibbits *//***************************************************************************/ 4750aeed3e9SJustin Hibbits t_Error QM_DumpRegs(t_Handle h_Qm); 4760aeed3e9SJustin Hibbits #endif /* (defined(DEBUG_ERRORS) && ... */ 4770aeed3e9SJustin Hibbits 4780aeed3e9SJustin Hibbits /**************************************************************************//** 4790aeed3e9SJustin Hibbits @Function QM_SetException 4800aeed3e9SJustin Hibbits 4810aeed3e9SJustin Hibbits @Description Calling this routine enables/disables the specified exception. 4820aeed3e9SJustin Hibbits 4830aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM Module. 4840aeed3e9SJustin Hibbits @Param[in] exception - The exception to be selected. 4850aeed3e9SJustin Hibbits @Param[in] enable - TRUE to enable interrupt, FALSE to mask it. 4860aeed3e9SJustin Hibbits 4870aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 4880aeed3e9SJustin Hibbits 4890aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 4900aeed3e9SJustin Hibbits This routine should NOT be called from guest-partition 4910aeed3e9SJustin Hibbits (i.e. guestId != NCSW_MASTER_ID) 4920aeed3e9SJustin Hibbits *//***************************************************************************/ 4930aeed3e9SJustin Hibbits t_Error QM_SetException(t_Handle h_Qm, e_QmExceptions exception, bool enable); 4940aeed3e9SJustin Hibbits 4950aeed3e9SJustin Hibbits /**************************************************************************//** 4960aeed3e9SJustin Hibbits @Function QM_ErrorIsr 4970aeed3e9SJustin Hibbits 4980aeed3e9SJustin Hibbits @Description QM interrupt-service-routine for errors. 4990aeed3e9SJustin Hibbits 5000aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 5010aeed3e9SJustin Hibbits 5020aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 5030aeed3e9SJustin Hibbits This routine should NOT be called from guest-partition 5040aeed3e9SJustin Hibbits (i.e. guestId != NCSW_MASTER_ID) 5050aeed3e9SJustin Hibbits *//***************************************************************************/ 5060aeed3e9SJustin Hibbits void QM_ErrorIsr(t_Handle h_Qm); 5070aeed3e9SJustin Hibbits 5080aeed3e9SJustin Hibbits /**************************************************************************//** 5090aeed3e9SJustin Hibbits @Function QM_GetErrorInformation 5100aeed3e9SJustin Hibbits 5110aeed3e9SJustin Hibbits @Description Reads the last error information. 5120aeed3e9SJustin Hibbits 5130aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM Module. 5140aeed3e9SJustin Hibbits @Param[out] p_errInfo - the information will be loaded to this struct. 5150aeed3e9SJustin Hibbits 5160aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 5170aeed3e9SJustin Hibbits 5180aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 5190aeed3e9SJustin Hibbits This routine should NOT be called from guest-partition 5200aeed3e9SJustin Hibbits (i.e. guestId != NCSW_MASTER_ID) 5210aeed3e9SJustin Hibbits *//***************************************************************************/ 5220aeed3e9SJustin Hibbits t_Error QM_GetErrorInformation(t_Handle h_Qm, t_QmErrorInfo *p_errInfo); 5230aeed3e9SJustin Hibbits 5240aeed3e9SJustin Hibbits /**************************************************************************//** 5250aeed3e9SJustin Hibbits @Function QM_GetCounter 5260aeed3e9SJustin Hibbits 5270aeed3e9SJustin Hibbits @Description Reads one of the QM counters. 5280aeed3e9SJustin Hibbits 5290aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM Module. 5300aeed3e9SJustin Hibbits @Param[in] counter - The requested counter. 5310aeed3e9SJustin Hibbits 5320aeed3e9SJustin Hibbits @Return Counter's current value. 5330aeed3e9SJustin Hibbits 5340aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 5350aeed3e9SJustin Hibbits *//***************************************************************************/ 5360aeed3e9SJustin Hibbits uint32_t QM_GetCounter(t_Handle h_Qm, e_QmCounters counter); 5370aeed3e9SJustin Hibbits 5380aeed3e9SJustin Hibbits /**************************************************************************//** 5390aeed3e9SJustin Hibbits @Function QM_GetRevision 5400aeed3e9SJustin Hibbits 5410aeed3e9SJustin Hibbits @Description Returns the QM revision 5420aeed3e9SJustin Hibbits 5430aeed3e9SJustin Hibbits @Param[in] h_Qm A handle to a QM Module. 5440aeed3e9SJustin Hibbits @Param[out] p_QmRevisionInfo A structure of revision information parameters. 5450aeed3e9SJustin Hibbits 5460aeed3e9SJustin Hibbits @Return None. 5470aeed3e9SJustin Hibbits 5480aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 5490aeed3e9SJustin Hibbits *//***************************************************************************/ 5500aeed3e9SJustin Hibbits t_Error QM_GetRevision(t_Handle h_Qm, t_QmRevisionInfo *p_QmRevisionInfo); 5510aeed3e9SJustin Hibbits 5520aeed3e9SJustin Hibbits /** @} */ /* end of QM_runtime_control_grp group */ 5530aeed3e9SJustin Hibbits 5540aeed3e9SJustin Hibbits 5550aeed3e9SJustin Hibbits /**************************************************************************//** 5560aeed3e9SJustin Hibbits @Group QM_runtime_data_grp QM (common) Runtime Data Unit 5570aeed3e9SJustin Hibbits 5580aeed3e9SJustin Hibbits @Description QM (common) Runtime data unit API functions, definitions and enums. 5590aeed3e9SJustin Hibbits 5600aeed3e9SJustin Hibbits @{ 5610aeed3e9SJustin Hibbits *//***************************************************************************/ 5620aeed3e9SJustin Hibbits 5630aeed3e9SJustin Hibbits /**************************************************************************//** 5640aeed3e9SJustin Hibbits @Function QM_Poll 5650aeed3e9SJustin Hibbits 5660aeed3e9SJustin Hibbits @Description Poll frames from QM. 5670aeed3e9SJustin Hibbits 5680aeed3e9SJustin Hibbits @Param[in] h_Qm - A handle to the QM module 5690aeed3e9SJustin Hibbits @Param[in] source - The selected frames type to poll 5700aeed3e9SJustin Hibbits 5710aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 5720aeed3e9SJustin Hibbits 5730aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 5740aeed3e9SJustin Hibbits *//***************************************************************************/ 5750aeed3e9SJustin Hibbits t_Error QM_Poll(t_Handle h_Qm, e_QmPortalPollSource source); 5760aeed3e9SJustin Hibbits 5770aeed3e9SJustin Hibbits /** @} */ /* end of QM_runtime_data_grp group */ 5780aeed3e9SJustin Hibbits /** @} */ /* end of QM_lib_grp group */ 5790aeed3e9SJustin Hibbits 5800aeed3e9SJustin Hibbits 5810aeed3e9SJustin Hibbits /**************************************************************************//** 5820aeed3e9SJustin Hibbits @Group QM_portal_grp QM-Portal API 5830aeed3e9SJustin Hibbits 5840aeed3e9SJustin Hibbits @Description QM common API functions, definitions and enums. 5850aeed3e9SJustin Hibbits 5860aeed3e9SJustin Hibbits @{ 5870aeed3e9SJustin Hibbits *//***************************************************************************/ 5880aeed3e9SJustin Hibbits 5890aeed3e9SJustin Hibbits /**************************************************************************//** 5900aeed3e9SJustin Hibbits @Group QM_portal_init_grp QM-Portal Initialization Unit 5910aeed3e9SJustin Hibbits 5920aeed3e9SJustin Hibbits @Description QM-Portal Initialization Unit 5930aeed3e9SJustin Hibbits 5940aeed3e9SJustin Hibbits @{ 5950aeed3e9SJustin Hibbits *//***************************************************************************/ 5960aeed3e9SJustin Hibbits 5970aeed3e9SJustin Hibbits /**************************************************************************//** 5980aeed3e9SJustin Hibbits @Description structure representing QM-Portal Stash parameters 5990aeed3e9SJustin Hibbits *//***************************************************************************/ 6000aeed3e9SJustin Hibbits typedef struct { 6010aeed3e9SJustin Hibbits uint8_t stashDestQueue; /**< This value is used to direct all stashing transactions initiated on behalf of this software portal 6020aeed3e9SJustin Hibbits to the specific Stashing Request Queues (SRQ) */ 6030aeed3e9SJustin Hibbits uint8_t eqcr; /**< If 0, disabled. If 1, for every EQCR entry consumed by QMan a new stash transaction is performed. 6040aeed3e9SJustin Hibbits If 2-7, after 2-7 EQCR entries being consumed by QMAN a new stash transaction is performed. */ 6050aeed3e9SJustin Hibbits bool eqcrHighPri; /**< EQCR entry stash transactions for this software portal will be signaled with higher priority. */ 6060aeed3e9SJustin Hibbits bool dqrr; /**< DQRR entry stash enable/disable */ 6070aeed3e9SJustin Hibbits uint16_t dqrrLiodn; /**< This value is attached to every transaction initiated by QMan when performing DQRR entry or EQCR_CI stashing 6080aeed3e9SJustin Hibbits on behalf of this software portal */ 6090aeed3e9SJustin Hibbits bool dqrrHighPri; /**< DQRR entry stash transactions for this software portal will be signaled with higher priority. */ 6100aeed3e9SJustin Hibbits bool fdFq; /**< Dequeued Frame Data, Annotation, and FQ Context Stashing enable/disable */ 6110aeed3e9SJustin Hibbits uint16_t fdFqLiodn; /**< This value is attached to every transaction initiated by QMan when performing dequeued frame data and 6120aeed3e9SJustin Hibbits annotation stashing, or FQ context stashing on behalf of this software portal */ 6130aeed3e9SJustin Hibbits bool fdFqHighPri; /**< Dequeued frame data, annotation, and FQ context stash transactions for this software portal will be signaled 6140aeed3e9SJustin Hibbits with higher priority. */ 6150aeed3e9SJustin Hibbits bool fdFqDrop; /**< If True, Dequeued frame data, annotation, and FQ context stash transactions for this software portal will be dropped 6160aeed3e9SJustin Hibbits by QMan if the target SRQ is almost full, to prevent QMan sequencer stalling. Stash transactions that are 6170aeed3e9SJustin Hibbits dropped will result in a fetch from main memory when a core reads the addressed coherency granule. 6180aeed3e9SJustin Hibbits If FALSE, Dequeued frame data, annotation, and FQ context stash transactions for this software portal will never be 6190aeed3e9SJustin Hibbits dropped by QMan. If the target SRQ is full a sequencer will stall until each stash transaction can be completed. */ 6200aeed3e9SJustin Hibbits } t_QmPortalStashParam; 6210aeed3e9SJustin Hibbits 6220aeed3e9SJustin Hibbits /**************************************************************************//** 6230aeed3e9SJustin Hibbits @Description structure representing QM-Portal initialization parameters 6240aeed3e9SJustin Hibbits *//***************************************************************************/ 6250aeed3e9SJustin Hibbits typedef struct { 6260aeed3e9SJustin Hibbits uintptr_t ceBaseAddress; /**< Cache-enabled base address (virtual) */ 6270aeed3e9SJustin Hibbits uintptr_t ciBaseAddress; /**< Cache-inhibited base address (virtual) */ 6280aeed3e9SJustin Hibbits t_Handle h_Qm; /**< Qm Handle */ 6290aeed3e9SJustin Hibbits e_DpaaSwPortal swPortalId; /**< Portal id */ 630*852ba100SJustin Hibbits uintptr_t irq; /**< portal interrupt line; used only if useIrq set to TRUE */ 6310aeed3e9SJustin Hibbits uint16_t fdLiodnOffset; /**< liodn to be used for all frames enqueued via this software portal */ 6320aeed3e9SJustin Hibbits t_QmReceivedFrameCallback *f_DfltFrame; /**< this callback will be called unless specific callback assigned to the FQ*/ 6330aeed3e9SJustin Hibbits t_QmRejectedFrameCallback *f_RejectedFrame; /**< this callback will be called for rejected frames. */ 6340aeed3e9SJustin Hibbits t_Handle h_App; /**< a handle to the upper layer; It will be passed by the driver upon calling the CB */ 6350aeed3e9SJustin Hibbits } t_QmPortalParam; 6360aeed3e9SJustin Hibbits 6370aeed3e9SJustin Hibbits 6380aeed3e9SJustin Hibbits /**************************************************************************//** 6390aeed3e9SJustin Hibbits @Function QM_PORTAL_Config 6400aeed3e9SJustin Hibbits 6410aeed3e9SJustin Hibbits @Description Creates descriptor for a QM-Portal module. 6420aeed3e9SJustin Hibbits 6430aeed3e9SJustin Hibbits The routine returns a handle (descriptor) to a QM-Portal object. 6440aeed3e9SJustin Hibbits This descriptor must be passed as first parameter to all other 6450aeed3e9SJustin Hibbits QM-Portal function calls. 6460aeed3e9SJustin Hibbits 6470aeed3e9SJustin Hibbits No actual initialization or configuration of QM-Portal hardware is 6480aeed3e9SJustin Hibbits done by this routine. 6490aeed3e9SJustin Hibbits 6500aeed3e9SJustin Hibbits @Param[in] p_QmPortalParam - Pointer to data structure of parameters 6510aeed3e9SJustin Hibbits 6520aeed3e9SJustin Hibbits @Retval Handle to a QM-Portal object, or NULL for Failure. 6530aeed3e9SJustin Hibbits *//***************************************************************************/ 6540aeed3e9SJustin Hibbits t_Handle QM_PORTAL_Config(t_QmPortalParam *p_QmPortalParam); 6550aeed3e9SJustin Hibbits 6560aeed3e9SJustin Hibbits /**************************************************************************//** 6570aeed3e9SJustin Hibbits @Function QM_PORTAL_Init 6580aeed3e9SJustin Hibbits 6590aeed3e9SJustin Hibbits @Description Initializes a QM-Portal module 6600aeed3e9SJustin Hibbits 6610aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 6620aeed3e9SJustin Hibbits 6630aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 6640aeed3e9SJustin Hibbits *//***************************************************************************/ 6650aeed3e9SJustin Hibbits t_Error QM_PORTAL_Init(t_Handle h_QmPortal); 6660aeed3e9SJustin Hibbits 6670aeed3e9SJustin Hibbits /**************************************************************************//** 6680aeed3e9SJustin Hibbits @Function QM_PORTAL_Free 6690aeed3e9SJustin Hibbits 6700aeed3e9SJustin Hibbits @Description Frees all resources that were assigned to a QM-Portal module. 6710aeed3e9SJustin Hibbits 6720aeed3e9SJustin Hibbits Calling this routine invalidates the descriptor. 6730aeed3e9SJustin Hibbits 6740aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 6750aeed3e9SJustin Hibbits 6760aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 6770aeed3e9SJustin Hibbits *//***************************************************************************/ 6780aeed3e9SJustin Hibbits t_Error QM_PORTAL_Free(t_Handle h_QmPortal); 6790aeed3e9SJustin Hibbits 6800aeed3e9SJustin Hibbits /**************************************************************************//** 6810aeed3e9SJustin Hibbits @Group QM_portal_advanced_init_grp QM-Portal Advanced Configuration Unit 6820aeed3e9SJustin Hibbits 6830aeed3e9SJustin Hibbits @Description Configuration functions used to change default values. 6840aeed3e9SJustin Hibbits 6850aeed3e9SJustin Hibbits @{ 6860aeed3e9SJustin Hibbits *//***************************************************************************/ 6870aeed3e9SJustin Hibbits 6880aeed3e9SJustin Hibbits /**************************************************************************//** 6890aeed3e9SJustin Hibbits @Function QM_PORTAL_ConfigDcaMode 6900aeed3e9SJustin Hibbits 6910aeed3e9SJustin Hibbits @Description Change the Discrate Consumption Acknowledge mode 6920aeed3e9SJustin Hibbits from its default configuration [FALSE]. 6930aeed3e9SJustin Hibbits 6940aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 6950aeed3e9SJustin Hibbits @Param[in] enable - Enable/Disable DCA mode 6960aeed3e9SJustin Hibbits 6970aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 6980aeed3e9SJustin Hibbits 6990aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Config() and before QM_PORTAL_Init(). 7000aeed3e9SJustin Hibbits *//***************************************************************************/ 7010aeed3e9SJustin Hibbits t_Error QM_PORTAL_ConfigDcaMode(t_Handle h_QmPortal, bool enable); 7020aeed3e9SJustin Hibbits 7030aeed3e9SJustin Hibbits /**************************************************************************//** 7040aeed3e9SJustin Hibbits @Function QM_PORTAL_ConfigStash 7050aeed3e9SJustin Hibbits 7060aeed3e9SJustin Hibbits @Description Config the portal to active stash mode. 7070aeed3e9SJustin Hibbits 7080aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 7090aeed3e9SJustin Hibbits @Param[in] p_StashParams - Pointer to data structure of parameters 7100aeed3e9SJustin Hibbits 7110aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 7120aeed3e9SJustin Hibbits 7130aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Config() and before QM_PORTAL_Init(). 7140aeed3e9SJustin Hibbits *//***************************************************************************/ 7150aeed3e9SJustin Hibbits t_Error QM_PORTAL_ConfigStash(t_Handle h_QmPortal, t_QmPortalStashParam *p_StashParams); 7160aeed3e9SJustin Hibbits 7170aeed3e9SJustin Hibbits 7180aeed3e9SJustin Hibbits /**************************************************************************//** 7190aeed3e9SJustin Hibbits @Function QM_PORTAL_ConfigPullMode 7200aeed3e9SJustin Hibbits 7210aeed3e9SJustin Hibbits @Description Change the Pull Mode from its default configuration [FALSE]. 7220aeed3e9SJustin Hibbits 7230aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 7240aeed3e9SJustin Hibbits @Param[in] pullMode - When TRUE, the Portal will work in pull mode. 7250aeed3e9SJustin Hibbits 7260aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 7270aeed3e9SJustin Hibbits 7280aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Config() and before QM_PORTAL_Init(). 7290aeed3e9SJustin Hibbits *//***************************************************************************/ 7300aeed3e9SJustin Hibbits t_Error QM_PORTAL_ConfigPullMode(t_Handle h_QmPortal, bool pullMode); 7310aeed3e9SJustin Hibbits 7320aeed3e9SJustin Hibbits /** @} */ /* end of QM_portal_advanced_init_grp group */ 7330aeed3e9SJustin Hibbits /** @} */ /* end of QM_portal_init_grp group */ 7340aeed3e9SJustin Hibbits 7350aeed3e9SJustin Hibbits 7360aeed3e9SJustin Hibbits /**************************************************************************//** 7370aeed3e9SJustin Hibbits @Group QM_portal_runtime_control_grp QM-Portal Runtime Control Unit 7380aeed3e9SJustin Hibbits 7390aeed3e9SJustin Hibbits @Description QM-Portal Runtime control unit API functions, definitions and enums. 7400aeed3e9SJustin Hibbits 7410aeed3e9SJustin Hibbits @{ 7420aeed3e9SJustin Hibbits *//***************************************************************************/ 7430aeed3e9SJustin Hibbits 7440aeed3e9SJustin Hibbits /**************************************************************************//** 7450aeed3e9SJustin Hibbits @Function QM_PORTAL_AddPoolChannel 7460aeed3e9SJustin Hibbits 7470aeed3e9SJustin Hibbits @Description Adding the pool channel to the SW-Portal's scheduler. 7480aeed3e9SJustin Hibbits the sw-portal will get frames that came from the pool channel. 7490aeed3e9SJustin Hibbits 7500aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 7510aeed3e9SJustin Hibbits @Param[in] poolChannelId - Pool channel id. must between '0' to QM_MAX_NUM_OF_POOL_CHANNELS 7520aeed3e9SJustin Hibbits 7530aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 7540aeed3e9SJustin Hibbits 7550aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Init(). 7560aeed3e9SJustin Hibbits *//***************************************************************************/ 7570aeed3e9SJustin Hibbits t_Error QM_PORTAL_AddPoolChannel(t_Handle h_QmPortal, uint8_t poolChannelId); 7580aeed3e9SJustin Hibbits 7590aeed3e9SJustin Hibbits /** @} */ /* end of QM_portal_runtime_control_grp group */ 7600aeed3e9SJustin Hibbits 7610aeed3e9SJustin Hibbits 7620aeed3e9SJustin Hibbits /**************************************************************************//** 7630aeed3e9SJustin Hibbits @Group QM_portal_runtime_data_grp QM-Portal Runtime Data Unit 7640aeed3e9SJustin Hibbits 7650aeed3e9SJustin Hibbits @Description QM-Portal Runtime data unit API functions, definitions and enums. 7660aeed3e9SJustin Hibbits 7670aeed3e9SJustin Hibbits @{ 7680aeed3e9SJustin Hibbits *//***************************************************************************/ 7690aeed3e9SJustin Hibbits 7700aeed3e9SJustin Hibbits /**************************************************************************//** 7710aeed3e9SJustin Hibbits @Description structure representing QM Portal Frame Info 7720aeed3e9SJustin Hibbits *//***************************************************************************/ 7730aeed3e9SJustin Hibbits typedef struct t_QmPortalFrameInfo { 7740aeed3e9SJustin Hibbits t_Handle h_App; 7750aeed3e9SJustin Hibbits t_Handle h_QmFqr; 7760aeed3e9SJustin Hibbits uint32_t fqidOffset; 7770aeed3e9SJustin Hibbits t_DpaaFD frame; 7780aeed3e9SJustin Hibbits } t_QmPortalFrameInfo; 7790aeed3e9SJustin Hibbits 7800aeed3e9SJustin Hibbits /**************************************************************************//** 7810aeed3e9SJustin Hibbits @Function QM_PORTAL_Poll 7820aeed3e9SJustin Hibbits 7830aeed3e9SJustin Hibbits @Description Poll frames from the specified sw-portal. 7840aeed3e9SJustin Hibbits 7850aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 7860aeed3e9SJustin Hibbits @Param[in] source - The selected frames type to poll 7870aeed3e9SJustin Hibbits 7880aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 7890aeed3e9SJustin Hibbits 7900aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Init(). 7910aeed3e9SJustin Hibbits *//***************************************************************************/ 7920aeed3e9SJustin Hibbits t_Error QM_PORTAL_Poll(t_Handle h_QmPortal, e_QmPortalPollSource source); 7930aeed3e9SJustin Hibbits 7940aeed3e9SJustin Hibbits /**************************************************************************//** 7950aeed3e9SJustin Hibbits @Function QM_PORTAL_PollFrame 7960aeed3e9SJustin Hibbits 7970aeed3e9SJustin Hibbits @Description Poll frames from the specified sw-portal. will poll only data frames 7980aeed3e9SJustin Hibbits 7990aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM-Portal module 8000aeed3e9SJustin Hibbits @Param[out] p_frameInfo - A structure to hold the dequeued frame information 8010aeed3e9SJustin Hibbits 8020aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 8030aeed3e9SJustin Hibbits 8040aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Init(). 8050aeed3e9SJustin Hibbits *//***************************************************************************/ 8060aeed3e9SJustin Hibbits t_Error QM_PORTAL_PollFrame(t_Handle h_QmPortal, t_QmPortalFrameInfo *p_frameInfo); 8070aeed3e9SJustin Hibbits 8080aeed3e9SJustin Hibbits 8090aeed3e9SJustin Hibbits /** @} */ /* end of QM_portal_runtime_data_grp group */ 8100aeed3e9SJustin Hibbits /** @} */ /* end of QM_portal_grp group */ 8110aeed3e9SJustin Hibbits 8120aeed3e9SJustin Hibbits 8130aeed3e9SJustin Hibbits /**************************************************************************//** 8140aeed3e9SJustin Hibbits @Group QM_fqr_grp QM Frame-Queue-Range API 8150aeed3e9SJustin Hibbits 8160aeed3e9SJustin Hibbits @Description QM-FQR API functions, definitions and enums. 8170aeed3e9SJustin Hibbits 8180aeed3e9SJustin Hibbits @{ 8190aeed3e9SJustin Hibbits *//***************************************************************************/ 8200aeed3e9SJustin Hibbits 8210aeed3e9SJustin Hibbits /**************************************************************************//** 8220aeed3e9SJustin Hibbits @Group QM_fqr_init_grp QM-FQR Initialization Unit 8230aeed3e9SJustin Hibbits 8240aeed3e9SJustin Hibbits @Description QM-FQR Initialization Unit 8250aeed3e9SJustin Hibbits 8260aeed3e9SJustin Hibbits @{ 8270aeed3e9SJustin Hibbits *//***************************************************************************/ 8280aeed3e9SJustin Hibbits 8290aeed3e9SJustin Hibbits 8300aeed3e9SJustin Hibbits /**************************************************************************//** 8310aeed3e9SJustin Hibbits @Description structure representing QM FQ-Range congestion group parameters 8320aeed3e9SJustin Hibbits *//***************************************************************************/ 8330aeed3e9SJustin Hibbits typedef struct { 8340aeed3e9SJustin Hibbits t_Handle h_QmCg; /**< A handle to the congestion group. */ 8350aeed3e9SJustin Hibbits int8_t overheadAccountingLength; /**< For each frame add this number for CG calculation 8360aeed3e9SJustin Hibbits (may be negative), if 0 - disable feature */ 8370aeed3e9SJustin Hibbits uint32_t fqTailDropThreshold; /**< if not "0" - enable tail drop on this FQR */ 8380aeed3e9SJustin Hibbits } t_QmFqrCongestionAvoidanceParams; 8390aeed3e9SJustin Hibbits 8400aeed3e9SJustin Hibbits /**************************************************************************//** 8410aeed3e9SJustin Hibbits @Description structure representing QM FQ-Range initialization parameters 8420aeed3e9SJustin Hibbits *//***************************************************************************/ 8430aeed3e9SJustin Hibbits typedef struct { 8440aeed3e9SJustin Hibbits t_Handle h_Qm; /**< A handle to a QM module */ 8450aeed3e9SJustin Hibbits t_Handle h_QmPortal; /**< A handle to a QM Portal Module; 8460aeed3e9SJustin Hibbits will be used only for Init and Free routines; 8470aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity */ 8480aeed3e9SJustin Hibbits bool initParked; /**< This FQ-Range will be initialize in park state (un-schedule) */ 8490aeed3e9SJustin Hibbits bool holdActive; /**< This FQ-Range can be parked (un-schedule); 8500aeed3e9SJustin Hibbits This affects only on queues destined to software portals*/ 8510aeed3e9SJustin Hibbits bool preferInCache; /**< Prefer this FQ-Range to be in QMAN's internal cache for all states */ 8520aeed3e9SJustin Hibbits bool useContextAForStash;/**< This FQ-Range will use context A for stash */ 8530aeed3e9SJustin Hibbits union { 8540aeed3e9SJustin Hibbits struct { 8550aeed3e9SJustin Hibbits uint8_t frameAnnotationSize;/**< Size of Frame Annotation to be stashed */ 8560aeed3e9SJustin Hibbits uint8_t frameDataSize; /**< Size of Frame Data to be stashed. */ 8570aeed3e9SJustin Hibbits uint8_t fqContextSize; /**< Size of FQ context to be stashed. */ 8580aeed3e9SJustin Hibbits uint64_t fqContextAddr; /**< 40 bit memory address containing the FQ context information to be stashed; 8590aeed3e9SJustin Hibbits Must be cacheline-aligned */ 8600aeed3e9SJustin Hibbits } stashingParams; 8610aeed3e9SJustin Hibbits t_QmContextA *p_ContextA; /**< context-A field to be written in the FQ structure */ 8620aeed3e9SJustin Hibbits }; 8630aeed3e9SJustin Hibbits t_QmContextB *p_ContextB; /**< context-B field to be written in the FQ structure; 8640aeed3e9SJustin Hibbits Note that this field may be used for Tx queues only! */ 8650aeed3e9SJustin Hibbits e_QmFQChannel channel; /**< Qm Channel */ 8660aeed3e9SJustin Hibbits uint8_t wq; /**< Work queue within the channel */ 8670aeed3e9SJustin Hibbits bool shadowMode; /**< If TRUE, useForce MUST set to TRUE and numOfFqids MUST set to '1' */ 8680aeed3e9SJustin Hibbits uint32_t numOfFqids; /**< number of fqids to be allocated*/ 8690aeed3e9SJustin Hibbits bool useForce; /**< TRUE - force allocation of specific fqids; 8700aeed3e9SJustin Hibbits FALSE - allocate several fqids */ 8710aeed3e9SJustin Hibbits union{ 8720aeed3e9SJustin Hibbits struct { 8730aeed3e9SJustin Hibbits uint32_t align; /**< alignment. will be used if useForce=FALSE */ 8740aeed3e9SJustin Hibbits } nonFrcQs; 8750aeed3e9SJustin Hibbits struct { 8760aeed3e9SJustin Hibbits uint32_t fqid; /**< the fqid base of the forced fqids. will be used if useForce=TRUE */ 8770aeed3e9SJustin Hibbits } frcQ; 8780aeed3e9SJustin Hibbits } qs; 8790aeed3e9SJustin Hibbits bool congestionAvoidanceEnable; 8800aeed3e9SJustin Hibbits /**< TRUE to enable congestion avoidance mechanism */ 8810aeed3e9SJustin Hibbits t_QmFqrCongestionAvoidanceParams congestionAvoidanceParams; 8820aeed3e9SJustin Hibbits /**< Parameters for congestion avoidance */ 8830aeed3e9SJustin Hibbits } t_QmFqrParams; 8840aeed3e9SJustin Hibbits 8850aeed3e9SJustin Hibbits 8860aeed3e9SJustin Hibbits /**************************************************************************//** 8870aeed3e9SJustin Hibbits @Function QM_FQR_Create 8880aeed3e9SJustin Hibbits 8890aeed3e9SJustin Hibbits @Description Initializing and enabling a Frame-Queue-Range. 8900aeed3e9SJustin Hibbits This routine should be called for adding an FQR. 8910aeed3e9SJustin Hibbits 8920aeed3e9SJustin Hibbits @Param[in] p_QmFqrParams - A structure of parameters for defining the 8930aeed3e9SJustin Hibbits desired queues parameters. 8940aeed3e9SJustin Hibbits 8950aeed3e9SJustin Hibbits @Return A handle to the initialized FQR on success; NULL code otherwise. 8960aeed3e9SJustin Hibbits 8970aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 8980aeed3e9SJustin Hibbits *//***************************************************************************/ 8990aeed3e9SJustin Hibbits t_Handle QM_FQR_Create(t_QmFqrParams *p_QmFqrParams); 9000aeed3e9SJustin Hibbits 9010aeed3e9SJustin Hibbits /**************************************************************************//** 9020aeed3e9SJustin Hibbits @Function QM_FQR_Free 9030aeed3e9SJustin Hibbits 9040aeed3e9SJustin Hibbits @Description Deleting and free all resources of an initialized FQR. 9050aeed3e9SJustin Hibbits 9060aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 9070aeed3e9SJustin Hibbits 9080aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 9090aeed3e9SJustin Hibbits 9100aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_FQR_Create() for this FQR. 9110aeed3e9SJustin Hibbits *//***************************************************************************/ 9120aeed3e9SJustin Hibbits t_Error QM_FQR_Free(t_Handle h_QmFqr); 9130aeed3e9SJustin Hibbits 9140aeed3e9SJustin Hibbits /**************************************************************************//** 9150aeed3e9SJustin Hibbits @Function QM_FQR_FreeWDrain 9160aeed3e9SJustin Hibbits 9170aeed3e9SJustin Hibbits @Description Deleting and free all resources of an initialized FQR 9180aeed3e9SJustin Hibbits with the option of draining. 9190aeed3e9SJustin Hibbits 9200aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 9210aeed3e9SJustin Hibbits @Param[in] f_CompletionCB - Pointer to a completion callback to be used in non-blocking mode. 9220aeed3e9SJustin Hibbits @Param[in] deliverFrame - TRUE for deliver the drained frames to the user; 9230aeed3e9SJustin Hibbits FALSE for not deliver the frames. 9240aeed3e9SJustin Hibbits @Param[in] f_CallBack - Pointer to a callback to handle the delivered frames. 9250aeed3e9SJustin Hibbits @Param[in] h_App - User's application descriptor. 9260aeed3e9SJustin Hibbits 9270aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 9280aeed3e9SJustin Hibbits 9290aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_FQR_Create() for this FQR. 9300aeed3e9SJustin Hibbits *//***************************************************************************/ 9310aeed3e9SJustin Hibbits t_Error QM_FQR_FreeWDrain(t_Handle h_QmFqr, 9320aeed3e9SJustin Hibbits t_QmFqrDrainedCompletionCB *f_CompletionCB, 9330aeed3e9SJustin Hibbits bool deliverFrame, 9340aeed3e9SJustin Hibbits t_QmReceivedFrameCallback *f_CallBack, 9350aeed3e9SJustin Hibbits t_Handle h_App); 9360aeed3e9SJustin Hibbits 9370aeed3e9SJustin Hibbits /** @} */ /* end of QM_fqr_init_grp group */ 9380aeed3e9SJustin Hibbits 9390aeed3e9SJustin Hibbits 9400aeed3e9SJustin Hibbits /**************************************************************************//** 9410aeed3e9SJustin Hibbits @Group QM_fqr_runtime_control_grp QM-FQR Runtime Control Unit 9420aeed3e9SJustin Hibbits 9430aeed3e9SJustin Hibbits @Description QM-FQR Runtime control unit API functions, definitions and enums. 9440aeed3e9SJustin Hibbits 9450aeed3e9SJustin Hibbits @{ 9460aeed3e9SJustin Hibbits *//***************************************************************************/ 9470aeed3e9SJustin Hibbits 9480aeed3e9SJustin Hibbits /**************************************************************************//** 9490aeed3e9SJustin Hibbits @Description enum for defining QM-FQR counters 9500aeed3e9SJustin Hibbits *//***************************************************************************/ 9510aeed3e9SJustin Hibbits typedef enum e_QmFqrCounters { 9520aeed3e9SJustin Hibbits e_QM_FQR_COUNTERS_FRAME = 0, /**< Total number of frames on this frame queue */ 9530aeed3e9SJustin Hibbits e_QM_FQR_COUNTERS_BYTE /**< Total number of bytes in all frames on this frame queue */ 9540aeed3e9SJustin Hibbits } e_QmFqrCounters; 9550aeed3e9SJustin Hibbits 9560aeed3e9SJustin Hibbits /**************************************************************************//** 9570aeed3e9SJustin Hibbits @Function QM_FQR_RegisterCB 9580aeed3e9SJustin Hibbits 9590aeed3e9SJustin Hibbits @Description Register a callback routine to be called when a frame comes from this FQ-Range 9600aeed3e9SJustin Hibbits 9610aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 9620aeed3e9SJustin Hibbits @Param[in] f_CallBack - An application callback 9630aeed3e9SJustin Hibbits @Param[in] h_App - User's application descriptor 9640aeed3e9SJustin Hibbits 9650aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 9660aeed3e9SJustin Hibbits 9670aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 9680aeed3e9SJustin Hibbits *//***************************************************************************/ 9690aeed3e9SJustin Hibbits t_Error QM_FQR_RegisterCB(t_Handle h_QmFqr, t_QmReceivedFrameCallback *f_CallBack, t_Handle h_App); 9700aeed3e9SJustin Hibbits 9710aeed3e9SJustin Hibbits /**************************************************************************//** 9720aeed3e9SJustin Hibbits @Function QM_FQR_Resume 9730aeed3e9SJustin Hibbits 9740aeed3e9SJustin Hibbits @Description Request to Re-Schedule this Fqid. 9750aeed3e9SJustin Hibbits 9760aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 9770aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM Portal Module; 9780aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity. 9790aeed3e9SJustin Hibbits @Param[in] fqidOffset - Fqid offset within the FQ-Range. 9800aeed3e9SJustin Hibbits 9810aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 9820aeed3e9SJustin Hibbits 9830aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 9840aeed3e9SJustin Hibbits *//***************************************************************************/ 9850aeed3e9SJustin Hibbits t_Error QM_FQR_Resume(t_Handle h_QmFqr, t_Handle h_QmPortal, uint32_t fqidOffset); 9860aeed3e9SJustin Hibbits 9870aeed3e9SJustin Hibbits /**************************************************************************//** 9880aeed3e9SJustin Hibbits @Function QM_FQR_Suspend 9890aeed3e9SJustin Hibbits 9900aeed3e9SJustin Hibbits @Description Request to Un-Schedule this Fqid. 9910aeed3e9SJustin Hibbits 9920aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 9930aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM Portal Module; 9940aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity. 9950aeed3e9SJustin Hibbits @Param[in] fqidOffset - Fqid offset within the FQ-Range. 9960aeed3e9SJustin Hibbits 9970aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 9980aeed3e9SJustin Hibbits 9990aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 10000aeed3e9SJustin Hibbits *//***************************************************************************/ 10010aeed3e9SJustin Hibbits t_Error QM_FQR_Suspend(t_Handle h_QmFqr, t_Handle h_QmPortal, uint32_t fqidOffset); 10020aeed3e9SJustin Hibbits 10030aeed3e9SJustin Hibbits /**************************************************************************//** 10040aeed3e9SJustin Hibbits @Function QM_FQR_GetFqid 10050aeed3e9SJustin Hibbits 10060aeed3e9SJustin Hibbits @Description Returned the Fqid base of the FQ-Range 10070aeed3e9SJustin Hibbits 10080aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 10090aeed3e9SJustin Hibbits 10100aeed3e9SJustin Hibbits @Return Fqid base. 10110aeed3e9SJustin Hibbits 10120aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 10130aeed3e9SJustin Hibbits *//***************************************************************************/ 10140aeed3e9SJustin Hibbits uint32_t QM_FQR_GetFqid(t_Handle h_QmFqr); 10150aeed3e9SJustin Hibbits 10160aeed3e9SJustin Hibbits /**************************************************************************//** 10170aeed3e9SJustin Hibbits @Function QM_FQR_GetCounter 10180aeed3e9SJustin Hibbits 10190aeed3e9SJustin Hibbits @Description Reads one of the QM-FQR counters. 10200aeed3e9SJustin Hibbits 10210aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 10220aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM Portal Module; 10230aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity. 10240aeed3e9SJustin Hibbits @Param[in] fqidOffset - Fqid offset within the FQ-Range. 10250aeed3e9SJustin Hibbits @Param[in] counter - The requested counter. 10260aeed3e9SJustin Hibbits 10270aeed3e9SJustin Hibbits @Return Counter's current value. 10280aeed3e9SJustin Hibbits 10290aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 10300aeed3e9SJustin Hibbits *//***************************************************************************/ 10310aeed3e9SJustin Hibbits uint32_t QM_FQR_GetCounter(t_Handle h_QmFqr, t_Handle h_QmPortal, uint32_t fqidOffset, e_QmFqrCounters counter); 10320aeed3e9SJustin Hibbits 10330aeed3e9SJustin Hibbits /** @} */ /* end of QM_fqr_runtime_control_grp group */ 10340aeed3e9SJustin Hibbits 10350aeed3e9SJustin Hibbits 10360aeed3e9SJustin Hibbits /**************************************************************************//** 10370aeed3e9SJustin Hibbits @Group QM_fqr_runtime_data_grp QM-FQR Runtime Data Unit 10380aeed3e9SJustin Hibbits 10390aeed3e9SJustin Hibbits @Description QM-FQR Runtime data unit API functions, definitions and enums. 10400aeed3e9SJustin Hibbits 10410aeed3e9SJustin Hibbits @{ 10420aeed3e9SJustin Hibbits *//***************************************************************************/ 10430aeed3e9SJustin Hibbits 10440aeed3e9SJustin Hibbits /**************************************************************************//** 10450aeed3e9SJustin Hibbits @Function QM_FQR_Enqueue 10460aeed3e9SJustin Hibbits 10470aeed3e9SJustin Hibbits @Description Enqueue the frame into the FQ to be transmitted. 10480aeed3e9SJustin Hibbits 10490aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 10500aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM Portal Module; 10510aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity. 10520aeed3e9SJustin Hibbits @Param[in] fqidOffset - Fqid offset within the FQ-Range. 10530aeed3e9SJustin Hibbits @Param[in] p_Frame - Pointer to the frame to be enqueued. 10540aeed3e9SJustin Hibbits 10550aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 10560aeed3e9SJustin Hibbits 10570aeed3e9SJustin Hibbits @Cautions Allowed only following QM_FQR_Create(). 10580aeed3e9SJustin Hibbits *//***************************************************************************/ 10590aeed3e9SJustin Hibbits t_Error QM_FQR_Enqueue(t_Handle h_QmFqr, t_Handle h_QmPortal, uint32_t fqidOffset, t_DpaaFD *p_Frame); 10600aeed3e9SJustin Hibbits 10610aeed3e9SJustin Hibbits /**************************************************************************//** 10620aeed3e9SJustin Hibbits @Function QM_FQR_PullFrame 10630aeed3e9SJustin Hibbits 10640aeed3e9SJustin Hibbits @Description Perform a Pull command. 10650aeed3e9SJustin Hibbits 10660aeed3e9SJustin Hibbits @Param[in] h_QmFqr - A handle to a QM-FQR Module. 10670aeed3e9SJustin Hibbits @Param[in] h_QmPortal - A handle to a QM Portal Module; 10680aeed3e9SJustin Hibbits NOTE : if NULL, assuming affinity. 10690aeed3e9SJustin Hibbits @Param[in] fqidOffset - Fqid offset within the FQ-Range. 10700aeed3e9SJustin Hibbits @Param[out] p_Frame - The Received Frame 10710aeed3e9SJustin Hibbits 10720aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 10730aeed3e9SJustin Hibbits 10740aeed3e9SJustin Hibbits @Cautions Allowed only following QM_PORTAL_Init(). 10750aeed3e9SJustin Hibbits *//***************************************************************************/ 10760aeed3e9SJustin Hibbits t_Error QM_FQR_PullFrame(t_Handle h_QmFqr, t_Handle h_QmPortal, uint32_t fqidOffset, t_DpaaFD *p_Frame); 10770aeed3e9SJustin Hibbits 10780aeed3e9SJustin Hibbits 10790aeed3e9SJustin Hibbits /** @} */ /* end of QM_fqr_runtime_data_grp group */ 10800aeed3e9SJustin Hibbits /** @} */ /* end of QM_fqr_grp group */ 10810aeed3e9SJustin Hibbits 10820aeed3e9SJustin Hibbits 10830aeed3e9SJustin Hibbits /**************************************************************************//** 10840aeed3e9SJustin Hibbits @Group QM_cg_grp QM Congestion Group API 10850aeed3e9SJustin Hibbits 10860aeed3e9SJustin Hibbits @Description QM-CG API functions, definitions and enums. 10870aeed3e9SJustin Hibbits 10880aeed3e9SJustin Hibbits @{ 10890aeed3e9SJustin Hibbits *//***************************************************************************/ 10900aeed3e9SJustin Hibbits 10910aeed3e9SJustin Hibbits /**************************************************************************//** 10920aeed3e9SJustin Hibbits @Group QM_cg_init_grp QM-Congestion Group Initialization Unit 10930aeed3e9SJustin Hibbits 10940aeed3e9SJustin Hibbits @Description QM-CG Initialization Unit 10950aeed3e9SJustin Hibbits 10960aeed3e9SJustin Hibbits @{ 10970aeed3e9SJustin Hibbits *//***************************************************************************/ 10980aeed3e9SJustin Hibbits 10990aeed3e9SJustin Hibbits /**************************************************************************//** 11000aeed3e9SJustin Hibbits @Description structure representing QM CG WRED curve 11010aeed3e9SJustin Hibbits *//***************************************************************************/ 11020aeed3e9SJustin Hibbits typedef struct t_QmCgWredCurve { 11030aeed3e9SJustin Hibbits uint32_t maxTh; /**< minimum threshold - below this level 11040aeed3e9SJustin Hibbits all packets are rejected (approximated 11050aeed3e9SJustin Hibbits to be expressed as x*2^y due to HW 11060aeed3e9SJustin Hibbits implementation)*/ 11070aeed3e9SJustin Hibbits uint32_t minTh; /**< minimum threshold - below this level 11080aeed3e9SJustin Hibbits all packets are accepted (approximated 11090aeed3e9SJustin Hibbits due to HW implementation)*/ 11100aeed3e9SJustin Hibbits uint8_t probabilityDenominator; /**< 1-64, the fraction of packets dropped 11110aeed3e9SJustin Hibbits when the average queue depth is at the 11120aeed3e9SJustin Hibbits maximum threshold.(approximated due to HW 11130aeed3e9SJustin Hibbits implementation). */ 11140aeed3e9SJustin Hibbits } t_QmCgWredCurve; 11150aeed3e9SJustin Hibbits 11160aeed3e9SJustin Hibbits /**************************************************************************//** 11170aeed3e9SJustin Hibbits @Description structure representing QM CG WRED parameters 11180aeed3e9SJustin Hibbits *//***************************************************************************/ 11190aeed3e9SJustin Hibbits typedef struct t_QmCgWredParams { 11200aeed3e9SJustin Hibbits bool enableGreen; 11210aeed3e9SJustin Hibbits t_QmCgWredCurve greenCurve; 11220aeed3e9SJustin Hibbits bool enableYellow; 11230aeed3e9SJustin Hibbits t_QmCgWredCurve yellowCurve; 11240aeed3e9SJustin Hibbits bool enableRed; 11250aeed3e9SJustin Hibbits t_QmCgWredCurve redCurve; 11260aeed3e9SJustin Hibbits } t_QmCgWredParams; 11270aeed3e9SJustin Hibbits 11280aeed3e9SJustin Hibbits /**************************************************************************//** 11290aeed3e9SJustin Hibbits @Description structure representing QM CG configuration parameters 11300aeed3e9SJustin Hibbits *//***************************************************************************/ 11310aeed3e9SJustin Hibbits typedef struct t_QmCgParams { 11320aeed3e9SJustin Hibbits t_Handle h_Qm; /**< A handle to a QM module */ 11330aeed3e9SJustin Hibbits t_Handle h_QmPortal; /**< A handle to a QM Portal Module; 11340aeed3e9SJustin Hibbits will be used for Init, Free and as 11350aeed3e9SJustin Hibbits an interrupt destination for cg state 11360aeed3e9SJustin Hibbits change (if CgStateChangeEnable = TRUE) */ 11370aeed3e9SJustin Hibbits bool frameCount; /**< TRUE for frame count, FALSE - byte count */ 11380aeed3e9SJustin Hibbits bool wredEnable; /**< if TRUE - WRED enabled. Each color is enabled independently 11390aeed3e9SJustin Hibbits so that some colors may use WRED, but others may use 11400aeed3e9SJustin Hibbits Tail drop - if enabled, or none. */ 11410aeed3e9SJustin Hibbits t_QmCgWredParams wredParams; /**< WRED parameters, relevant if wredEnable = TRUE*/ 11420aeed3e9SJustin Hibbits bool tailDropEnable; /**< if TRUE - Tail drop enabled */ 11430aeed3e9SJustin Hibbits uint32_t threshold; /**< If Tail drop - used as Tail drop threshold, otherwise 11440aeed3e9SJustin Hibbits 'threshold' may still be used to receive notifications 11450aeed3e9SJustin Hibbits when threshold is passed. If threshold and f_Exception 11460aeed3e9SJustin Hibbits are set, interrupts are set defaultly by driver. */ 11470aeed3e9SJustin Hibbits bool notifyDcPortal; /**< Relevant if this CG receives enqueues from a direct portal 11480aeed3e9SJustin Hibbits e_DPAA_DCPORTAL0 or e_DPAA_DCPORTAL1. TRUE to notify 11490aeed3e9SJustin Hibbits the DC portal, FALSE to notify this SW portal. */ 11500aeed3e9SJustin Hibbits e_DpaaDcPortal dcPortalId; /**< relevant if notifyDcPortal=TRUE - DC Portal id */ 11510aeed3e9SJustin Hibbits t_QmExceptionsCallback *f_Exception; /**< relevant and mandatory if threshold is configured and 11520aeed3e9SJustin Hibbits notifyDcPortal = FALSE. If threshold and f_Exception 11530aeed3e9SJustin Hibbits are set, interrupts are set defaultly by driver */ 11540aeed3e9SJustin Hibbits t_Handle h_App; /**< A handle to the application layer, will be passed as 11550aeed3e9SJustin Hibbits argument to f_Exception */ 11560aeed3e9SJustin Hibbits } t_QmCgParams; 11570aeed3e9SJustin Hibbits 11580aeed3e9SJustin Hibbits 11590aeed3e9SJustin Hibbits /**************************************************************************//** 11600aeed3e9SJustin Hibbits @Function QM_CG_Create 11610aeed3e9SJustin Hibbits 11620aeed3e9SJustin Hibbits @Description Create and configure a congestion Group. 11630aeed3e9SJustin Hibbits 11640aeed3e9SJustin Hibbits @Param[in] p_CgParams - CG parameters 11650aeed3e9SJustin Hibbits 11660aeed3e9SJustin Hibbits @Return A handle to the CG module 11670aeed3e9SJustin Hibbits 11680aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init(). 11690aeed3e9SJustin Hibbits *//***************************************************************************/ 11700aeed3e9SJustin Hibbits t_Handle QM_CG_Create(t_QmCgParams *p_CgParams); 11710aeed3e9SJustin Hibbits 11720aeed3e9SJustin Hibbits /**************************************************************************//** 11730aeed3e9SJustin Hibbits @Function QM_CG_Free 11740aeed3e9SJustin Hibbits 11750aeed3e9SJustin Hibbits @Description Deleting and free all resources of an initialized CG. 11760aeed3e9SJustin Hibbits 11770aeed3e9SJustin Hibbits @Param[in] h_QmCg - A handle to a QM-CG Module. 11780aeed3e9SJustin Hibbits 11790aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 11800aeed3e9SJustin Hibbits 11810aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_CR_Create() for this CG. 11820aeed3e9SJustin Hibbits *//***************************************************************************/ 11830aeed3e9SJustin Hibbits t_Error QM_CG_Free(t_Handle h_QmCg); 11840aeed3e9SJustin Hibbits 11850aeed3e9SJustin Hibbits /** @} */ /* end of QM_cg_init_grp group */ 11860aeed3e9SJustin Hibbits 11870aeed3e9SJustin Hibbits 11880aeed3e9SJustin Hibbits /**************************************************************************//** 11890aeed3e9SJustin Hibbits @Group QM_cg_runtime_control_grp QM-CG Runtime Control Unit 11900aeed3e9SJustin Hibbits 11910aeed3e9SJustin Hibbits @Description QM-CG Runtime control unit API functions, definitions and enums. 11920aeed3e9SJustin Hibbits 11930aeed3e9SJustin Hibbits @{ 11940aeed3e9SJustin Hibbits *//***************************************************************************/ 11950aeed3e9SJustin Hibbits 11960aeed3e9SJustin Hibbits /**************************************************************************//** 11970aeed3e9SJustin Hibbits @Description structure representing QM CG WRED colors 11980aeed3e9SJustin Hibbits *//***************************************************************************/ 11990aeed3e9SJustin Hibbits typedef enum e_QmCgColor { 12000aeed3e9SJustin Hibbits e_QM_CG_COLOR_GREEN, 12010aeed3e9SJustin Hibbits e_QM_CG_COLOR_YELLOW, 12020aeed3e9SJustin Hibbits e_QM_CG_COLOR_RED 12030aeed3e9SJustin Hibbits } e_QmCgColor; 12040aeed3e9SJustin Hibbits 12050aeed3e9SJustin Hibbits /**************************************************************************//** 12060aeed3e9SJustin Hibbits @Description structure representing QM CG modification parameters 12070aeed3e9SJustin Hibbits *//***************************************************************************/ 12080aeed3e9SJustin Hibbits typedef struct t_QmCgModifyWredParams { 12090aeed3e9SJustin Hibbits e_QmCgColor color; 12100aeed3e9SJustin Hibbits bool enable; 12110aeed3e9SJustin Hibbits t_QmCgWredCurve wredParams; 12120aeed3e9SJustin Hibbits } t_QmCgModifyWredParams; 12130aeed3e9SJustin Hibbits 12140aeed3e9SJustin Hibbits 12150aeed3e9SJustin Hibbits /**************************************************************************//** 12160aeed3e9SJustin Hibbits @Function QM_CG_SetException 12170aeed3e9SJustin Hibbits 12180aeed3e9SJustin Hibbits @Description Set CG exception. 12190aeed3e9SJustin Hibbits 12200aeed3e9SJustin Hibbits @Param[in] h_QmCg - A handle to a QM-CG Module. 12210aeed3e9SJustin Hibbits @Param[in] exception - exception enum 12220aeed3e9SJustin Hibbits @Param[in] enable - TRUE to enable, FALSE to disable. 12230aeed3e9SJustin Hibbits 12240aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 12250aeed3e9SJustin Hibbits 12260aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_CG_Create() for this CG. 12270aeed3e9SJustin Hibbits *//***************************************************************************/ 12280aeed3e9SJustin Hibbits t_Error QM_CG_SetException(t_Handle h_QmCg, e_QmExceptions exception, bool enable); 12290aeed3e9SJustin Hibbits 12300aeed3e9SJustin Hibbits /**************************************************************************//** 12310aeed3e9SJustin Hibbits @Function QM_CG_ModifyWredCurve 12320aeed3e9SJustin Hibbits 12330aeed3e9SJustin Hibbits @Description Change WRED curve parameters for a selected color. 12340aeed3e9SJustin Hibbits Note that this routine may be called only for valid CG's that 12350aeed3e9SJustin Hibbits already have been configured for WRED, and only need a change 12360aeed3e9SJustin Hibbits in the WRED parameters. 12370aeed3e9SJustin Hibbits 12380aeed3e9SJustin Hibbits @Param[in] h_QmCg - A handle to a QM-CG Module. 12390aeed3e9SJustin Hibbits @Param[in] p_QmCgModifyParams - A structure of new WRED parameters. 12400aeed3e9SJustin Hibbits 12410aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 12420aeed3e9SJustin Hibbits 12430aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_CG_Create() for this CG. 12440aeed3e9SJustin Hibbits *//***************************************************************************/ 12450aeed3e9SJustin Hibbits t_Error QM_CG_ModifyWredCurve(t_Handle h_QmCg, t_QmCgModifyWredParams *p_QmCgModifyParams); 12460aeed3e9SJustin Hibbits 12470aeed3e9SJustin Hibbits /**************************************************************************//** 12480aeed3e9SJustin Hibbits @Function QM_CG_ModifyTailDropThreshold 12490aeed3e9SJustin Hibbits 12500aeed3e9SJustin Hibbits @Description Change WRED curve parameters for a selected color. 12510aeed3e9SJustin Hibbits Note that this routine may be called only for valid CG's that 12520aeed3e9SJustin Hibbits already have been configured for tail drop, and only need a change 12530aeed3e9SJustin Hibbits in the threshold value. 12540aeed3e9SJustin Hibbits 12550aeed3e9SJustin Hibbits @Param[in] h_QmCg - A handle to a QM-CG Module. 12560aeed3e9SJustin Hibbits @Param[in] threshold - New threshold. 12570aeed3e9SJustin Hibbits 12580aeed3e9SJustin Hibbits @Return E_OK on success; Error code otherwise. 12590aeed3e9SJustin Hibbits 12600aeed3e9SJustin Hibbits @Cautions Allowed only following QM_Init() and QM_CG_Create() for this CG. 12610aeed3e9SJustin Hibbits *//***************************************************************************/ 12620aeed3e9SJustin Hibbits t_Error QM_CG_ModifyTailDropThreshold(t_Handle h_QmCg, uint32_t threshold); 12630aeed3e9SJustin Hibbits 12640aeed3e9SJustin Hibbits 12650aeed3e9SJustin Hibbits /** @} */ /* end of QM_cg_runtime_control_grp group */ 12660aeed3e9SJustin Hibbits /** @} */ /* end of QM_cg_grp group */ 12670aeed3e9SJustin Hibbits /** @} */ /* end of QM_grp group */ 12680aeed3e9SJustin Hibbits 12690aeed3e9SJustin Hibbits 12700aeed3e9SJustin Hibbits #endif /* __QM_EXT_H */ 1271