1 #ifndef __doxygen_HIDE /* This file is not part of the API */
8 * @brief Header file for the IXP400 ATM NPE API
12 * IXP400 SW Release version 2.0
14 * -- Copyright Notice --
17 * Copyright 2001-2005, Intel Corporation.
18 * All rights reserved.
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. Neither the name of the Intel Corporation nor the names of its contributors
30 * may be used to endorse or promote products derived from this software
31 * without specific prior written permission.
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
35 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
38 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * -- End of Copyright Notice --
51 * @defgroup IxNpeA IXP400 NPE-A (IxNpeA) API
53 * @brief The Public API for the IXP400 NPE-A
63 #include "IxQueueAssignments.h"
65 /* General Message Ids */
70 * @def IX_NPE_A_MSSG_ATM_UTOPIA_CONFIG_WRITE
72 * @brief ATM Message ID command to write the data to the offset in the
73 * Utopia Configuration Table
75 #define IX_NPE_A_MSSG_ATM_UTOPIA_CONFIG_WRITE 0x20
78 * @def IX_NPE_A_MSSG_ATM_UTOPIA_CONFIG_LOAD
80 * @brief ATM Message ID command triggers the NPE to copy the Utopia
81 * Configuration Table to the Utopia coprocessor
83 #define IX_NPE_A_MSSG_ATM_UTOPIA_CONFIG_LOAD 0x21
86 * @def IX_NPE_A_MSSG_ATM_UTOPIA_STATUS_UPLOAD
88 * @brief ATM Message ID command triggers the NPE to read-back the Utopia
89 * status registers and update the Utopia Status Table.
91 #define IX_NPE_A_MSSG_ATM_UTOPIA_STATUS_UPLOAD 0x22
94 * @def IX_NPE_A_MSSG_ATM_UTOPIA_STATUS_READ
96 * @brief ATM Message ID command to read the Utopia Status Table at the
99 #define IX_NPE_A_MSSG_ATM_UTOPIA_STATUS_READ 0x23
102 * @def IX_NPE_A_MSSG_ATM_TX_ENABLE
104 * @brief ATM Message ID command triggers the NPE to re-enable processing
105 * of any entries on the TxVcQ for this port.
107 * This command will be ignored for a port already enabled
109 #define IX_NPE_A_MSSG_ATM_TX_ENABLE 0x25
112 * @def IX_NPE_A_MSSG_ATM_TX_DISABLE
114 * @brief ATM Message ID command triggers the NPE to disable processing on
117 * This command will be ignored for a port already disabled
119 #define IX_NPE_A_MSSG_ATM_TX_DISABLE 0x26
122 * @def IX_NPE_A_MSSG_ATM_RX_ENABLE
124 * @brief ATM Message ID command triggers the NPE to process any received
125 * cells for this VC according to the VC Lookup Table.
127 * Re-issuing this command with different contents for a VC that is not
128 * disabled will cause unpredictable behavior.
130 #define IX_NPE_A_MSSG_ATM_RX_ENABLE 0x27
133 * @def IX_NPE_A_MSSG_ATM_RX_DISABLE
135 * @brief ATM Message ID command triggers the NPE to disable processing for
138 * This command will be ignored for a VC already disabled
140 #define IX_NPE_A_MSSG_ATM_RX_DISABLE 0x28
143 * @def IX_NPE_A_MSSG_ATM_STATUS_READ
145 * @brief ATM Message ID command to read the ATM status. The data is returned via
148 #define IX_NPE_A_MSSG_ATM_STATUS_READ 0x29
150 /*--------------------------------------------------------------------------
152 *--------------------------------------------------------------------------*/
155 * @def IX_NPE_A_MSSG_HSS_PORT_CONFIG_WRITE
157 * @brief HSS Message ID command writes the ConfigWord value to the location
158 * in the HSS_CONFIG_TABLE specified by offset for HSS port hPort.
160 #define IX_NPE_A_MSSG_HSS_PORT_CONFIG_WRITE 0x40
163 * @def IX_NPE_A_MSSG_HSS_PORT_CONFIG_LOAD
165 * @brief HSS Message ID command triggers the NPE to copy the contents of the
166 * HSS Configuration Table to the appropriate configuration registers in the
167 * HSS coprocessor for the port specified by hPort.
169 #define IX_NPE_A_MSSG_HSS_PORT_CONFIG_LOAD 0x41
172 * @def IX_NPE_A_MSSG_HSS_PORT_ERROR_READ
174 * @brief HSS Message ID command triggers the NPE to return an HssErrorReadResponse
175 * message for HSS port hPort.
177 #define IX_NPE_A_MSSG_HSS_PORT_ERROR_READ 0x42
180 * @def IX_NPE_A_MSSG_HSS_CHAN_FLOW_ENABLE
182 * @brief HSS Message ID command triggers the NPE to reset internal status and
183 * enable the HssChannelized operation on the HSS port specified by hPort.
185 #define IX_NPE_A_MSSG_HSS_CHAN_FLOW_ENABLE 0x43
188 * @def IX_NPE_A_MSSG_HSS_CHAN_FLOW_DISABLE
190 * @brief HSS Message ID command triggers the NPE to disable the HssChannelized
191 * operation on the HSS port specified by hPort.
193 #define IX_NPE_A_MSSG_HSS_CHAN_FLOW_DISABLE 0x44
196 * @def IX_NPE_A_MSSG_HSS_CHAN_IDLE_PATTERN_WRITE
198 * @brief HSS Message ID command writes the HSSnC_IDLE_PATTERN value for HSS
199 * port hPort. (n=hPort)
201 #define IX_NPE_A_MSSG_HSS_CHAN_IDLE_PATTERN_WRITE 0x45
204 * @def IX_NPE_A_MSSG_HSS_CHAN_NUM_CHANS_WRITE
206 * @brief HSS Message ID command writes the HSSnC_NUM_CHANNELS value for HSS
207 * port hPort. (n=hPort)
209 #define IX_NPE_A_MSSG_HSS_CHAN_NUM_CHANS_WRITE 0x46
212 * @def IX_NPE_A_MSSG_HSS_CHAN_RX_BUF_ADDR_WRITE
214 * @brief HSS Message ID command writes the HSSnC_RX_BUF_ADDR value for HSS
215 * port hPort. (n=hPort)
217 #define IX_NPE_A_MSSG_HSS_CHAN_RX_BUF_ADDR_WRITE 0x47
220 * @def IX_NPE_A_MSSG_HSS_CHAN_RX_BUF_CFG_WRITE
222 * @brief HSS Message ID command writes the HSSnC_RX_BUF_SIZEB and
223 * HSSnC_RX_TRIG_PERIOD values for HSS port hPort. (n=hPort)
225 #define IX_NPE_A_MSSG_HSS_CHAN_RX_BUF_CFG_WRITE 0x48
228 * @def IX_NPE_A_MSSG_HSS_CHAN_TX_BLK_CFG_WRITE
230 * @brief HSS Message ID command writes the HSSnC_TX_BLK1_SIZEB,
231 * HSSnC_TX_BLK1_SIZEW, HSSnC_TX_BLK2_SIZEB, and HSSnC_TX_BLK2_SIZEW values
232 * for HSS port hPort. (n=hPort)
234 #define IX_NPE_A_MSSG_HSS_CHAN_TX_BLK_CFG_WRITE 0x49
237 * @def IX_NPE_A_MSSG_HSS_CHAN_TX_BUF_ADDR_WRITE
238 * @brief HSS Message ID command writes the HSSnC_TX_BUF_ADDR value for HSS
239 * port hPort. (n=hPort)
241 #define IX_NPE_A_MSSG_HSS_CHAN_TX_BUF_ADDR_WRITE 0x4A
244 * @def IX_NPE_A_MSSG_HSS_CHAN_TX_BUF_SIZE_WRITE
246 * @brief HSS Message ID command writes the HSSnC_TX_BUF_SIZEN value for HSS
247 * port hPort. (n=hPort)
249 #define IX_NPE_A_MSSG_HSS_CHAN_TX_BUF_SIZE_WRITE 0x4B
252 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_FLOW_ENABLE
254 * @brief HSS Message ID command triggers the NPE to reset internal status and
255 * enable the HssPacketized operation for the flow specified by pPipe on
256 * the HSS port specified by hPort.
258 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_FLOW_ENABLE 0x50
261 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_FLOW_DISABLE
262 * @brief HSS Message ID command triggers the NPE to disable the HssPacketized
263 * operation for the flow specified by pPipe on the HSS port specified by hPort.
265 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_FLOW_DISABLE 0x51
268 * @def IX_NPE_A_MSSG_HSS_PKT_NUM_PIPES_WRITE
269 * @brief HSS Message ID command writes the HSSnP_NUM_PIPES value for HSS
270 * port hPort.(n=hPort)
272 #define IX_NPE_A_MSSG_HSS_PKT_NUM_PIPES_WRITE 0x52
275 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_FIFO_SIZEW_WRITE
277 * @brief HSS Message ID command writes the HSSnP_PIPEp_FIFOSIZEW value for
278 * packet-pipe pPipe on HSS port hPort. (n=hPort, p=pPipe)
280 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_FIFO_SIZEW_WRITE 0x53
283 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_HDLC_CFG_WRITE
285 * @brief HSS Message ID command writes the HSSnP_PIPEp_HDLC_RXCFG and
286 * HSSnP_PIPEp_HDLC_TXCFG values for packet-pipe pPipe on HSS port hPort.
289 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_HDLC_CFG_WRITE 0x54
292 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_IDLE_PATTERN_WRITE
294 * @brief HSS Message ID command writes the HSSnP_PIPEp_IDLE_PATTERN value
295 * for packet-pipe pPipe on HSS port hPort. (n=hPort, p=pPipe)
297 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_IDLE_PATTERN_WRITE 0x55
300 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_RX_SIZE_WRITE
302 * @brief HSS Message ID command writes the HSSnP_PIPEp_RXSIZEB value for
303 * packet-pipe pPipe on HSS port hPort. (n=hPort, p=pPipe)
305 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_RX_SIZE_WRITE 0x56
308 * @def IX_NPE_A_MSSG_HSS_PKT_PIPE_MODE_WRITE
310 * @brief HSS Message ID command writes the HSSnP_PIPEp_MODE value for
311 * packet-pipe pPipe on HSS port hPort. (n=hPort, p=pPipe)
313 #define IX_NPE_A_MSSG_HSS_PKT_PIPE_MODE_WRITE 0x57
317 /* Queue Entry Masks */
319 /*--------------------------------------------------------------------------
320 * ATM Descriptor Structure offsets
321 *--------------------------------------------------------------------------*/
324 * @def IX_NPE_A_RXDESCRIPTOR_STATUS_OFFSET
326 * @brief ATM Descriptor structure offset for Receive Descriptor Status field
328 * It is used for descriptor error reporting.
330 #define IX_NPE_A_RXDESCRIPTOR_STATUS_OFFSET 0
333 * @def IX_NPE_A_RXDESCRIPTOR_VCID_OFFSET
335 * @brief ATM Descriptor structure offset for Receive Descriptor VC ID field
337 * It is used to hold an identifier number for this VC
339 #define IX_NPE_A_RXDESCRIPTOR_VCID_OFFSET 1
342 * @def IX_NPE_A_RXDESCRIPTOR_CURRMBUFSIZE_OFFSET
344 * @brief ATM Descriptor structure offset for Receive Descriptor Current Mbuf
347 * Number of bytes the current mbuf data buffer can hold
349 #define IX_NPE_A_RXDESCRIPTOR_CURRMBUFSIZE_OFFSET 2
352 * @def IX_NPE_A_RXDESCRIPTOR_ATMHEADER_OFFSET
354 * @brief ATM Descriptor structure offset for Receive Descriptor ATM Header
356 #define IX_NPE_A_RXDESCRIPTOR_ATMHEADER_OFFSET 4
359 * @def IX_NPE_A_RXDESCRIPTOR_CURRMBUFLEN_OFFSET
361 * @brief ATM Descriptor structure offset for Receive Descriptor Current MBuf length
364 * RX - Initialized to zero. The NPE updates this field as each cell is received and
365 * zeroes it with every new mbuf for chaining. Will not be bigger than currBbufSize.
367 #define IX_NPE_A_RXDESCRIPTOR_CURRMBUFLEN_OFFSET 12
370 * @def IX_NPE_A_RXDESCRIPTOR_TIMELIMIT__OFFSET
372 * @brief ATM Descriptor structure offset for Receive Descriptor Time Limit field
374 * Contains the Payload Reassembly Time Limit (used for aal0_xx only)
376 #define IX_NPE_A_RXDESCRIPTOR_TIMELIMIT_OFFSET 14
379 * @def IX_NPE_A_RXDESCRIPTOR_PCURRMBUFF_OFFSET
381 * @brief ATM Descriptor structure offset for Receive Descriptor Current MBuf Pointer
383 * The current mbuf pointer of a chain of mbufs.
385 #define IX_NPE_A_RXDESCRIPTOR_PCURRMBUFF_OFFSET 20
388 * @def IX_NPE_A_RXDESCRIPTOR_PCURRMBUFDATA_OFFSET
390 * @brief ATM Descriptor structure offset for Receive Descriptor Current MBuf Pointer
392 * Pointer to the next byte to be read or next free location to be written.
394 #define IX_NPE_A_RXDESCRIPTOR_PCURRMBUFDATA_OFFSET 24
397 * @def IX_NPE_A_RXDESCRIPTOR_PNEXTMBUF_OFFSET
399 * @brief ATM Descriptor structure offset for Receive Descriptor Next MBuf Pointer
401 * Pointer to the next MBuf in a chain of MBufs.
403 #define IX_NPE_A_RXDESCRIPTOR_PNEXTMBUF_OFFSET 28
406 * @def IX_NPE_A_RXDESCRIPTOR_TOTALLENGTH_OFFSET
408 * @brief ATM Descriptor structure offset for Receive Descriptor Total Length
410 * Total number of bytes written to the chain of MBufs by the NPE
412 #define IX_NPE_A_RXDESCRIPTOR_TOTALLENGTH_OFFSET 32
415 * @def IX_NPE_A_RXDESCRIPTOR_AAL5CRCRESIDUE_OFFSET
417 * @brief ATM Descriptor structure offset for Receive Descriptor AAL5 CRC Residue
419 * Current CRC value for a PDU
421 #define IX_NPE_A_RXDESCRIPTOR_AAL5CRCRESIDUE_OFFSET 36
424 * @def IX_NPE_A_RXDESCRIPTOR_SIZE
426 * @brief ATM Descriptor structure offset for Receive Descriptor Size
428 * The size of the Receive descriptor
430 #define IX_NPE_A_RXDESCRIPTOR_SIZE 40
433 * @def IX_NPE_A_TXDESCRIPTOR_PORT_OFFSET
435 * @brief ATM Descriptor structure offset for Transmit Descriptor Port
439 #define IX_NPE_A_TXDESCRIPTOR_PORT_OFFSET 0
442 * @def IX_NPE_A_TXDESCRIPTOR_RSVD_OFFSET
444 * @brief ATM Descriptor structure offset for Transmit Descriptor RSVD
446 #define IX_NPE_A_TXDESCRIPTOR_RSVD_OFFSET 1
449 * @def IX_NPE_A_TXDESCRIPTOR_CURRMBUFLEN_OFFSET
451 * @brief ATM Descriptor structure offset for Transmit Descriptor Current MBuf Length
453 * TX - Initialized by the XScale to the number of bytes in the current MBuf data buffer.
454 * The NPE decrements this field for every transmitted cell. Thus, when the NPE writes a
455 * descriptor the TxDone queue, this field will equal zero.
457 #define IX_NPE_A_TXDESCRIPTOR_CURRMBUFLEN_OFFSET 2
460 * @def IX_NPE_A_TXDESCRIPTOR_ATMHEADER_OFFSET
461 * @brief ATM Descriptor structure offset for Transmit Descriptor ATM Header
463 #define IX_NPE_A_TXDESCRIPTOR_ATMHEADER_OFFSET 4
466 * @def IX_NPE_A_TXDESCRIPTOR_PCURRMBUFF_OFFSET
468 * @brief ATM Descriptor structure offset for Transmit Descriptor Pointer to the current MBuf chain
470 #define IX_NPE_A_TXDESCRIPTOR_PCURRMBUFF_OFFSET 8
473 * @def IX_NPE_A_TXDESCRIPTOR_PCURRMBUFDATA_OFFSET
475 * @brief ATM Descriptor structure offset for Transmit Descriptor Pointer to the current MBuf Data
477 * Pointer to the next byte to be read or next free location to be written.
479 #define IX_NPE_A_TXDESCRIPTOR_PCURRMBUFDATA_OFFSET 12
482 * @def IX_NPE_A_TXDESCRIPTOR_PNEXTMBUF_OFFSET
484 * @brief ATM Descriptor structure offset for Transmit Descriptor Pointer to the Next MBuf chain
486 #define IX_NPE_A_TXDESCRIPTOR_PNEXTMBUF_OFFSET 16
489 * @def IX_NPE_A_TXDESCRIPTOR_TOTALLENGTH_OFFSET
491 * @brief ATM Descriptor structure offset for Transmit Descriptor Total Length
493 * Total number of bytes written to the chain of MBufs by the NPE
495 #define IX_NPE_A_TXDESCRIPTOR_TOTALLENGTH_OFFSET 20
498 * @def IX_NPE_A_TXDESCRIPTOR_AAL5CRCRESIDUE_OFFSET
500 * @brief ATM Descriptor structure offset for Transmit Descriptor AAL5 CRC Residue
502 * Current CRC value for a PDU
504 #define IX_NPE_A_TXDESCRIPTOR_AAL5CRCRESIDUE_OFFSET 24
507 * @def IX_NPE_A_TXDESCRIPTOR_SIZE
509 * @brief ATM Descriptor structure offset for Transmit Descriptor Size
511 #define IX_NPE_A_TXDESCRIPTOR_SIZE 28
514 * @def IX_NPE_A_CHAIN_DESC_COUNT_MAX
516 * @brief Maximum number of chained MBufs that can be chained together
518 #define IX_NPE_A_CHAIN_DESC_COUNT_MAX 256
521 * Definition of the ATM cell header
523 * This would most conviently be defined as the bit field shown below.
524 * Endian portability prevents this, therefore a set of macros
525 * are defined to access the fields within the cell header assumed to
526 * be passed as a UINT32.
528 * Changes to field sizes or orders must be reflected in the offset
533 * unsigned int gfc:4;
534 * unsigned int vpi:8;
535 * unsigned int vci:16;
536 * unsigned int pti:3;
537 * unsigned int clp:1;
538 * } IxNpeA_AtmCellHeader;
542 /** Mask to acess GFC */
543 #define GFC_MASK 0xf0000000
545 /** return GFC from ATM cell header */
546 #define IX_NPE_A_ATMCELLHEADER_GFC_GET( header ) \
547 (((header) & GFC_MASK) >> 28)
549 /** set GFC into ATM cell header */
550 #define IX_NPE_A_ATMCELLHEADER_GFC_SET( header,gfc ) \
552 (header) &= ~GFC_MASK; \
553 (header) |= (((gfc) << 28) & GFC_MASK); \
556 /** Mask to acess VPI */
557 #define VPI_MASK 0x0ff00000
559 /** return VPI from ATM cell header */
560 #define IX_NPE_A_ATMCELLHEADER_VPI_GET( header ) \
561 (((header) & VPI_MASK) >> 20)
563 /** set VPI into ATM cell header */
564 #define IX_NPE_A_ATMCELLHEADER_VPI_SET( header, vpi ) \
566 (header) &= ~VPI_MASK; \
567 (header) |= (((vpi) << 20) & VPI_MASK); \
570 /** Mask to acess VCI */
571 #define VCI_MASK 0x000ffff0
573 /** return VCI from ATM cell header */
574 #define IX_NPE_A_ATMCELLHEADER_VCI_GET( header ) \
575 (((header) & VCI_MASK) >> 4)
577 /** set VCI into ATM cell header */
578 #define IX_NPE_A_ATMCELLHEADER_VCI_SET( header, vci ) \
580 (header) &= ~VCI_MASK; \
581 (header) |= (((vci) << 4) & VCI_MASK); \
584 /** Mask to acess PTI */
585 #define PTI_MASK 0x0000000e
587 /** return PTI from ATM cell header */
588 #define IX_NPE_A_ATMCELLHEADER_PTI_GET( header ) \
589 (((header) & PTI_MASK) >> 1)
591 /** set PTI into ATM cell header */
592 #define IX_NPE_A_ATMCELLHEADER_PTI_SET( header, pti ) \
594 (header) &= ~PTI_MASK; \
595 (header) |= (((pti) << 1) & PTI_MASK); \
598 /** Mask to acess CLP */
599 #define CLP_MASK 0x00000001
601 /** return CLP from ATM cell header */
602 #define IX_NPE_A_ATMCELLHEADER_CLP_GET( header ) \
603 ((header) & CLP_MASK)
605 /** set CLP into ATM cell header */
606 #define IX_NPE_A_ATMCELLHEADER_CLP_SET( header, clp ) \
608 (header) &= ~CLP_MASK; \
609 (header) |= ((clp) & CLP_MASK); \
614 * Definition of the Rx bitfield
616 * This would most conviently be defined as the bit field shown below.
617 * Endian portability prevents this, therefore a set of macros
618 * are defined to access the fields within the rxBitfield assumed to
619 * be passed as a UINT32.
621 * Changes to field sizes or orders must be reflected in the offset
626 * { IX_NPEA_RXBITFIELD(
627 * unsigned int status:1,
628 * unsigned int port:7,
629 * unsigned int vcId:8,
630 * unsigned int currMbufSize:16);
635 /** Mask to acess the rxBitField status */
636 #define STATUS_MASK 0x80000000
638 /** return the rxBitField status */
639 #define IX_NPE_A_RXBITFIELD_STATUS_GET( rxbitfield ) \
640 (((rxbitfield) & STATUS_MASK) >> 31)
642 /** set the rxBitField status */
643 #define IX_NPE_A_RXBITFIELD_STATUS_SET( rxbitfield, status ) \
645 (rxbitfield) &= ~STATUS_MASK; \
646 (rxbitfield) |= (((status) << 31) & STATUS_MASK); \
649 /** Mask to acess the rxBitField port */
650 #define PORT_MASK 0x7f000000
652 /** return the rxBitField port */
653 #define IX_NPE_A_RXBITFIELD_PORT_GET( rxbitfield ) \
654 (((rxbitfield) & PORT_MASK) >> 24)
656 /** set the rxBitField port */
657 #define IX_NPE_A_RXBITFIELD_PORT_SET( rxbitfield, port ) \
659 (rxbitfield) &= ~PORT_MASK; \
660 (rxbitfield) |= (((port) << 24) & PORT_MASK); \
663 /** Mask to acess the rxBitField vcId */
664 #define VCID_MASK 0x00ff0000
666 /** return the rxBitField vcId */
667 #define IX_NPE_A_RXBITFIELD_VCID_GET( rxbitfield ) \
668 (((rxbitfield) & VCID_MASK) >> 16)
670 /** set the rxBitField vcId */
671 #define IX_NPE_A_RXBITFIELD_VCID_SET( rxbitfield, vcid ) \
673 (rxbitfield) &= ~VCID_MASK; \
674 (rxbitfield) |= (((vcid) << 16) & VCID_MASK); \
677 /** Mask to acess the rxBitField mbuf size */
678 #define CURRMBUFSIZE_MASK 0x0000ffff
680 /** return the rxBitField mbuf size */
681 #define IX_NPE_A_RXBITFIELD_CURRMBUFSIZE_GET( rxbitfield ) \
682 ((rxbitfield) & CURRMBUFSIZE_MASK)
684 /** set the rxBitField mbuf size */
685 #define IX_NPE_A_RXBITFIELD_CURRMBUFSIZE_SET( rxbitfield, currmbufsize ) \
687 (rxbitfield) &= ~CURRMBUFSIZE_MASK; \
688 (rxbitfield) |= ((currmbufsize) & CURRMBUFSIZE_MASK); \
694 * @brief Tx Descriptor definition
698 UINT8 port
; /**< Tx Port number */
699 UINT8 aalType
; /**< AAL Type */
700 UINT16 currMbufLen
; /**< mbuf length */
701 UINT32 atmCellHeader
; /**< ATM cell header */
702 IX_OSAL_MBUF
*pCurrMbuf
; /**< pointer to mbuf */
703 unsigned char *pCurrMbufData
; /**< Pointer to mbuf->dat */
704 IX_OSAL_MBUF
*pNextMbuf
; /**< Pointer to next mbuf */
705 UINT32 totalLen
; /**< Total Length */
706 UINT32 aal5CrcResidue
; /**< AAL5 CRC Residue */
709 /* Changes to field sizes or orders must be reflected in the offset
710 * definitions above. */
716 * @brief Rx Descriptor definition
720 UINT32 rxBitField
; /**< Recieved bit field */
721 UINT32 atmCellHeader
; /**< ATM Cell Header */
722 UINT32 rsvdWord0
; /**< Reserved field */
723 UINT16 currMbufLen
; /**< Mbuf Length */
724 UINT8 timeLimit
; /**< Payload Reassembly timeLimit (used for aal0_xx only) */
725 UINT8 rsvdByte0
; /**< Reserved field */
726 UINT32 rsvdWord1
; /**< Reserved field */
727 IX_OSAL_MBUF
*pCurrMbuf
; /**< Pointer to current mbuf */
728 unsigned char *pCurrMbufData
; /**< Pointer to current mbuf->data */
729 IX_OSAL_MBUF
*pNextMbuf
; /**< Pointer to next mbuf */
730 UINT32 totalLen
; /**< Total Length */
731 UINT32 aal5CrcResidue
; /**< AAL5 CRC Residue */
736 * @brief NPE-A AAL Type
740 IX_NPE_A_AAL_TYPE_INVALID
= 0, /**< Invalid AAL type */
741 IX_NPE_A_AAL_TYPE_0_48
= 0x1, /**< AAL0 - 48 byte */
742 IX_NPE_A_AAL_TYPE_0_52
= 0x2, /**< AAL0 - 52 byte */
743 IX_NPE_A_AAL_TYPE_5
= 0x5, /**< AAL5 */
744 IX_NPE_A_AAL_TYPE_OAM
= 0xF /**< OAM */
748 * @brief NPE-A Payload format 52-bytes & 48-bytes
752 IX_NPE_A_52_BYTE_PAYLOAD
= 0, /**< 52 byte payload */
753 IX_NPE_A_48_BYTE_PAYLOAD
/**< 48 byte payload */
754 } IxNpeA_PayloadFormat
;
757 * @brief HSS Packetized NpePacket Descriptor Structure
761 UINT8 status
; /**< Status of the packet passed to the client */
762 UINT8 errorCount
; /**< Number of errors */
763 UINT8 chainCount
; /**< Mbuf chain count e.g. 0 - No mbuf chain */
764 UINT8 rsvdByte0
; /**< Reserved byte to make the descriptor word align */
766 UINT16 packetLength
; /**< Packet Length */
767 UINT16 rsvdShort0
; /**< Reserved short to make the descriptor a word align */
769 IX_OSAL_MBUF
*pRootMbuf
; /**< Pointer to Root mbuf */
770 IX_OSAL_MBUF
*pNextMbuf
; /**< Pointer to next mbuf */
771 UINT8
*pMbufData
; /**< Pointer to the current mbuf->data */
772 UINT32 mbufLength
; /**< Current mbuf length */
774 } IxNpeA_NpePacketDescriptor
;
782 #endif /* __doxygen_HIDE */