Description
Following a delegated send, this function is used to return the actual data sent (and length of that data) to Onload which will update the internal TCP state (the sequence numbers) and remove packets from the retransmit queue (when appropriate ACKs are received).
Definition
int onload_delegated_send_complete (
int fd,
const struct iovec *,
int iovlen,
int flags )
Formal Parameters
-
fd
- The file descriptor.
-
struct iovec
- Pointer to the data sent.
-
iovlen
- Size (bytes) of the iovec array.
-
flags
- (
MSG_DONTWAIT
|MSG_NOSIGNAL
)
Return Value
Number of bytes accepted, or return -1 if an error occurs with errno
set.
Notes
Onload is unable to do any retransmit until this function has been called.
This function should be called even if some (but not all) bytes specified in the
prepare function have been sent. The user must also call onload_delegated_send_cancel()
if some of the bytes are not going to
be sent (they are reserved-but-not-sent) - see onload_delegated_send_cancel()
notes below.
send()
function in its handling of a “resource temporarily unavailable” or “operation would block” situation. This function returns 0
, but the send()
function would return -1
with errno
set to EAGAIN
.This function can block because of SO_SNDBUF limitation and will ignore the SO_SNDTIMEO value.