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
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
close() etc operations.