📄 ixatmdtxtransport_p.h
字号:
/** * @file IxAtmdTxTransport_p.h * * @author Intel Corporation * @date 17 March 2002 * * @brief IxAtmdAcc Tx Transport * * The functions in this module are carrying the datapath and are time-critical * * Design Notes: * The implementation of this module focus on performances * * * @par * IXP400 SW Release version 2.1 * * -- Copyright Notice -- * * @par * Copyright (c) 2001-2005, Intel Corporation. * All rights reserved. * * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * @par * -- End of Copyright Notice -- */#ifndef IX_ATMDACC_TX_TRANSPORT_P_H#define IX_ATMDACC_TX_TRANSPORT_P_H#include "IxQMgr.h"#include "IxAtmdAccCtrl.h"#include "IxAtmdNpe_p.h"#include "IxAtmdDefines_p.h"#include "IxAtmdSwQueue_p.h"/*** @def IX_ATMDACC_TX_TRANSPORT_EXTERN* @brief This macro controls the declaration of data in IxAtmdTxTransport.c* and their definition as extern in other files*/#ifndef IX_ATMDACC_TX_TRANSPORT_EXTERN#define IX_ATMDACC_TX_TRANSPORT_EXTERN extern#endif/*** @def IX_ATMDACC_TX_INVALID_CONNID* @brief Invalid connection Id, used to flag an unused channel*/#define IX_ATMDACC_TX_INVALID_CONNID (IX_ATM_MAX_NUM_AAL_OAM_TX_VCS - 1)/*** @def IX_ATMDACC_TX_VC_INUSE* @brief Check if a channel is used using the connectionId value*/#define IX_ATMDACC_TX_VC_INUSE(connId) \ (((connId) / IX_ATM_MAX_NUM_AAL_OAM_TX_VCS) != 0)/*** @def IX_ATMDACC_TX_VC_INDEX_GET* @brief Get the Npe Vc Id from the connection Id*/#define IX_ATMDACC_TX_VC_INDEX_GET(connId) \ ((connId) % IX_ATM_MAX_NUM_AAL_OAM_TX_VCS)/*** @def IX_ATMDACC_TX_DISCONNECTCHECK* @brief Set a connection Id to mark that there is a disconnect in progress*/#define IX_ATMDACC_TX_DISCONNECTCHECK(connId, descConnId) \ ((descConnId) == ((connId) + IX_ATM_MAX_NUM_AAL_OAM_TX_VCS))/*** @def IX_ATMDACC_TX_DISCONNECTING* @brief Set a connection Id to mark that there is a disconnect in progress*/#define IX_ATMDACC_TX_DISCONNECTING(connId) \ ((connId) + IX_ATM_MAX_NUM_AAL_OAM_TX_VCS)/*** @def IX_ATMDACC_TX_DISCONNECTED* @brief Check if a channel is being disconnected*/#define IX_ATMDACC_TX_DISCONNECTED(connId) \ ((((connId) / IX_ATM_MAX_NUM_AAL_OAM_TX_VCS) & 1) == 0)/*** @def IX_ATMDACC_TX_QUEUE_ENTRY_TYPE* @brief Define the type of an Tx Queue Entry*/#define IX_ATMDACC_TX_QUEUE_ENTRY_TYPE IxAtmdAccNpeDescriptor/*** @brief Generate a typedef for a Tx specific s/w queue*/IX_ATMDACC_SWQ_TYPE(IX_ATMDACC_TX_QUEUE_ENTRY_TYPE);/*** @def IX_ATMDACC_TX_QUEUE* @brief Define a short form for the type of a Tx Queue* The short form IX_ATMDACC_TX_QUEUE is defined* by using the ## operator to concatenate* the fixed string "IxAtmdAccSwQueueOfType_" with the* actual type being passed as a macro parameter.* The resulting string is identitical with the typedef* name created by macro IX_ATMDACC_SWQ_TYPE.*/#define IX_ATMDACC_TX_QUEUE IxAtmdAccSwQueueOfType_ ## IX_ATMDACC_TX_QUEUE_ENTRY_TYPE/*** @def IX_ATMDACC_TXQ_INIT* @brief Initialise the Tx queue to the specified size*/#define IX_ATMDACC_TXQ_INIT(queue,size,buffer) \ IX_ATMDACC_SWQ_STATIC_INIT((queue), IX_ATMDACC_TX_QUEUE_ENTRY_TYPE, (size),(buffer)); \ IX_ATMDACC_SWQ_HEAD_ADVANCE((queue),IX_ATMDACC_SWQ_SIZE(queue))/*** @def IX_ATMDACC_TXQ_INITIALISED* @brief Check that the Initialisation of the Tx Queue was successfull*/#define IX_ATMDACC_TXQ_INITIALISED(queue) \ IX_ATMDACC_SWQ_INITIALISED(queue)/*** @def IX_ATMDACC_TXQ_RESET* @brief Reset the queue to initial empty values*/#define IX_ATMDACC_TXQ_RESET(queue) \ IX_ATMDACC_SWQ_RESET(queue)/*** @def IX_ATMDACC_TXQ_RELEASE_RESOURCES* @brief Release any memory allocated to an Tx Queue*/#define IX_ATMDACC_TXQ_RELEASE_RESOURCES(queue) \ IX_ATMDACC_SWQ_RELEASE_RESOURCES(queue)/*** @def IX_ATMDACC_TXQ_SIZE* @brief return the size of a queue*/#define IX_ATMDACC_TXQ_SIZE(queue) \ IX_ATMDACC_SWQ_SIZE(queue)/*** @def IX_ATMDACC_TXQ_ENTRY_IDXSET* @brief Set an entry ditrectly at the specified index in the Tx queue*/#define IX_ATMDACC_TXQ_ENTRY_IDXSET(queue,index,entry) \ IX_ATMDACC_SWQ_ENTRY_IDXSET(queue,index,entry)/*** @def IX_ATMDACC_TXQ_ENTRY_IDXGET* @brief return an entry ditrectly from the specified index in the Tx queue*/#define IX_ATMDACC_TXQ_ENTRY_IDXGET(queue,index) \ IX_ATMDACC_SWQ_ENTRY_IDXGET(queue,index)/*** @def IX_ATMDACC_TXQ_CONSISTENT* @brief Check the software TX Queue consistency** These conditions should always be true. If not, this means that* the software TX queue is badly corrupted.**/#define IX_ATMDACC_TXQ_CONSISTENT(queue) \ ((((queue)->head - (queue)->tail) >= 0) && \ (((queue)->head - (queue)->mid) >= 0) && \ (((queue)->mid - (queue)->tail) >= 0) && \ (((queue)->head - (queue)->mid) <= (queue)->size) && \ (((queue)->mid - (queue)->tail) <= (queue)->size) && \ (((queue)->head - (queue)->tail) <= (queue)->size))/*** @def IX_ATMDACC_TXQ_TAIL* @brief Get the Tail pointer of a software TX Queue*/#define IX_ATMDACC_TXQ_TAIL(queue) \ IX_ATMDACC_SWQ_TAIL(queue)/*** @def IX_ATMDACC_TXQ_TAIL_INCR* @brief Increment the Tail pointer of a software TX Queue** @note - This action is done during a TxProcessPerform step*/#define IX_ATMDACC_TXQ_TAIL_INCR(queue) \ IX_ATMDACC_SWQ_TAIL_INCR(queue)/*** @def IX_ATMDACC_TXQ_HEAD* @brief Get the Head pointer of a software TX Queue*/#define IX_ATMDACC_TXQ_HEAD(queue) \ IX_ATMDACC_SWQ_HEAD(queue)/*** @def IX_ATMDACC_TXQ_HEAD_INCR* @brief Increment the Head pointer of a software TX Queue** @note - This action is done during a TxDone step*/#define IX_ATMDACC_TXQ_HEAD_INCR(queue) \ IX_ATMDACC_SWQ_HEAD_INCR(queue)/*** @def IX_ATMDACC_TXQ_MID* @brief Get a pointer inside a software TX Queue*/#define IX_ATMDACC_TXQ_MID(queue) \ IX_ATMDACC_SWQ_MID(queue)/*** @def IX_ATMDACC_TXQ_MID_INCR* @brief Increment a pointer of a software TX Queue** @note - This action is done during a TxPduSubmit step*/#define IX_ATMDACC_TXQ_MID_INCR(queue) \ IX_ATMDACC_SWQ_MID_INCR(queue)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -