SPRUGR9H November 2010 – April 2015 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , 66AK2L06 , AM5K2E02 , AM5K2E04 , SM320C6678-HIREL , TMS320C6652 , TMS320C6654 , TMS320C6655 , TMS320C6657 , TMS320C6670 , TMS320C6671 , TMS320C6672 , TMS320C6674 , TMS320C6678
Host packet descriptors are designed to be used when the application requires support for true, unlimited fragment count scatter / gather-type operations. The host packet descriptor contains the following information:
Host packet descriptors always contain 32 bytes of required information and may also contain optional software-specific information and protocol-specific information. How much optional information (and therefore the allocated size of the descriptors) is required is application-dependent. The descriptor layout is shown in Table 3-1.
Packet info (12 bytes) |
Buffer info (8 bytes) |
Linking info (4 bytes) |
Original buffer info
(8 bytes) |
Extended packet info block (optional)
Includes timestamp and software data (16 bytes) |
Protocol-specific data (optional)
(0 to M bytes where M is a multiple of 4) |
Other SW data (optional and user defined) |
Packet info
(12 bytes) |
Buffer info (8 bytes) |
Linking info
(4 bytes) |
Original buffer info
(8 bytes) |
Extended packet info block (optional)
Includes timestamp and software data (16 bytes) |
Protocol-specific data (optional)
(0 to M bytes where M is a multiple of 4) |
Other SW data (optional and user defined) |
Host packet descriptors may be linked with zero or more additional host buffer descriptors in a singly-linked-list fashion to form packets. Each host packet consists of a single host packet descriptor followed by a chain of zero or more host buffer descriptors linked together using the next descriptor pointer fields in the descriptors. The last descriptor in a host packet has a 0 next descriptor pointer.
The other SW data portion of the descriptor exists after all of the defined words and is reserved for use by the host software to store completely private data. This region is not used in any way by the DMA or queue manager modules in a Multicore Navigator system and these modules will not modify any bytes within this region.
The contents of the host packet descriptor words are detailed in the following tables:
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-30 | Packet Id | Host packet descriptor type identifier. Value is always 0 (0x0) for Host Packet descriptors. | Yes |
29-25 | Packet Type | This field indicates the type of this packet and is encoded as follows:
0-31 = To Be Assigned |
Yes |
24-23 | Reserved | Unused | Yes |
22 | Protocol Specific Region Location | This field indicates the location of the protocol-specific words:
|
Yes |
21-0 | Packet Length | The length of the packet data in bytes. If the packet length is less than the sum of the buffer lengths, then the packet data will be truncated. A packet length greater than the sum of the buffers is an error. The valid range for the packet length is 0 to 4M-1 bytes. If the packet length is set to 0, the port will not actually transmit any information. Instead, the port will perform buffer / descriptor reclamation as instructed in the return information in word 2. | Yes |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-24 | Source Tag - Hi | This field is application-specific. During packet reception, the DMA controller in the port will overwrite this field as specified in the RX_SRC_TAG_HI_SEL field in the flow configuration table entry. | Configurable |
23-16 | Source Tag - Lo | This field is application-specific. During packet reception, the DMA controller in the port will overwrite this field as specified in the RX_SRC_TAG_LO_SEL field in the flow configuration table entry. For TX, this value supplies the RX flow index to the Streaming I/F for infrastructure use. | Configurable |
15-8 | Dest Tag – Hi | This field is application specific. During packet reception, the DMA controller in the port will overwrite this field as specified in the RX_DEST_TAG_HI_SEL field in the flow configuration table entry. | Configurable |
7-0 | Dest Tag - Lo | This field is application specific. During packet reception, the DMA controller in the port will overwrite this field as specified in the RX_DEST_TAG_LO_SEL field in the flow configuration table entry. | Configurable |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31 | Extended Packet Info Block Present | This field indicates the presence of the extended packet info block in the descriptor.
|
Yes |
30 | Reserved | Unused | Yes |
29-24 | Protocol Specific Valid Word Count | This field indicates the valid # of 32-bit words in the protocol-specific region. This is encoded in increments of 4 bytes as follows:
…
… 32 = 128 bytes 33-63 = Reserved |
Yes |
23-20 | Error Flags | This field contains error flags that can be assigned based on the packet type | Yes |
19-16 | Protocol Specific Flags | This field contains protocol-specific flags / information that can be assigned based on the packet type. | Yes |
15 | Return Policy |
|
No |
14 | Return Push Policy | This field indicates how a transmit DMA should return the descriptor pointers to the free queues. This field is encoded as follows:
This bit is used only when the Return Policy bit is set to 1. |
No |
13-12 | Packet Return Queue Mgr # | This field indicates which of the four potential queue managers in the system the descriptor is to be returned to after transmission is complete. This field is not altered by the DMA during transmission or reception and should be initialized by the host. | No |
11-0 | Packet Return Queue # | This field indicates the queue number within the selected queue manager that the descriptor is to be returned to after transmission is complete. The value 0xFFF is reserved. | No |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-22 | Reserved | Unused | Yes |
21-0 | Buffer 0 Length | The buffer length field indicates how many valid data bytes are in the buffer. Unused or protocol-specific bytes at the beginning of the buffer are not counted in the buffer length field. This value will be overwritten during reception. | Yes |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Buffer 0 Pointer | The buffer pointer is the byte-aligned memory address of the buffer associated with the buffer descriptor. This value will be written during reception. If the protocol-specific words are placed at the beginning of the SOP buffer, this pointer will point to the PS words. The offset to the data in that case must be calculated by the consumer using the protocol-specific valid word count from word 2. Usage note: For TX, it is a good practice to initialize this field and the Original Ptr field in word 7 with the actual buffer address, but this is the field that is used. For RX, this field may be left uninitialized, or set to 0. | Yes |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Next Descriptor Pointer | The 32-bit word-aligned memory address of the next buffer descriptor in the packet. If the value of this pointer is 0, then the current buffer is the last buffer in the packet. The host sets the next descriptor pointer. | Yes |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-28 | Original Buffer 0 Pool Index | This field is used to identify which pool the attached buffer was originally allocated from. This is distinct from the descriptor pool/queue index because a single buffer may be referenced by more that one descriptor. This is a software-only field that is not touched by the hardware. | No |
27-22 | Original Buffer 0 Reference Count | This field is used to indicate how many references have been made to the attached buffer by different descriptors. Multiple buffer references are commonly used to implement broadcast and multicast packet forwarding when zero packet data copies are desired. This is a software-only field that is not touched by the hardware. | No |
21-0 | Original Buffer 0 Length | The buffer length field indicates the original size of the buffer in bytes. Data bytes are in the buffer. This value will not be overwritten during reception. This value is read by the RX DMA to determine the actual buffer size as allocated by the host at initialization. Because the buffer length in Word 3 is overwritten by the RX port during reception, this field is necessary to permanently store the buffer size information.
Usage Note: It is good practice to always set this field during initialization. |
No |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Original Buffer 0 Pointer | The buffer pointer is the byte-aligned memory address of the buffer associated with the buffer descriptor. This value will not be overwritten during reception. This value is read by the RX DMA to determine the actual buffer location as allocated by the host at initialization. Because the buffer pointer in word 4 is overwritten by the RX port during reception, this field is necessary to permanently store the buffer pointer information.
Usage Note: It is good practice to always set this field during initialization, but is used only in RX. |
No |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Timestamp Info | This field contains an application-specific timestamp that can be used for traffic shaping in a QoS enabled system. | Configurable |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Software Info 0 | This field stores software-centric information that needs to travel with the packet through the stack. This information will be copied from the source descriptor to the destination descriptor whenever a prefetch operation is performed or when transferring through an infrastructure DMA node. | Configurable |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Software Info 1 | This field stores software centric information that needs to travel with the packet through the stack. This information will be copied from the source descriptor to the destination descriptor whenever a prefetch operation is performed or when transferring through an infrastructure DMA node. | Configurable |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Software Info 2 | This field stores software centric information that needs to travel with the packet through the stack. This information will be copied from the source descriptor to the destination descriptor whenever a prefetch operation is performed or when transferring through an infrastructure DMA node. | Configurable |
Bits | Name | Description | RX Overwrite |
---|---|---|---|
31-0 | Protocol Specific Data N | This field stores information that varies depending on the block and packet type. | Configurable |