onload_fd_check_feature

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
enum onload_fd_feature {
  /* Check whether this fd supports ONLOAD_MSG_WARM or not */
  ONLOAD_FD_FEAT_MSG_WARM,
  /* see Notes for details */
  ONLOAD_FD_FEAT_UDP_TX_TS_HDR
};

int onload_fd_check_feature (int fd, enum onload_fd_feature feature);

Description

Used to check whether the Onload file descriptor supports a feature or not.

Definition

See above.

Formal Parameters

See above.

Return Value

0 if the feature is supported but not on this fd

>0 if the feature is supported both by onload and this fd

<0 if the feature is not supported:

-ENOSYS if onload_fd_check_feature() is not supported.

- ENOTSUPP if the feature is not supported by onload.

Notes

Onload-201509 and later versions support the ONLOAD_FD_FEAT_UDP_TX_TS_HDR option. onload_fd_check_feature() will return 1 to indicate that a recvmsg used to retrieve TX timestamps for UDP packets will return the entire Ethernet header.

Note: When run on older versions of onload this will return -EOPNOTSUPP.