Ethernet Offload TX (Transmit Side) - 1.0 English - PG451

Ethernet Offload Engine LogiCORE IP Product Guide (PG451)

Document ID
PG451
Release Date
2025-05-29
Version
1.0 English
Figure 1. Ethernet Offload Engine - TX Path Block Diagram

On the transmit side, the IP receives the data to be transmitted over Ethernet sent as an AXI4-Stream. This stream is generated from the AXI MCDMA by reading the data from memory using buffer descriptors (BDs). The software processing time of the data is increased with each packet. To reduce the CPU load and reduce the processing time, the MCDMA sends large packets to the Ethernet Offload Engine. The Ethernet Offload Engine IP then converts the large data it received into smaller chunks of MTU sized packets with the help of control information passed along with each packet through the MM2S_CTRL stream. Control information is mentioned in Table 1. A header field is appended to each segmented packet with a modified packet length. Checksum is calculated for each chunk and is updated in each header. These MTU sized packets are passed to the Ethernet MAC.

Figure 2. GSO Packets

When TX offload feature is CSO only, the control interface is ignored. Checksum offload is always done on eligible IPv4 TCP and UDP packets.

  • Checksum is calculated on non-fragmented packets only (more fragments and fragment number fields should be 0 in IPv4 header)
  • IP checksum is calculated when total packet length less than the MSS size
  • TCP checksum is calculated when the protocol field is 0x6 on an IPv4 header
  • UDP checksum is calculated when the protocol field is 0x11 on an IPv4 header

In other conditions, the header is sent out without any change.

In control information, the following fields are mentioned:

  1. Total length of the incoming packet (excluding Ethernet header length): 26 bits
  2. Header length of the incoming packet (Ethernet header + IP header + UDP/TCP header): 8 bits
  3. MSS size: 14 bits
  4. Control enables
    1. Checksum enables
    2. Segmentation enables
  5. Fixed IP ID:
    1. When 0: The IP ID field on the IP header is incremented for each segmented packet
    2. When 1: The IP ID field remains constant throughout the segmented packets

Segmentation is performed on an incoming packet when all the following criteria are met:

  • When the TX Offload feature is selected to be CSO + GSO in the IP GUI
  • When the incoming packet is an IPv4 packet
  • Protocol must be UDP
  • Should not be a fragmented packet (fragment number and more fragments fields in the IP header should be 0)
  • Total length of the packet is less than the MSS size
Note:
  1. When total length of a packet is less than the MSS size, all the APP0 fields can be sent as zeroes. Then no segmentation is done on that packet.
  2. Bits 8, 9, and 11 in the APP1 fields must be zero for segmentation to occur; otherwise, the packet is bypassed for segmentation.