Description

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English

An application using the delegated sends API will prepare a packet buffer with IP/TCP header data, before adding payload data to the packet. The packet buffer can be prepared in advance and payload added just before the send is required.

After each delegated send, the actual data sent (and length of that data) is returned to Onload. This allows Onload to update the TCP internal state and have the data to hand if retransmissions are required on the socket.

This feature is intended for applications that make sporadic TCP sends as opposed to large amounts of bi-directional TCP traffic. The API should be used with caution to send small amounts of TCP data. Although the packet buffer can be prepared in advance of the send, the idea is to complete the delegated send operation (onload_delegated_send_complete()) soon after the initial send to maintain the integrity of the TCP internal state ensuring that sequence/acknowledgment numbers are correct.

The user is responsible for serialization when using the delegated send API. The first call should always be onload_delegated_send_prepare(). If a normal send is required following the prepare, the user should use onload_delegated_send_cancel().

Note: For a given file descriptor, while a delegated send is in progress, and until complete has been called, the user should NOT attempt any standard send(), write() or sendfile() close() etc operations.