NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA ETH TXQ
Collaboration diagram for DOCA ETH TXQ:

Modules

 DOCA ETH TXQ CPU Data Path
 
 DOCA ETH TXQ GPU Data Path
 

Enumerations

enum  doca_eth_txq_type { DOCA_ETH_TXQ_TYPE_REGULAR = 0 }
 
enum  doca_eth_txq_data_path_type { DOCA_ETH_TXQ_DATA_PATH_TYPE_CPU = 0 , DOCA_ETH_TXQ_DATA_PATH_TYPE_GPU }
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_create (struct doca_dev *dev, uint32_t max_burst_size, struct doca_eth_txq **eth_txq)
 Create a DOCA ETH TXQ instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_destroy (struct doca_eth_txq *eth_txq)
 Destroy a DOCA ETH TXQ instance. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_eth_txq_as_doca_ctx (struct doca_eth_txq *eth_txq)
 Convert doca_eth_txq instance into a generalized context for use with doca core objects. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_burst_size (struct doca_eth_txq *eth_txq, uint32_t max_burst_size)
 Set max burst size property for doca_eth_txq. This value dictates the maximal number of packets the HW can handle at the same time. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_send_buf_list_len (struct doca_eth_txq *eth_txq, uint32_t max_send_buf_list_len)
 Set the maximal send buffer list length for doca_eth_txq. This value indicated what the maximal number of elements in a doca_buf list is. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_metadata_num (struct doca_eth_txq *eth_txq, uint8_t metadata_num)
 Set metadata number for doca_eth_txq. This value is the number of metadata per packet. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_mss (struct doca_eth_txq *eth_txq, uint16_t mss)
 Set the Maximum Segment Size for doca_eth_txq. This value will be used per LSO send task / task_batch unless user overrides it (by setting MSS on the specific task / task_batch). This value is the maximum data size that can be sent in each segment of the LSO packet. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_lso_header_size (struct doca_eth_txq *eth_txq, uint16_t max_lso_header_size)
 Set the maximum LSO header size for doca_eth_txq. This value is the maximum header size of the LSO packet can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_type (struct doca_eth_txq *eth_txq, enum doca_eth_txq_type type)
 Set TX queue type property for doca_eth_txq. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_l3_chksum_offload (struct doca_eth_txq *eth_txq, uint8_t enable_l3_chksum)
 Set offload for the calculation of IPv4 checksum (L3) on transmitted packets. If the users enables L3 checksum offloading, then the HW will calculate the checksum value and write it into the specific field in the packet. This offload is enabled/disabled to every task / task_batch by default. User can change this by modifying the ol_flag value (See "enum doca_eth_txq_ol_flags"). can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_l4_chksum_offload (struct doca_eth_txq *eth_txq, uint8_t enable_l4_chksum)
 Set offload for the calculation of TCP/UDP checksum (L4) on transmitted packets. If the users enables L4 checksum offloading, then the HW will calculate the checksum value and write it into the specific field in the packet. This offload is enabled/disabled to every task / task_batch by default. User can change this by modifying the ol_flag value (See "enum doca_eth_txq_ol_flags"). can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_wait_on_time_offload (struct doca_eth_txq *eth_txq)
 Set offload to enable wait on time feature on the queue. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_get_gpu_handle (const struct doca_eth_txq *eth_txq, struct doca_gpu_eth_txq **eth_txq_ext)
 Get a gpu handle of a doca_eth_txq. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_burst_size (const struct doca_devinfo *devinfo, uint32_t max_send_buf_list_len, uint16_t max_lso_header_size, uint32_t *max_burst_size)
 Get the maximum burst size supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_send_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_send_buf_list_len)
 Get the maximum send buffer list length supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_metadata_num (const struct doca_devinfo *devinfo, uint8_t *max_metadata_num)
 Get the maximum metadata number supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_lso_header_size (const struct doca_devinfo *devinfo, uint16_t *max_lso_header_size)
 Get the maximum header size of an LSO packet supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_type_supported (const struct doca_devinfo *devinfo, enum doca_eth_txq_type type, enum doca_eth_txq_data_path_type data_path_type)
 Check if TX queue type is supported. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_l3_chksum_offload_supported (const struct doca_devinfo *devinfo)
 Check if L3 checksum offload is supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_l4_chksum_offload_supported (const struct doca_devinfo *devinfo)
 Check if L4 checksum offload is supported by the device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_lso_msg_size (const struct doca_devinfo *devinfo, uint32_t *max_lso_msg_size)
 Get the max LSO message size by the network device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_wait_on_time_offload_supported (const struct doca_devinfo *devinfo, enum doca_eth_wait_on_time_type *wait_on_time_mode)
 Check if wait on time offload is supported by the network device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_calculate_timestamp (struct doca_eth_txq *eth_txq, uint64_t timestamp_ns, uint64_t *wait_on_time_value)
 Calculate timestamp to use when setting the wait on time on the Tx queue. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_get_flow_queue_id (struct doca_eth_txq *eth_txq, uint16_t *flow_queue_id)
 Get the DPDK queue ID of the doca_eth send queue. can only be called after calling doca_ctx_start(). More...
 

Detailed Description

DOCA ETH TXQ library.

Note
There are 2 data path options to use DOCA ETH TXQ context, a GPU managed control path and a CPU managed one. Other than the need to use doca_ctx_set_datapath_on_gpu() on a GPU context before starting it, both cases share the same control path functions (unless mentioned otherwise in the function documentation). The data path functions are different for the different options. The GPU managed data path functions are not included in the DOCA ETH TXQ API (check DOCA GPUNetIO).

Enumeration Type Documentation

◆ doca_eth_txq_data_path_type

TX data-path type.

Enumerator
DOCA_ETH_TXQ_DATA_PATH_TYPE_CPU 

Enable data path management on the CPU

DOCA_ETH_TXQ_DATA_PATH_TYPE_GPU 

Enable data path management on the GPU

Definition at line 71 of file doca_eth_txq.h.

◆ doca_eth_txq_type

TX queue type.

Enumerator
DOCA_ETH_TXQ_TYPE_REGULAR 

Definition at line 64 of file doca_eth_txq.h.

Function Documentation

◆ doca_eth_txq_as_doca_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_eth_txq_as_doca_ctx ( struct doca_eth_txq *  eth_txq)

Convert doca_eth_txq instance into a generalized context for use with doca core objects.

Parameters
[in]eth_txqPointer to doca_eth_txq instance.
Returns
Non NULL upon success, NULL otherwise.

◆ doca_eth_txq_calculate_timestamp()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_calculate_timestamp ( struct doca_eth_txq *  eth_txq,
uint64_t  timestamp_ns,
uint64_t *  wait_on_time_value 
)

Calculate timestamp to use when setting the wait on time on the Tx queue.

Note
Supported for DOCA ETH TXQ instance for GPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]timestamp_nsTimestamp to indicate when send packets.
[out]wait_on_time_valueValue to use to enqueue wait on time in send queue.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_DRIVER - error query underlying network card driver
  • DOCA_ERROR_NOT_PERMITTED - wait on time clock is not enabled on the network card.

◆ doca_eth_txq_cap_get_max_burst_size()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_burst_size ( const struct doca_devinfo *  devinfo,
uint32_t  max_send_buf_list_len,
uint16_t  max_lso_header_size,
uint32_t *  max_burst_size 
)

Get the maximum burst size supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[in]max_send_buf_list_lenMaximal send buffer list length to use in context. (check doca_eth_txq_set_max_send_buf_list_len)
[in]max_lso_header_sizeMaximum header size of an LSO packet to use in context. Can be 0 in case user isn't planning to use LSO tasks.
[out]max_burst_sizeThe max burst size supported by the device.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.

◆ doca_eth_txq_cap_get_max_lso_header_size()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_lso_header_size ( const struct doca_devinfo *  devinfo,
uint16_t *  max_lso_header_size 
)

Get the maximum header size of an LSO packet supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[out]max_lso_header_sizeMaximum header size of an LSO packet
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_DRIVER - error query underlying network card driver.
  • DOCA_ERROR_NOT_SUPPORTED - if LSO is not supported.

◆ doca_eth_txq_cap_get_max_lso_msg_size()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_lso_msg_size ( const struct doca_devinfo *  devinfo,
uint32_t *  max_lso_msg_size 
)

Get the max LSO message size by the network device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[out]max_lso_msg_sizeMaximum LSO message supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_DRIVER - error query underlying network card driver.
  • DOCA_ERROR_NOT_SUPPORTED - if LSO is not supported.

◆ doca_eth_txq_cap_get_max_metadata_num()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_metadata_num ( const struct doca_devinfo *  devinfo,
uint8_t *  max_metadata_num 
)

Get the maximum metadata number supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[out]max_metadata_numMaximal metadata number to get. (check doca_eth_txq_set_metadata_num)
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.

◆ doca_eth_txq_cap_get_max_send_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_max_send_buf_list_len ( const struct doca_devinfo *  devinfo,
uint32_t *  max_send_buf_list_len 
)

Get the maximum send buffer list length supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[out]max_send_buf_list_lenMaximal send buffer list length to get. (check doca_eth_txq_set_max_send_buf_list_len)
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.

◆ doca_eth_txq_cap_get_wait_on_time_offload_supported()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_get_wait_on_time_offload_supported ( const struct doca_devinfo *  devinfo,
enum doca_eth_wait_on_time_type wait_on_time_mode 
)

Check if wait on time offload is supported by the network device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[out]wait_on_time_modeOffload wait on time mode (native or DPDK).
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_DRIVER - error query underlying network card driver
  • DOCA_ERROR_NOT_SUPPORTED - real-time clock is not enable on the network card.

◆ doca_eth_txq_cap_is_l3_chksum_offload_supported()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_l3_chksum_offload_supported ( const struct doca_devinfo *  devinfo)

Check if L3 checksum offload is supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_NOT_SUPPORTED - if L3 checksum offload is not supported.

◆ doca_eth_txq_cap_is_l4_chksum_offload_supported()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_l4_chksum_offload_supported ( const struct doca_devinfo *  devinfo)

Check if L4 checksum offload is supported by the device.

Parameters
[in]devinfoPointer to doca_devinfo instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_NOT_SUPPORTED - if L4 checksum offload is not supported.

◆ doca_eth_txq_cap_is_type_supported()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_cap_is_type_supported ( const struct doca_devinfo *  devinfo,
enum doca_eth_txq_type  type,
enum doca_eth_txq_data_path_type  data_path_type 
)

Check if TX queue type is supported.

Parameters
[in]devinfoPointer to doca_devinfo instance.
[in]typeTX queue type - see enum doca_eth_txq_type.
[in]data_path_typeTX data-path type - see enum doca_eth_txq_data_path_type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_NOT_SUPPORTED - if type is not supported.

◆ doca_eth_txq_create()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_create ( struct doca_dev *  dev,
uint32_t  max_burst_size,
struct doca_eth_txq **  eth_txq 
)

Create a DOCA ETH TXQ instance.

Parameters
[in]devDevice to bind the context.
[in]max_burst_sizeMax burst size to use in context.
[out]eth_txqPointer to pointer to be set to point to the created doca_eth_txq instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_eth_txq.

◆ doca_eth_txq_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_destroy ( struct doca_eth_txq *  eth_txq)

Destroy a DOCA ETH TXQ instance.

Parameters
[in]eth_txqPointer to instance to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - eth_txq argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - eth_txq context state is not idle.

◆ doca_eth_txq_get_flow_queue_id()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_get_flow_queue_id ( struct doca_eth_txq *  eth_txq,
uint16_t *  flow_queue_id 
)

Get the DPDK queue ID of the doca_eth send queue. can only be called after calling doca_ctx_start().

Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[out]flow_queue_idThe queue ID to be used in rte_flow or doca_flow.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context was not started.

◆ doca_eth_txq_get_gpu_handle()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_get_gpu_handle ( const struct doca_eth_txq *  eth_txq,
struct doca_gpu_eth_txq **  eth_txq_ext 
)

Get a gpu handle of a doca_eth_txq.

Note
Supported for DOCA ETH TXQ instance for GPU only.

This method should be used after ctx is started. The expected flow is as follows:

  1. bind the ctx to a gpu device using doca_ctx_set_datapath_on_gpu()
  2. start the ctx using doca_ctx_start()
  3. call doca_eth_txq_get_gpu_handle() to get the gpu_handle
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[out]eth_txq_extA doca gpu eth_txq handle.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_txq isn't an instance for GPU.

◆ doca_eth_txq_set_l3_chksum_offload()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_l3_chksum_offload ( struct doca_eth_txq *  eth_txq,
uint8_t  enable_l3_chksum 
)

Set offload for the calculation of IPv4 checksum (L3) on transmitted packets. If the users enables L3 checksum offloading, then the HW will calculate the checksum value and write it into the specific field in the packet. This offload is enabled/disabled to every task / task_batch by default. User can change this by modifying the ol_flag value (See "enum doca_eth_txq_ol_flags"). can only be called before calling doca_ctx_start().

Note
The default configuration is to disable L3 checksum offloading.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]enable_l3_chksumAn indicator to enable/disable L3 checksum.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_l4_chksum_offload()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_l4_chksum_offload ( struct doca_eth_txq *  eth_txq,
uint8_t  enable_l4_chksum 
)

Set offload for the calculation of TCP/UDP checksum (L4) on transmitted packets. If the users enables L4 checksum offloading, then the HW will calculate the checksum value and write it into the specific field in the packet. This offload is enabled/disabled to every task / task_batch by default. User can change this by modifying the ol_flag value (See "enum doca_eth_txq_ol_flags"). can only be called before calling doca_ctx_start().

Note
The default configuration is to disable L4 checksum offloading.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]enable_l4_chksumAn indicator to enable/disable L4 checksum.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_max_burst_size()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_burst_size ( struct doca_eth_txq *  eth_txq,
uint32_t  max_burst_size 
)

Set max burst size property for doca_eth_txq. This value dictates the maximal number of packets the HW can handle at the same time. can only be called before calling doca_ctx_start().

Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]max_burst_sizeMax burst size to use in context.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_max_lso_header_size()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_lso_header_size ( struct doca_eth_txq *  eth_txq,
uint16_t  max_lso_header_size 
)

Set the maximum LSO header size for doca_eth_txq. This value is the maximum header size of the LSO packet can only be called before calling doca_ctx_start().

Note
The default maximum LSO header size is 74.
This setter is relevant only in case of using LSO send tasks.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]max_lso_header_sizeMaximum LSO header size to use in context.
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_max_send_buf_list_len()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_max_send_buf_list_len ( struct doca_eth_txq *  eth_txq,
uint32_t  max_send_buf_list_len 
)

Set the maximal send buffer list length for doca_eth_txq. This value indicated what the maximal number of elements in a doca_buf list is. can only be called before calling doca_ctx_start().

Note
The default maximal send buffer list length is 1.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]max_send_buf_list_lenMaximal send buffer list length to use in context.
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_metadata_num()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_metadata_num ( struct doca_eth_txq *  eth_txq,
uint8_t  metadata_num 
)

Set metadata number for doca_eth_txq. This value is the number of metadata per packet. can only be called before calling doca_ctx_start().

Note
Supported for DOCA ETH TXQ instance for CPU only.
The default metadata number is 0.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]metadata_nummetadata number to use in context.
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_mss()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_mss ( struct doca_eth_txq *  eth_txq,
uint16_t  mss 
)

Set the Maximum Segment Size for doca_eth_txq. This value will be used per LSO send task / task_batch unless user overrides it (by setting MSS on the specific task / task_batch). This value is the maximum data size that can be sent in each segment of the LSO packet. can only be called before calling doca_ctx_start().

Note
The default MSS is 1500.
This setter is relevant only in case of using LSO send task / task_batch.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]mssMaximum Segment Size to use in context.
Returns
DOCA_SUCCESS - if property set successfully. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_type()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_type ( struct doca_eth_txq *  eth_txq,
enum doca_eth_txq_type  type 
)

Set TX queue type property for doca_eth_txq. can only be called before calling doca_ctx_start().

Note
The default type is DOCA_ETH_TXQ_TYPE_REGULAR.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]typeTX queue type - see enum doca_eth_txq_type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.

◆ doca_eth_txq_set_wait_on_time_offload()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_set_wait_on_time_offload ( struct doca_eth_txq *  eth_txq)

Set offload to enable wait on time feature on the queue. can only be called before calling doca_ctx_start().

Note
Supported for DOCA ETH TXQ instance for GPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - if an invalid parameter was given.
  • DOCA_ERROR_BAD_STATE - if context is not idle.
  • DOCA_ERROR_NOT_PERMITTED - wait on time HW support but network device clock is not in REAL TIME mode.