Visible to Intel only — GUID: hor1673393495746
Ixiasoft
Visible to Intel only — GUID: hor1673393495746
Ixiasoft
5.1.6.3.6. Header Payload Split Support
This feature supports splitting the packet header and the payload of received packets in separate buffers (buffer 1 and buffer 2). You can enable the split header feature by selecting the enable split header structure option and setting the SPH bit in the DMA_CH(#i)_Control register.
The HDSMS field of MAC_Rx_Configuration register indicates maximum header size allowed for splitting the header data in the received packet based on the value programmed. When the ARBS field of the DMA_CH(#i)_Rx_Control2 register is programmed to a non-zero value, ARBS field indicates receive buffer size for buffer 1 and the RBSZ field indicates the receive buffer size for buffer 2. The ARBS field width is 7 bits for data width of 64 bits and 6 bits for data width of 128 bits. The granularity is in data width. The ARBS field can be set to 0, for backward compatibility.
Packet Type | SPLM | Description |
---|---|---|
TCP or UDP packet | 00 (L3/L4 split) | The DMA writes the Ethernet header + IP header + TCP or UDP header into the header buffer. |
IP packet (not TCP/UDP) | The DMA writes the Ethernet header + IP header into the header buffer. | |
Non-IP packet | The DMA does not split the header and payload | |
Any packet | 01 (L2 split) | The DMA writes the Ethernet header based on split offset (SPLOFST) into the header buffer. |
IP packet | 10 (Combination of L2 or L3/L4 split) | L3/L4 split |
Non-IP packet | L2 split | |
NA | 11 | Reserved |
- The VLAN tag stripping must be set for the split function. For instance, the DMA separates the header and payload of an untagged packet only. So, when a tagged packet is received, you must program the EMAC such that the VLAN tags are deleted/stripped from the received packets.
- L3/L4 split is applicable for IP packets that are either untagged or VLAN stripped. If VLAN tag is retained in the packet is forwarded to the DMA, L3-L4 split is not performed. However, if SPLM field is set to 2, L2 split is performed for VLAN tagged IP packets.
- For AV packets, to specify an alternative L2 split value, use the SAVE and SAVO fields of the MAC_Ext1_Cfg register.
- L2 Split is not supported for packets with variable preamble.
Value of FD | Value of LD | Header Length (HL) Availability in RDES2 |
---|---|---|
0 | 1 | HL not available |
1 | 0 | HL is [9:0] |
1 | 1 |
|
Descriptor Structure
The following figure shows the descriptor structure without the split header feature.
The following figure shows the descriptor structure with the split header feature.
The DMA writes the header of the received packet by using the header address to which the RDES0 in the first descriptor is pointing (FD bit of RDES3 is set). The DMA writes the payload of the received packet into the buffer address to which the RDES2 is pointing. For subsequent descriptors (FD is set to 0), the address to which RDES0 (Header address) is pointing is not used. The payload is written only to buffers to which the RDES2 (payload address) is pointing.
The DMA writes the header length in RDES2 of the first receive descriptor (RDES3[29], FD bit is set) for the packet. The packet length is written in RDES3 of the last receive descriptor (RDES3[28], LD bit is set). The buffer length for the payload is set by the driver through the RBSZ field in the corresponding DMA channel receive control register. The DMA fills receive buffers fully in all except the last descriptor. The maximum header length is limited by the value programmed in the HDSMS field of MAC_Rx_Configuration register.
The header of outer packet and inner packet are part of data written in the header buffer. Only the payload of the inner packet is written into the buffers pointed by RDES2.