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

Macros

#define doca_eth_txq_task_batch_metadata_array_get_metadata(metadata_array, metadata_num, packet_index, metadata_index)    metadata_array[packet_index * metadata_num + metadata_index]
 This MACRO is used to get/set a specific metadata of a specific packet (in a task batch) from metadata_array. More...
 

Typedefs

typedef void(* doca_eth_txq_task_send_completion_cb_t) (struct doca_eth_txq_task_send *task_send, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on task completion. More...
 
typedef void(* doca_eth_txq_task_lso_send_completion_cb_t) (struct doca_eth_txq_task_lso_send *task_lso_send, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on task completion. More...
 
typedef void(* doca_eth_txq_task_batch_send_completion_cb_t) (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_array, doca_error_t *status_array)
 Function to execute on task_batch completion. More...
 
typedef void(* doca_eth_txq_task_batch_lso_send_completion_cb_t) (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_payload_array, struct doca_gather_list **headers_array, doca_error_t *status_array)
 Function to execute on task_batch completion. More...
 

Enumerations

enum  doca_eth_txq_ol_flags { DOCA_ETH_TXQ_OL_FLAGS_L3_CSUM = (1 << 0) , DOCA_ETH_TXQ_OL_FLAGS_L4_CSUM = (1 << 1) }
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_set_conf (struct doca_eth_txq *eth_txq, doca_eth_txq_task_send_completion_cb_t task_completion_cb, doca_eth_txq_task_send_completion_cb_t task_error_cb, uint32_t task_send_num)
 This method sets the doca_eth_txq_task_send tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_set_conf (struct doca_eth_txq *eth_txq, doca_eth_txq_task_lso_send_completion_cb_t task_completion_cb, doca_eth_txq_task_lso_send_completion_cb_t task_error_cb, uint32_t task_lso_send_num)
 This method sets the doca_eth_txq_task_lso_send tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_set_conf (struct doca_eth_txq *eth_txq, enum doca_task_batch_max_tasks_number max_tasks_number, uint16_t num_task_batches, doca_eth_txq_task_batch_send_completion_cb_t success_completion_cb, doca_eth_txq_task_batch_send_completion_cb_t error_completion_cb)
 This method sets the task_batch of send tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_set_conf (struct doca_eth_txq *eth_txq, enum doca_task_batch_max_tasks_number max_tasks_number, uint16_t num_task_batches, doca_eth_txq_task_batch_lso_send_completion_cb_t success_completion_cb, doca_eth_txq_task_batch_lso_send_completion_cb_t error_completion_cb)
 This method sets the task_batch of LSO send tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_num_expand (struct doca_eth_txq *eth_txq, uint32_t task_send_num)
 This method expands the number of doca_eth_txq_task_send tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_num_expand (struct doca_eth_txq *eth_txq, uint32_t task_lso_send_num)
 This method expands the number of doca_eth_txq_task_lso_send tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_num_expand (struct doca_eth_txq *eth_txq, uint16_t task_batches_num)
 This method expands the number of doca_eth_txq_task_batch_send tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_num_expand (struct doca_eth_txq *eth_txq, uint16_t task_batches_num)
 This method expands the number of doca_eth_txq_task_batch_lso_send tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_allocate_init (struct doca_eth_txq *eth_txq, struct doca_buf *pkt, union doca_data user_data, struct doca_eth_txq_task_send **task_send)
 This method allocates and initializes a doca_eth_txq_task_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_allocate_init (struct doca_eth_txq *eth_txq, struct doca_buf *pkt_payload, struct doca_gather_list *headers, union doca_data user_data, struct doca_eth_txq_task_lso_send **task_lso_send)
 This method allocates and initializes a doca_eth_txq_task_lso_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_allocate (struct doca_eth_txq *eth_txq, uint16_t tasks_num, union doca_data task_batch_user_data, struct doca_buf ***pkt_array, union doca_data **task_user_data_array, struct doca_task_batch **task_batch)
 This method allocates a doca_taskbtach of doca_eth_txq_task_send tasks. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_allocate (struct doca_eth_txq *eth_txq, uint16_t tasks_num, union doca_data task_batch_user_data, struct doca_buf ***pkt_payload_array, struct doca_gather_list ***headers_array, union doca_data **task_user_data_array, struct doca_task_batch **task_batch)
 This method allocates a doca_taskbtach of doca_eth_txq_task_lso_send tasks. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_send_set_pkt (struct doca_eth_txq_task_send *task_send, struct doca_buf *pkt)
 This method sets packet buffer to doca_eth_txq_task_send task. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_pkt_payload (struct doca_eth_txq_task_lso_send *task_lso_send, struct doca_buf *pkt_payload)
 This method sets packet payload buffer to doca_eth_txq_task_lso_send task. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_headers (struct doca_eth_txq_task_lso_send *task_lso_send, struct doca_gather_list *headers)
 This method sets headers to doca_eth_txq_task_lso_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_get_pkt (const struct doca_eth_txq_task_send *task_send, struct doca_buf **pkt)
 This method gets packet buffer from doca_eth_txq_task_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_pkt_payload (const struct doca_eth_txq_task_lso_send *task_lso_send, struct doca_buf **pkt_payload)
 This method gets payload buffer from doca_eth_txq_task_lso_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_headers (const struct doca_eth_txq_task_lso_send *task_lso_send, struct doca_gather_list **headers)
 This method gets headers from doca_eth_txq_task_lso_send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_get_metadata_array (struct doca_eth_txq_task_send *task_send, uint32_t **metadata_array)
 This method gets a pointer to internal metadata array from send task. This pointer can be used to read/modify the metadata array content. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_metadata_array (struct doca_eth_txq_task_lso_send *task_lso_send, uint32_t **metadata_array)
 This method gets a pointer to internal metadata array from LSO send task. This pointer can be used to read/modify the metadata array content. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_get_metadata_array (struct doca_task_batch *task_batch_send, uint32_t **metadata_array)
 This method gets a pointer to internal metadata array from send task batch. This pointer can be used to read/modify the metadata array content. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_metadata_array (struct doca_task_batch *task_batch_lso_send, uint32_t **metadata_array)
 This method gets a pointer to internal metadata array from LSO send task batch. This pointer can be used to read/modify the metadata array content. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_mss (struct doca_eth_txq_task_lso_send *task_lso_send, uint16_t mss)
 This method sets overrides the default MSS value set by "doca_eth_txq_set_mss()" to a specific LSO send task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_mss_array (struct doca_task_batch *task_batch_lso_send, uint16_t **mss_array)
 This method gets a pointer to internal MSS array from LSO send task batch. This pointer can be used to read/modify the MSS array content. This can be used to override the default MSS value set by "doca_eth_txq_set_mss()" to a specific LSO packet in task batch. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_send_set_ol_flags (struct doca_eth_txq_task_send *task_send, uint16_t ol_flags)
 This method sets overrides the default ol_flags value set by the enabled offloads of the context. More...
 
DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_ol_flags (struct doca_eth_txq_task_lso_send *task_lso_send, uint16_t ol_flags)
 This method sets overrides the default ol_flags value set by the enabled offloads of the context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_get_ol_flags_array (struct doca_task_batch *task_batch_send, uint16_t **ol_flags_array)
 This method gets a pointer to internal ol_flags array from send task batch. This pointer can be used to read/modify the ol_flags array content. This can be used to override the default ol_flags value set by the enabled offloads of the context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_ol_flags_array (struct doca_task_batch *task_batch_lso_send, uint16_t **ol_flags_array)
 This method gets a pointer to internal ol_flags array from LSO send task batch. This pointer can be used to read/modify the ol_flags array content. This can be used to override the default ol_flags value set by the enabled offloads of the context. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_eth_txq_task_send_as_doca_task (struct doca_eth_txq_task_send *task_send)
 This method converts a doca_eth_txq_task_send task to doca_task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_eth_txq_task_lso_send_as_doca_task (struct doca_eth_txq_task_lso_send *task_lso_send)
 This method converts a doca_eth_txq_task_lso_send task to doca_task. More...
 

Detailed Description

DOCA ETH TXQ library.

Macro Definition Documentation

◆ doca_eth_txq_task_batch_metadata_array_get_metadata

#define doca_eth_txq_task_batch_metadata_array_get_metadata (   metadata_array,
  metadata_num,
  packet_index,
  metadata_index 
)     metadata_array[packet_index * metadata_num + metadata_index]

This MACRO is used to get/set a specific metadata of a specific packet (in a task batch) from metadata_array.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]metadata_arrayMetadata array of a task batch.
[in]metadata_numMetadata number that was set by "doca_eth_txq_set_metadata_num()".
[in]packet_indexIndex of the packet to get metadata associated with.
[in]metadata_indexIndex of metadata to get.
Returns
requested metadata

Definition at line 824 of file doca_eth_txq_cpu_data_path.h.

Typedef Documentation

◆ doca_eth_txq_task_batch_lso_send_completion_cb_t

typedef void(* doca_eth_txq_task_batch_lso_send_completion_cb_t) (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_payload_array, struct doca_gather_list **headers_array, doca_error_t *status_array)

Function to execute on task_batch completion.

Any failure/error inside this function should be handled internally or differed; due to the mode of nested in doca_pe_progress() execution this callback doesn't return error.

NOTE: this callback type utilized successful & failed task completions.

Parameters
[in]task_batchThe completed task_batch. The implementation can assume this value is not NULL.
[in]tasks_numThe number of tasks in task_batch.
[in]ctx_user_datauser_data attached to the ctx.
[in]task_batch_user_datauser_data attached to the task_batch.
[in]task_user_data_arrayArray of user_data attached to the tasks.
[in]pkt_payload_arrayArray of packets payload of LSO send tasks.
[in]headers_arrayArray of headers of LSO send tasks.
[in]status_arrayArray of status of LSO send tasks.

Definition at line 163 of file doca_eth_txq_cpu_data_path.h.

◆ doca_eth_txq_task_batch_send_completion_cb_t

typedef void(* doca_eth_txq_task_batch_send_completion_cb_t) (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_array, doca_error_t *status_array)

Function to execute on task_batch completion.

Any failure/error inside this function should be handled internally or differed; due to the mode of nested in doca_pe_progress() execution this callback doesn't return error.

NOTE: this callback type utilized successful & failed task completions.

Parameters
[in]task_batchThe completed task_batch. The implementation can assume this value is not NULL.
[in]tasks_numThe number of tasks in task_batch.
[in]ctx_user_datauser_data attached to the ctx.
[in]task_batch_user_datauser_data attached to the task_batch.
[in]task_user_data_arrayArray of user_data attached to the tasks.
[in]pkt_arrayArray of packets of send tasks.
[in]status_arrayArray of status of send tasks.

Definition at line 129 of file doca_eth_txq_cpu_data_path.h.

◆ doca_eth_txq_task_lso_send_completion_cb_t

typedef void(* doca_eth_txq_task_lso_send_completion_cb_t) (struct doca_eth_txq_task_lso_send *task_lso_send, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on task completion.

Parameters
[in]task_lso_sendThe successfully completed task. The implementation can assume this value is not NULL.
[in]task_user_datauser_data attached to the task.
[in]ctx_user_datauser_data attached to the ctx.

Definition at line 101 of file doca_eth_txq_cpu_data_path.h.

◆ doca_eth_txq_task_send_completion_cb_t

typedef void(* doca_eth_txq_task_send_completion_cb_t) (struct doca_eth_txq_task_send *task_send, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on task completion.

This function is called by doca_pe_progress() when related task identified as completed successfully. When this function called the ownership of the task object passed from DOCA back to user. Inside this callback user may decide on the task object:

  • re-submit task with doca_task_submit(); task object ownership passed to DOCA
  • release task with doca_task_free(); task object ownership passed to DOCA
  • keep the task object for future re-use; user keeps the ownership on the task object Inside this callback the user shouldn't call doca_pe_progress(). Please see doca_pe_progress for details.

Any failure/error inside this function should be handled internally or differed; due to the mode of nested in doca_pe_progress() execution this callback doesn't return error.

NOTE: this callback type utilized successful & failed task completions.

Parameters
[in]task_sendThe successfully completed task. The implementation can assume this value is not NULL.
[in]task_user_datauser_data attached to the task.
[in]ctx_user_datauser_data attached to the ctx.

Definition at line 86 of file doca_eth_txq_cpu_data_path.h.

Enumeration Type Documentation

◆ doca_eth_txq_ol_flags

DOCA ETH TXQ task for transmitting an LSO packet TX offload flags (relevant only to CPU data-path).

Enumerator
DOCA_ETH_TXQ_OL_FLAGS_L3_CSUM 

L3 checksum enabled

DOCA_ETH_TXQ_OL_FLAGS_L4_CSUM 

L4 checksum enabled

Definition at line 56 of file doca_eth_txq_cpu_data_path.h.

Function Documentation

◆ doca_eth_txq_task_batch_lso_send_allocate()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_allocate ( struct doca_eth_txq *  eth_txq,
uint16_t  tasks_num,
union doca_data  task_batch_user_data,
struct doca_buf ***  pkt_payload_array,
struct doca_gather_list ***  headers_array,
union doca_data **  task_user_data_array,
struct doca_task_batch **  task_batch 
)

This method allocates a doca_taskbtach of doca_eth_txq_task_lso_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]tasks_numNumber of tasks in task_batch.
[in]task_batch_user_dataUser data associated with task_batch.
[out]pkt_payload_arrayPointer on array of packet payload buffers associated with doca_eth_txq_task_lso_send tasks for user to fill.
[out]headers_arrayPointer on array of headers associated with doca_eth_txq_task_lso_send task for user to fills.
[out]task_user_data_arrayPointer on array of user data associated with doca_eth_txq_task_lso_send tasks for user to fill.
[out]task_batchdoca_task_batch that was allocated.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.
  • DOCA_ERROR_NO_MEMORY - no more task_batches to allocate.
  • DOCA_ERROR_BAD_STATE - eth_txq context state is not running.
  • DOCA_ERROR_NOT_CONNECTED - in case eth_txq is not is not connected to a DOCA Progress Engine.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_txq is not an instance for CPU.

◆ doca_eth_txq_task_batch_lso_send_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_metadata_array ( struct doca_task_batch *  task_batch_lso_send,
uint32_t **  metadata_array 
)

This method gets a pointer to internal metadata array from LSO send task batch. This pointer can be used to read/modify the metadata array content.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_batch_lso_sendThe task batch to get from.
[out]metadata_arraymetadata array to get. Its length is metadata_num (set by "doca_eth_txq_set_metadata_num()") * number of packets in task batch. See "doca_eth_txq_task_batch_metadata_array_get_metadata()".
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_batch_lso_send_get_mss_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_mss_array ( struct doca_task_batch *  task_batch_lso_send,
uint16_t **  mss_array 
)

This method gets a pointer to internal MSS array from LSO send task batch. This pointer can be used to read/modify the MSS array content. This can be used to override the default MSS value set by "doca_eth_txq_set_mss()" to a specific LSO packet in task batch.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_batch_lso_sendThe task batch to get from.
[out]mss_arrayMSS array to get. Its length is number of packets in task batch.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_batch_lso_send_get_ol_flags_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_get_ol_flags_array ( struct doca_task_batch *  task_batch_lso_send,
uint16_t **  ol_flags_array 
)

This method gets a pointer to internal ol_flags array from LSO send task batch. This pointer can be used to read/modify the ol_flags array content. This can be used to override the default ol_flags value set by the enabled offloads of the context.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_batch_lso_sendThe task batch to get from.
[out]ol_flags_arrayol_flags array to get. Its length is number of packets in task batch.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_batch_lso_send_num_expand()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_num_expand ( struct doca_eth_txq *  eth_txq,
uint16_t  task_batches_num 
)

This method expands the number of doca_eth_txq_task_batch_lso_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_batches_numNumber of task batches to expand.
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 - eth_txq context state is not running, or task batch is not configured.
  • DOCA_ERROR_NO_MEMORY - Failed to allocate more task batches.
  • DOCA_ERROR_TOO_BIG - New num task batches exceed limit.

◆ doca_eth_txq_task_batch_lso_send_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_lso_send_set_conf ( struct doca_eth_txq *  eth_txq,
enum doca_task_batch_max_tasks_number  max_tasks_number,
uint16_t  num_task_batches,
doca_eth_txq_task_batch_lso_send_completion_cb_t  success_completion_cb,
doca_eth_txq_task_batch_lso_send_completion_cb_t  error_completion_cb 
)

This method sets the task_batch of LSO send tasks configuration.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]max_tasks_numberMaximum number of tasks in each task_batch.
[in]num_task_batchesNumber of task_batch for LSO send tasks.
[in]success_completion_cbTask batch successful completion callback.
[in]error_completion_cbTask batch error completion callback.
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 - eth_txq context state is not idle.

◆ doca_eth_txq_task_batch_send_allocate()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_allocate ( struct doca_eth_txq *  eth_txq,
uint16_t  tasks_num,
union doca_data  task_batch_user_data,
struct doca_buf ***  pkt_array,
union doca_data **  task_user_data_array,
struct doca_task_batch **  task_batch 
)

This method allocates a doca_taskbtach of doca_eth_txq_task_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]tasks_numNumber of tasks in task_batch.
[in]task_batch_user_dataUser data associated with task_batch.
[out]pkt_arrayPointer on array of packet buffers associated with doca_eth_txq_task_send tasks for user to fill.
[out]task_user_data_arrayPointer on array of user data associated with doca_eth_txq_task_send tasks for user to fill.
[out]task_batchdoca_task_batch that was allocated.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.
  • DOCA_ERROR_NO_MEMORY - no more task_batches to allocate.
  • DOCA_ERROR_BAD_STATE - eth_txq context state is not running.
  • DOCA_ERROR_NOT_CONNECTED - in case eth_txq is not is not connected to a DOCA Progress Engine.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_txq is not an instance for CPU.

◆ doca_eth_txq_task_batch_send_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_get_metadata_array ( struct doca_task_batch *  task_batch_send,
uint32_t **  metadata_array 
)

This method gets a pointer to internal metadata array from send task batch. This pointer can be used to read/modify the metadata array content.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_batch_sendThe task batch to get from.
[out]metadata_arraymetadata array to get. Its length is metadata_num (set by "doca_eth_txq_set_metadata_num()") * number of packets in task batch. See "doca_eth_txq_task_batch_metadata_array_get_metadata()".
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_batch_send_get_ol_flags_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_get_ol_flags_array ( struct doca_task_batch *  task_batch_send,
uint16_t **  ol_flags_array 
)

This method gets a pointer to internal ol_flags array from send task batch. This pointer can be used to read/modify the ol_flags array content. This can be used to override the default ol_flags value set by the enabled offloads of the context.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_batch_sendThe task batch to get from.
[out]ol_flags_arrayol_flags array to get. Its length is number of packets in task batch.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_batch_send_num_expand()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_num_expand ( struct doca_eth_txq *  eth_txq,
uint16_t  task_batches_num 
)

This method expands the number of doca_eth_txq_task_batch_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_batches_numNumber of task batches to expand.
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 - eth_txq context state is not running, or task batch is not configured.
  • DOCA_ERROR_NO_MEMORY - Failed to allocate more task batches.
  • DOCA_ERROR_TOO_BIG - New num task batches exceed limit.

◆ doca_eth_txq_task_batch_send_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_batch_send_set_conf ( struct doca_eth_txq *  eth_txq,
enum doca_task_batch_max_tasks_number  max_tasks_number,
uint16_t  num_task_batches,
doca_eth_txq_task_batch_send_completion_cb_t  success_completion_cb,
doca_eth_txq_task_batch_send_completion_cb_t  error_completion_cb 
)

This method sets the task_batch of send tasks configuration.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]max_tasks_numberMaximum number of tasks in each task_batch.
[in]num_task_batchesNumber of task_batch for send tasks.
[in]success_completion_cbTask batch successful completion callback.
[in]error_completion_cbTask batch error completion callback.
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 - eth_txq context state is not idle.

◆ doca_eth_txq_task_lso_send_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_allocate_init ( struct doca_eth_txq *  eth_txq,
struct doca_buf *  pkt_payload,
struct doca_gather_list headers,
union doca_data  user_data,
struct doca_eth_txq_task_lso_send **  task_lso_send 
)

This method allocates and initializes a doca_eth_txq_task_lso_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]pkt_payloadBuffer that contains the payload of the packet to send.
[in]headersA gather list of the headers of the packet to send.
[in]user_datadoca_data to attach to the task
[out]task_lso_senddoca_eth_txq_task_lso_send task that was allocated.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.
  • DOCA_ERROR_BAD_STATE - eth_txq context state is not running.
  • DOCA_ERROR_NOT_CONNECTED - in case eth_txq is not is not connected to a DOCA Progress Engine.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_txq is not an instance for CPU.

◆ doca_eth_txq_task_lso_send_as_doca_task()

DOCA_EXPERIMENTAL struct doca_task* doca_eth_txq_task_lso_send_as_doca_task ( struct doca_eth_txq_task_lso_send *  task_lso_send)

This method converts a doca_eth_txq_task_lso_send task to doca_task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_senddoca_eth_txq_task_lso_send task.
Returns
doca_task

◆ doca_eth_txq_task_lso_send_get_headers()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_headers ( const struct doca_eth_txq_task_lso_send *  task_lso_send,
struct doca_gather_list **  headers 
)

This method gets headers from doca_eth_txq_task_lso_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to get from.
[out]headersA gather list of the headers of the packet to get.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_lso_send_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_metadata_array ( struct doca_eth_txq_task_lso_send *  task_lso_send,
uint32_t **  metadata_array 
)

This method gets a pointer to internal metadata array from LSO send task. This pointer can be used to read/modify the metadata array content.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to get from.
[out]metadata_arraymetadata array to get. Its length is metadata_num (set by "doca_eth_txq_set_metadata_num()").
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_lso_send_get_pkt_payload()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_get_pkt_payload ( const struct doca_eth_txq_task_lso_send *  task_lso_send,
struct doca_buf **  pkt_payload 
)

This method gets payload buffer from doca_eth_txq_task_lso_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to get from.
[out]pkt_payloadPacket payload buffer to get.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_lso_send_num_expand()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_num_expand ( struct doca_eth_txq *  eth_txq,
uint32_t  task_lso_send_num 
)

This method expands the number of doca_eth_txq_task_lso_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_lso_send_numNumber of doca_eth_txq_task_lso_send tasks to expand.
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 - eth_txq context state is not running, or task is not configured.
  • DOCA_ERROR_NO_MEMORY - Failed to allocate more tasks.
  • DOCA_ERROR_TOO_BIG - New num tasks exceed limit.

◆ doca_eth_txq_task_lso_send_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_lso_send_set_conf ( struct doca_eth_txq *  eth_txq,
doca_eth_txq_task_lso_send_completion_cb_t  task_completion_cb,
doca_eth_txq_task_lso_send_completion_cb_t  task_error_cb,
uint32_t  task_lso_send_num 
)

This method sets the doca_eth_txq_task_lso_send tasks configuration.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_completion_cbTask completion callback.
[in]task_error_cbTask error callback.
[in]task_lso_send_numNumber of doca_eth_txq_task_lso_send tasks.
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 - eth_txq context state is not idle.

◆ doca_eth_txq_task_lso_send_set_headers()

DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_headers ( struct doca_eth_txq_task_lso_send *  task_lso_send,
struct doca_gather_list headers 
)

This method sets headers to doca_eth_txq_task_lso_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to set to.
[in]headersA gather list of the headers of the packet to set.

◆ doca_eth_txq_task_lso_send_set_mss()

DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_mss ( struct doca_eth_txq_task_lso_send *  task_lso_send,
uint16_t  mss 
)

This method sets overrides the default MSS value set by "doca_eth_txq_set_mss()" to a specific LSO send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to get from.
[out]mssNew MSS value to set for task.

◆ doca_eth_txq_task_lso_send_set_ol_flags()

DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_ol_flags ( struct doca_eth_txq_task_lso_send *  task_lso_send,
uint16_t  ol_flags 
)

This method sets overrides the default ol_flags value set by the enabled offloads of the context.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to set for.
[out]ol_flagsNew ol_flags value to set for task.

◆ doca_eth_txq_task_lso_send_set_pkt_payload()

DOCA_EXPERIMENTAL void doca_eth_txq_task_lso_send_set_pkt_payload ( struct doca_eth_txq_task_lso_send *  task_lso_send,
struct doca_buf *  pkt_payload 
)

This method sets packet payload buffer to doca_eth_txq_task_lso_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_lso_sendThe task to set to.
[in]pkt_payloadPacket payload buffer to set.

◆ doca_eth_txq_task_send_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_allocate_init ( struct doca_eth_txq *  eth_txq,
struct doca_buf *  pkt,
union doca_data  user_data,
struct doca_eth_txq_task_send **  task_send 
)

This method allocates and initializes a doca_eth_txq_task_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]pktBuffer that contains the packet to send.
[in]user_datadoca_data to attach to the task
[out]task_senddoca_eth_txq_task_send task that was allocated.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.
  • DOCA_ERROR_BAD_STATE - eth_txq context state is not running.
  • DOCA_ERROR_NOT_CONNECTED - in case eth_txq is not is not connected to a DOCA Progress Engine.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_txq is not an instance for CPU.

◆ doca_eth_txq_task_send_as_doca_task()

DOCA_EXPERIMENTAL struct doca_task* doca_eth_txq_task_send_as_doca_task ( struct doca_eth_txq_task_send *  task_send)

This method converts a doca_eth_txq_task_send task to doca_task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_senddoca_eth_txq_task_send task.
Returns
doca_task

◆ doca_eth_txq_task_send_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_get_metadata_array ( struct doca_eth_txq_task_send *  task_send,
uint32_t **  metadata_array 
)

This method gets a pointer to internal metadata array from send task. This pointer can be used to read/modify the metadata array content.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_sendThe task to get from.
[out]metadata_arraymetadata array to get. Its length is metadata_num (set by "doca_eth_txq_set_metadata_num()").
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_send_get_pkt()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_get_pkt ( const struct doca_eth_txq_task_send *  task_send,
struct doca_buf **  pkt 
)

This method gets packet buffer from doca_eth_txq_task_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_sendThe task to get from.
[out]pktPacket buffer to get.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - in case one of the arguments is NULL.

◆ doca_eth_txq_task_send_num_expand()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_num_expand ( struct doca_eth_txq *  eth_txq,
uint32_t  task_send_num 
)

This method expands the number of doca_eth_txq_task_send tasks.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_send_numNumber of doca_eth_txq_task_send tasks to expand.
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 - eth_txq context state is not running, or task is not configured.
  • DOCA_ERROR_NO_MEMORY - Failed to allocate more tasks.
  • DOCA_ERROR_TOO_BIG - New num tasks exceed limit.

◆ doca_eth_txq_task_send_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_eth_txq_task_send_set_conf ( struct doca_eth_txq *  eth_txq,
doca_eth_txq_task_send_completion_cb_t  task_completion_cb,
doca_eth_txq_task_send_completion_cb_t  task_error_cb,
uint32_t  task_send_num 
)

This method sets the doca_eth_txq_task_send tasks configuration.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]eth_txqPointer to doca_eth_txq instance.
[in]task_completion_cbTask completion callback.
[in]task_error_cbTask error callback.
[in]task_send_numNumber of doca_eth_txq_task_send tasks.
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 - eth_txq context state is not idle.

◆ doca_eth_txq_task_send_set_ol_flags()

DOCA_EXPERIMENTAL void doca_eth_txq_task_send_set_ol_flags ( struct doca_eth_txq_task_send *  task_send,
uint16_t  ol_flags 
)

This method sets overrides the default ol_flags value set by the enabled offloads of the context.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_sendThe task to set for.
[out]ol_flagsNew ol_flags value to set for task.

◆ doca_eth_txq_task_send_set_pkt()

DOCA_EXPERIMENTAL void doca_eth_txq_task_send_set_pkt ( struct doca_eth_txq_task_send *  task_send,
struct doca_buf *  pkt 
)

This method sets packet buffer to doca_eth_txq_task_send task.

Note
Supported for DOCA ETH TXQ instance for CPU only.
Parameters
[in]task_sendThe task to set to.
[in]pktPacket buffer to set.