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

Macros

#define doca_eth_rxq_event_batch_managed_recv_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 a specific metadata of a specific packet from metadata_array from managed receive event batch. More...
 

Typedefs

typedef void(* doca_eth_rxq_task_recv_completion_cb_t) (struct doca_eth_rxq_task_recv *task_recv, union doca_data task_user_data, union doca_data ctx_user_data)
 Function to execute on task completion. More...
 
typedef void(* doca_eth_rxq_event_managed_recv_handler_cb_t) (struct doca_eth_rxq_event_managed_recv *event_managed_recv, struct doca_buf *pkt, union doca_data event_user_data)
 Function to be executed on managed receive event occurrence. More...
 
typedef void(* doca_eth_rxq_event_batch_managed_recv_handler_cb_t) (struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, uint16_t events_number, union doca_data event_batch_user_data, doca_error_t status, struct doca_buf **pkt_array)
 Function to be executed on managed receive event batch occurrence. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_set_conf (struct doca_eth_rxq *eth_rxq, doca_eth_rxq_task_recv_completion_cb_t task_completion_cb, doca_eth_rxq_task_recv_completion_cb_t task_error_cb, uint32_t task_recv_num)
 This method sets the doca_eth_rxq_task_recv tasks configuration. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_register (struct doca_eth_rxq *eth_rxq, union doca_data user_data, doca_eth_rxq_event_managed_recv_handler_cb_t success_event_handler, doca_eth_rxq_event_managed_recv_handler_cb_t error_event_handler)
 This method registers a doca_eth_rxq_event_managed_recv event. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_register (struct doca_eth_rxq *eth_rxq, enum doca_event_batch_events_number events_number_max, enum doca_event_batch_events_number events_number_min, union doca_data user_data, doca_eth_rxq_event_batch_managed_recv_handler_cb_t success_event_batch_handler, doca_eth_rxq_event_batch_managed_recv_handler_cb_t error_event_batch_handler)
 This method registers a doca_eth_rxq_event_managed_recv event batch. Allows user to get multiple event completions with one callback. can only be called before calling doca_ctx_start(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_allocate_init (struct doca_eth_rxq *eth_rxq, struct doca_buf *pkt, union doca_data user_data, struct doca_eth_rxq_task_recv **task_recv)
 This method allocates and initializes a doca_eth_rxq_task_recv task. More...
 
DOCA_EXPERIMENTAL void doca_eth_rxq_task_recv_set_pkt (struct doca_eth_rxq_task_recv *task_recv, struct doca_buf *pkt)
 This method sets packet buffer to doca_eth_rxq_task_recv task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_pkt (const struct doca_eth_rxq_task_recv *task_recv, struct doca_buf **pkt)
 This method gets packet buffer from doca_eth_rxq_task_recv task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_l3_ok (const struct doca_eth_rxq_task_recv *task_recv, uint8_t *l3_ok)
 This method checks if L3 checksum of finished doca_eth_rxq_task_recv task is ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_l3_ok (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, uint8_t *l3_ok)
 This method checks if L3 checksum of finished doca_eth_rxq_event_managed_recv event is ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_l3_ok_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint8_t **l3_ok_array)
 This method checks if L3 checksums of received packets in managed receive event batch are ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_l4_ok (const struct doca_eth_rxq_task_recv *task_recv, uint8_t *l4_ok)
 This method checks if L4 checksum of finished doca_eth_rxq_task_recv task is ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_l4_ok (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, uint8_t *l4_ok)
 This method checks if L4 checksum of finished doca_eth_rxq_event_managed_recv event is ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_l4_ok_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint8_t **l4_ok_array)
 This method checks if L4 checksums of received packets in managed receive event batch are ok. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_metadata_array (const struct doca_eth_rxq_task_recv *task_recv, const uint32_t **metadata_array)
 This method gets metadata array for the packet received by receive task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_metadata_array (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, const uint32_t **metadata_array)
 This method gets metadata array for the packet received by managed receive event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_metadata_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint32_t **metadata_array)
 This method gets metadata array for the packet received by managed receive event batch. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_flow_tag (const struct doca_eth_rxq_task_recv *task_recv, uint32_t *flow_tag)
 This method gets the flow tag of a finished receive task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_flow_tag (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, uint32_t *flow_tag)
 This method gets the flow tag of a managed receive event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_flow_tag_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint32_t **flow_tag_array)
 This method gets the flow tag array of a managed receive event batch. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_rx_hash (const struct doca_eth_rxq_task_recv *task_recv, uint32_t *rx_hash)
 This method gets the RX hash of a finished receive task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_rx_hash (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, uint32_t *rx_hash)
 This method gets the RX hash of a managed receive event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_rx_hash_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint32_t **rx_hash_array)
 This method gets the RX hash array of a managed receive event batch. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_timestamp (const struct doca_eth_rxq_task_recv *task_recv, uint64_t *timestamp)
 This method gets the timestamp of a finished receive task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_timestamp (const struct doca_eth_rxq_event_managed_recv *event_managed_recv, uint64_t *timestamp)
 This method gets the timestamp of a managed receive event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_timestamp_array (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, const uint64_t **timestamp_array)
 This method gets the timestamp array of a managed receive event batch. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_status (const struct doca_eth_rxq_event_managed_recv *event_managed_recv)
 This method gets status of finished doca_eth_rxq_event_managed_recv event. More...
 
DOCA_EXPERIMENTAL void doca_eth_rxq_event_batch_managed_recv_pkt_array_free (struct doca_buf **pkt_array)
 This method frees the packet array acquired using managed receive event batch and returns it to the ownership of the library. This function is an optimized approach of freeing packets returned from a single managed receive event batch. User should free the packets returned from a single event batch either by calling doca_buf_dec_refcount() per packet or calling this function with the original pkt_array returned in the CB. User can't mix both approaches per event batch (but can on different event batches). More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_eth_rxq_event_managed_recv_get_ctx (const struct doca_eth_rxq_event_managed_recv *event_managed_recv)
 This method gets context of finished doca_eth_rxq_event_managed_recv event. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_eth_rxq_event_batch_managed_recv_get_ctx (const struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv)
 This method gets context of finished doca_eth_rxq_event_batch_managed_recv event. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_eth_rxq_task_recv_as_doca_task (struct doca_eth_rxq_task_recv *task_recv)
 This method converts a doca_eth_rxq_task_recv task to doca_task. More...
 

Detailed Description

DOCA ETH RXQ library.

Macro Definition Documentation

◆ doca_eth_rxq_event_batch_managed_recv_metadata_array_get_metadata

#define doca_eth_rxq_event_batch_managed_recv_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 a specific metadata of a specific packet from metadata_array from managed receive event batch.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]metadata_arrayMetadata array returned from managed receive event batch.
[in]metadata_numMetadata number that was set by "doca_eth_rxq_set_metadata_num()".
[in]packet_indexIndex of the packet to get its metadata.
[in]metadata_indexIndex of metadata to get.
Returns
requested metadata

Definition at line 676 of file doca_eth_rxq_cpu_data_path.h.

Typedef Documentation

◆ doca_eth_rxq_event_batch_managed_recv_handler_cb_t

typedef void(* doca_eth_rxq_event_batch_managed_recv_handler_cb_t) (struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, uint16_t events_number, union doca_data event_batch_user_data, doca_error_t status, struct doca_buf **pkt_array)

Function to be executed on managed receive event batch occurrence.

Note
The packet buffers returned are valid as long as they weren't freed by the user. Holding the buffers for a long period of time might block receiving incoming packets as mentioned above for the DOCA_ETH_RXQ_TYPE_MANAGED_MEMPOOL type.
Parameters
[in]event_batch_managed_recvThe managed receive event batch. The implementation can assume this value is not NULL. It's valid only during the CB.
[in]events_numberNumber of retrieved events, each representing a received packet (0 in case of error callback).
[in]event_batch_user_datauser_data attached to the event batch.
[in]statusStatus of retrieved event batch.
[in]pkt_arrayArray of doca_bufs containing the received packets (NULL in case of error callback). Notes:

Definition at line 137 of file doca_eth_rxq_cpu_data_path.h.

◆ doca_eth_rxq_event_managed_recv_handler_cb_t

typedef void(* doca_eth_rxq_event_managed_recv_handler_cb_t) (struct doca_eth_rxq_event_managed_recv *event_managed_recv, struct doca_buf *pkt, union doca_data event_user_data)

Function to be executed on managed receive event occurrence.

Note
The packet buffer returned is valid as long as it wasn't freed by the user. Holding the buffer for a long period of time might block receiving incoming packets as mentioned above for the DOCA_ETH_RXQ_TYPE_MANAGED_MEMPOOL type.
Parameters
[in]event_managed_recvThe managed receive event. The implementation can assume this value is not NULL. It's valid only during the CB.
[in]pktdoca_buf containing the received packet (NULL in case of error callback). Notes:
[in]event_user_datauser_data attached to the event.

Definition at line 111 of file doca_eth_rxq_cpu_data_path.h.

◆ doca_eth_rxq_task_recv_completion_cb_t

typedef void(* doca_eth_rxq_task_recv_completion_cb_t) (struct doca_eth_rxq_task_recv *task_recv, union doca_data task_user_data, union doca_data ctx_user_data)

Function to execute on task completion.

DOCA ETH RXQ event batch for receiving multiple packets. Supported in DOCA_ETH_RXQ_TYPE_MANAGED_MEMPOOL mode.

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(). 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_recvThe 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 89 of file doca_eth_rxq_cpu_data_path.h.

Function Documentation

◆ doca_eth_rxq_event_batch_managed_recv_get_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_eth_rxq_event_batch_managed_recv_get_ctx ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv)

This method gets context of finished doca_eth_rxq_event_batch_managed_recv event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event to get the context from.
Returns
doca_ctx - the context associated with the event batch.

◆ doca_eth_rxq_event_batch_managed_recv_get_flow_tag_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_flow_tag_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint32_t **  flow_tag_array 
)

This method gets the flow tag array of a managed receive event batch.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]flow_tag_arrayArray of flow tag per packet to get. Array is valid only during the CB.
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_rxq_event_batch_managed_recv_get_l3_ok_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_l3_ok_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint8_t **  l3_ok_array 
)

This method checks if L3 checksums of received packets in managed receive event batch are ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]l3_ok_arrayArray of indicators for whether L3 checksum is ok or not per packet. Array is valid only during the CB.
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_rxq_event_batch_managed_recv_get_l4_ok_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_l4_ok_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint8_t **  l4_ok_array 
)

This method checks if L4 checksums of received packets in managed receive event batch are ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]l4_ok_arrayArray of indicators for whether L4 checksum is ok or not per packet. Array is valid only during the CB.
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_rxq_event_batch_managed_recv_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_metadata_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint32_t **  metadata_array 
)

This method gets metadata array for the packet received by managed receive event batch.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]metadata_arrayArray of metadata for the received packet. Array is valid only during the CB. Its length is metadata_num (set by "doca_eth_rxq_set_metadata_num()") * number of received packets in the event batch. See "doca_eth_rxq_event_batch_managed_recv_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_rxq_event_batch_managed_recv_get_rx_hash_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_rx_hash_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint32_t **  rx_hash_array 
)

This method gets the RX hash array of a managed receive event batch.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]rx_hash_arrayArray of RX hash per packet to get. Array is valid only during the CB.
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_rxq_event_batch_managed_recv_get_timestamp_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_get_timestamp_array ( const struct doca_eth_rxq_event_batch_managed_recv *  event_batch_managed_recv,
const uint64_t **  timestamp_array 
)

This method gets the timestamp array of a managed receive event batch.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_batch_managed_recvThe event batch to get from.
[out]timestamp_arrayArray of timestamp in nanoseconds per packet to get. Array is valid only during the CB.
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_rxq_event_batch_managed_recv_pkt_array_free()

DOCA_EXPERIMENTAL void doca_eth_rxq_event_batch_managed_recv_pkt_array_free ( struct doca_buf **  pkt_array)

This method frees the packet array acquired using managed receive event batch and returns it to the ownership of the library. This function is an optimized approach of freeing packets returned from a single managed receive event batch. User should free the packets returned from a single event batch either by calling doca_buf_dec_refcount() per packet or calling this function with the original pkt_array returned in the CB. User can't mix both approaches per event batch (but can on different event batches).

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]pkt_arrayThe packet array acquired using managed receive event batch.

◆ doca_eth_rxq_event_batch_managed_recv_register()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_batch_managed_recv_register ( struct doca_eth_rxq *  eth_rxq,
enum doca_event_batch_events_number  events_number_max,
enum doca_event_batch_events_number  events_number_min,
union doca_data  user_data,
doca_eth_rxq_event_batch_managed_recv_handler_cb_t  success_event_batch_handler,
doca_eth_rxq_event_batch_managed_recv_handler_cb_t  error_event_batch_handler 
)

This method registers a doca_eth_rxq_event_managed_recv event batch. Allows user to get multiple event completions with one callback. can only be called before calling doca_ctx_start().

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]eth_rxqPointer to doca_eth_rxq instance.
[in]events_number_maxMaximum number of completed events per callback.
[in]events_number_minMinimum number of completed events per callback.
[in]user_datadoca_data to attach to the event batch.
[in]success_event_batch_handlerMethod that is invoked once a successful event batch is triggered
[in]error_event_batch_handlerMethod that is invoked once an error event batch is triggered
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_BAD_STATE - eth_rxq context state is not idle.

◆ doca_eth_rxq_event_managed_recv_get_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_eth_rxq_event_managed_recv_get_ctx ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv)

This method gets context of finished doca_eth_rxq_event_managed_recv event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get the context from.
Returns
doca_ctx - the context associated with the event.

◆ doca_eth_rxq_event_managed_recv_get_flow_tag()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_flow_tag ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
uint32_t *  flow_tag 
)

This method gets the flow tag of a managed receive event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]flow_tagflow tag 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_rxq_event_managed_recv_get_l3_ok()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_l3_ok ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
uint8_t *  l3_ok 
)

This method checks if L3 checksum of finished doca_eth_rxq_event_managed_recv event is ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]l3_okIndicator whether L3 checksum is ok or not.
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_rxq_event_managed_recv_get_l4_ok()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_l4_ok ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
uint8_t *  l4_ok 
)

This method checks if L4 checksum of finished doca_eth_rxq_event_managed_recv event is ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]l4_okIndicator whether L4 checksum is ok or not.
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_rxq_event_managed_recv_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_metadata_array ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
const uint32_t **  metadata_array 
)

This method gets metadata array for the packet received by managed receive event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]metadata_arrayArray of metadata for the received packet. Its length is metadata_num (set by "doca_eth_rxq_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_rxq_event_managed_recv_get_rx_hash()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_rx_hash ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
uint32_t *  rx_hash 
)

This method gets the RX hash of a managed receive event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]rx_hashRX hash 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_rxq_event_managed_recv_get_status()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_status ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv)

This method gets status of finished doca_eth_rxq_event_managed_recv event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get status from.
Returns
DOCA_SUCCESS - in case of success. Any other doca_error_t indicates that the event failed (event depended)

◆ doca_eth_rxq_event_managed_recv_get_timestamp()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_get_timestamp ( const struct doca_eth_rxq_event_managed_recv *  event_managed_recv,
uint64_t *  timestamp 
)

This method gets the timestamp of a managed receive event.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]event_managed_recvThe event to get from.
[out]timestampTimestamp to get in nanoseconds.
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_rxq_event_managed_recv_register()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_event_managed_recv_register ( struct doca_eth_rxq *  eth_rxq,
union doca_data  user_data,
doca_eth_rxq_event_managed_recv_handler_cb_t  success_event_handler,
doca_eth_rxq_event_managed_recv_handler_cb_t  error_event_handler 
)

This method registers a doca_eth_rxq_event_managed_recv event. can only be called before calling doca_ctx_start().

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]eth_rxqPointer to doca_eth_rxq instance.
[in]user_datadoca_data to attach to the event.
[in]success_event_handlerMethod that is invoked once a successful event is triggered
[in]error_event_handlerMethod that is invoked once an error event is triggered
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_BAD_STATE - eth_rxq context state is not idle.

◆ doca_eth_rxq_task_recv_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_allocate_init ( struct doca_eth_rxq *  eth_rxq,
struct doca_buf *  pkt,
union doca_data  user_data,
struct doca_eth_rxq_task_recv **  task_recv 
)

This method allocates and initializes a doca_eth_rxq_task_recv task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]eth_rxqPointer to doca_eth_rxq instance.
[in]pktBuffer to receive packet.
[in]user_datadoca_data to attach to the task.
[out]task_recvdoca_eth_rxq_task_recv 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_rxq context state is not running.
  • DOCA_ERROR_NOT_CONNECTED - in case eth_rxq is not is not connected to a DOCA Progress Engine.
  • DOCA_ERROR_NOT_SUPPORTED - in case eth_rxq is not an instance for CPU.

◆ doca_eth_rxq_task_recv_as_doca_task()

DOCA_EXPERIMENTAL struct doca_task* doca_eth_rxq_task_recv_as_doca_task ( struct doca_eth_rxq_task_recv *  task_recv)

This method converts a doca_eth_rxq_task_recv task to doca_task.

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

◆ doca_eth_rxq_task_recv_get_flow_tag()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_flow_tag ( const struct doca_eth_rxq_task_recv *  task_recv,
uint32_t *  flow_tag 
)

This method gets the flow tag of a finished receive task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]flow_tagflow tag 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_rxq_task_recv_get_l3_ok()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_l3_ok ( const struct doca_eth_rxq_task_recv *  task_recv,
uint8_t *  l3_ok 
)

This method checks if L3 checksum of finished doca_eth_rxq_task_recv task is ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]l3_okIndicator whether L3 checksum is ok or not.
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_rxq_task_recv_get_l4_ok()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_l4_ok ( const struct doca_eth_rxq_task_recv *  task_recv,
uint8_t *  l4_ok 
)

This method checks if L4 checksum of finished doca_eth_rxq_task_recv task is ok.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]l4_okIndicator whether L4 checksum is ok or not.
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_rxq_task_recv_get_metadata_array()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_metadata_array ( const struct doca_eth_rxq_task_recv *  task_recv,
const uint32_t **  metadata_array 
)

This method gets metadata array for the packet received by receive task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]metadata_arrayArray of metadata for the received packet. Its length is metadata_num (set by "doca_eth_rxq_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_rxq_task_recv_get_pkt()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_pkt ( const struct doca_eth_rxq_task_recv *  task_recv,
struct doca_buf **  pkt 
)

This method gets packet buffer from doca_eth_rxq_task_recv task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe 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_rxq_task_recv_get_rx_hash()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_rx_hash ( const struct doca_eth_rxq_task_recv *  task_recv,
uint32_t *  rx_hash 
)

This method gets the RX hash of a finished receive task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]rx_hashRX hash 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_rxq_task_recv_get_timestamp()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_get_timestamp ( const struct doca_eth_rxq_task_recv *  task_recv,
uint64_t *  timestamp 
)

This method gets the timestamp of a finished receive task.

Note
Supported for DOCA ETH RXQ instance for CPU only.
Parameters
[in]task_recvThe task to get from.
[out]timestampTimestamp to get in nanoseconds.
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_rxq_task_recv_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_task_recv_set_conf ( struct doca_eth_rxq *  eth_rxq,
doca_eth_rxq_task_recv_completion_cb_t  task_completion_cb,
doca_eth_rxq_task_recv_completion_cb_t  task_error_cb,
uint32_t  task_recv_num 
)

This method sets the doca_eth_rxq_task_recv tasks configuration. can only be called before calling doca_ctx_start().

Note
Supported for DOCA ETH RXQ instance for CPU only. Function is relevant only in the case of context of type DOCA_ETH_RXQ_TYPE_REGULAR.
Parameters
[in]eth_rxqPointer to doca_eth_rxq instance.
[in]task_completion_cbTask completion callback.
[in]task_error_cbTask error callback.
[in]task_recv_numNumber of doca_eth_rxq_task_recv tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - eth_rxq argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - eth_rxq context state is not idle.

◆ doca_eth_rxq_task_recv_set_pkt()

DOCA_EXPERIMENTAL void doca_eth_rxq_task_recv_set_pkt ( struct doca_eth_rxq_task_recv *  task_recv,
struct doca_buf *  pkt 
)

This method sets packet buffer to doca_eth_rxq_task_recv task.

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