| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Modules | |
| DOCA ETH RXQ | |
| DOCA ETH TXQ | |
Enumerations | |
| enum | doca_eth_rxq_type { DOCA_ETH_RXQ_TYPE_CYCLIC = 0 , DOCA_ETH_RXQ_TYPE_MANAGED_MEMPOOL , DOCA_ETH_RXQ_TYPE_REGULAR } |
| enum | doca_eth_rxq_data_path_type { DOCA_ETH_RXQ_DATA_PATH_TYPE_CPU = 0 , DOCA_ETH_RXQ_DATA_PATH_TYPE_GPU } |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_create (struct doca_dev *dev, uint32_t max_burst_size, uint32_t max_packet_size, struct doca_eth_rxq **eth_rxq) |
| Create a DOCA ETH RXQ instance. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_destroy (struct doca_eth_rxq *eth_rxq) |
| Destroy a DOCA ETH RXQ instance. More... | |
| DOCA_EXPERIMENTAL struct doca_ctx * | doca_eth_rxq_as_doca_ctx (struct doca_eth_rxq *eth_rxq) |
| Convert doca_eth_rxq instance into a generalized context for use with doca core objects. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_max_burst_size (struct doca_eth_rxq *eth_rxq, uint32_t max_burst_size) |
| Set max burst size property for doca_eth_rxq. 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_rxq_set_max_packet_size (struct doca_eth_rxq *eth_rxq, uint32_t max_packet_size) |
| Set max packet size property for doca_eth_rxq. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_metadata_num (struct doca_eth_rxq *eth_rxq, uint8_t metadata_num) |
| Set metadata number for doca_eth_rxq. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_flow_tag (struct doca_eth_rxq *eth_rxq, uint8_t enable_flow_tag) |
| Setter to enable flow tag support. User can retrieve flow tag per packet when this is enabled. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_rx_hash (struct doca_eth_rxq *eth_rxq, uint8_t enable_rx_hash) |
| Setter to enable RX hash support. User can retrieve RX hash per packet when this is enabled. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_packet_headroom (struct doca_eth_rxq *eth_rxq, uint16_t head_size) |
| Setter to enable packet headroom support. User can use doca_buf's headroom of size head_size when this is enabled. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_packet_tailroom (struct doca_eth_rxq *eth_rxq, uint16_t tail_size) |
| Setter to enable packet tailroom support. User can use doca_buf's tailroom of size tail_size when this is enabled. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_timestamp (struct doca_eth_rxq *eth_rxq, uint8_t enable_timestamp) |
| Setter to enable timestamp support. User can retrieve timestamp in nanoseconds per packet when this is enabled. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_max_recv_buf_list_len (struct doca_eth_rxq *eth_rxq, uint32_t max_recv_buf_list_len) |
| Set the maximal receive buffer list length for doca_eth_rxq. 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_rxq_set_pkt_buf (struct doca_eth_rxq *eth_rxq, struct doca_mmap *mmap, uint32_t mmap_offset, uint32_t mmap_len) |
| Set Eth packet buffer for a doca_eth_rxq. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_type (struct doca_eth_rxq *eth_rxq, enum doca_eth_rxq_type type) |
| Set RX queue type property for doca_eth_rxq. can only be called before calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_set_notification_moderation (struct doca_eth_rxq *eth_rxq, uint16_t period_usec, uint16_t comp_count) |
| Set notification moderation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_get_flow_queue_id (struct doca_eth_rxq *eth_rxq, uint16_t *flow_queue_id) |
| Get the DPDK queue ID of the doca_eth receive queue. can only be called after calling doca_ctx_start(). More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_get_gpu_handle (const struct doca_eth_rxq *eth_rxq, struct doca_gpu_eth_rxq **eth_rxq_ext) |
| Get a gpu handle of a doca_eth_rxq. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_cap_get_max_burst_size (const struct doca_devinfo *devinfo, uint32_t *max_burst_size) |
| Get the maximum burst size supported by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_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_rxq_cap_get_max_packet_headroom (const struct doca_devinfo *devinfo, uint16_t *max_packet_headroom) |
| Get the maximum packet headroom size supported by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_cap_get_max_packet_tailroom (const struct doca_devinfo *devinfo, uint16_t *max_packet_tailroom) |
| Get the maximum packet tailroom size supported by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_cap_get_max_recv_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_recv_buf_list_len) |
| Get the maximum receive buffer list length supported by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_cap_get_max_packet_size (const struct doca_devinfo *devinfo, uint32_t *max_packet_size) |
| Get the maximum packet size supported by the device. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_cap_is_type_supported (const struct doca_devinfo *devinfo, enum doca_eth_rxq_type type, enum doca_eth_rxq_data_path_type data_path_type) |
| Check if RX queue type is supported. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_eth_rxq_estimate_packet_buf_size (enum doca_eth_rxq_type type, uint32_t rate, uint16_t pkt_max_time, uint32_t max_packet_size, uint32_t max_burst_size, uint8_t log_max_lro_pkt_sz, uint16_t head_size, uint16_t tail_size, uint32_t *buf_size) |
| Get the recommended size for the mmap buffer of a doca_eth_rxq. More... | |
DOCA ETH RXQ library.
RX data-path type.
| Enumerator | |
|---|---|
| DOCA_ETH_RXQ_DATA_PATH_TYPE_CPU | Enable data path management on the CPU |
| DOCA_ETH_RXQ_DATA_PATH_TYPE_GPU | Enable data path management on the GPU |
Definition at line 94 of file doca_eth_rxq.h.
| enum doca_eth_rxq_type |
RX queue type.
Definition at line 64 of file doca_eth_rxq.h.
| DOCA_EXPERIMENTAL struct doca_ctx* doca_eth_rxq_as_doca_ctx | ( | struct doca_eth_rxq * | eth_rxq | ) |
Convert doca_eth_rxq instance into a generalized context for use with doca core objects.
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_burst_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_burst_size | ||
| ) |
Get the maximum burst size supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_burst_size | The max burst size. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_metadata_num | ( | const struct doca_devinfo * | devinfo, |
| uint8_t * | max_metadata_num | ||
| ) |
Get the maximum metadata number supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_metadata_num | Maximal metadata number to get. (check doca_eth_rxq_set_metadata_num) |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_packet_headroom | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | max_packet_headroom | ||
| ) |
Get the maximum packet headroom size supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_packet_headroom | Maximal packet headroom size to get. (check doca_eth_rxq_set_packet_headroom) |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_packet_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_packet_size | ||
| ) |
Get the maximum packet size supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_packet_size | The max packet size. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_packet_tailroom | ( | const struct doca_devinfo * | devinfo, |
| uint16_t * | max_packet_tailroom | ||
| ) |
Get the maximum packet tailroom size supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_packet_tailroom | Maximal packet tailroom size to get. (check doca_eth_rxq_set_packet_tailroom) |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_get_max_recv_buf_list_len | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_recv_buf_list_len | ||
| ) |
Get the maximum receive buffer list length supported by the device.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [out] | max_recv_buf_list_len | Maximal receive buffer list length to get. (check doca_eth_rxq_set_max_recv_buf_list_len) |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_cap_is_type_supported | ( | const struct doca_devinfo * | devinfo, |
| enum doca_eth_rxq_type | type, | ||
| enum doca_eth_rxq_data_path_type | data_path_type | ||
| ) |
Check if RX queue type is supported.
| [in] | devinfo | Pointer to doca_devinfo instance. |
| [in] | type | RX queue type - see enum doca_eth_rxq_type. |
| [in] | data_path_type | RX data-path type - see enum doca_eth_rxq_data_path_type. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_create | ( | struct doca_dev * | dev, |
| uint32_t | max_burst_size, | ||
| uint32_t | max_packet_size, | ||
| struct doca_eth_rxq ** | eth_rxq | ||
| ) |
Create a DOCA ETH RXQ instance.
| [in] | dev | Device to bind the context. |
| [in] | max_burst_size | Max burst size to use in context. |
| [in] | max_packet_size | Max packet size to use in context. |
| [out] | eth_rxq | Pointer to pointer to be set to point to the created doca_eth_rxq instance. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_destroy | ( | struct doca_eth_rxq * | eth_rxq | ) |
Destroy a DOCA ETH RXQ instance.
| [in] | eth_rxq | Pointer to instance to be destroyed. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_estimate_packet_buf_size | ( | enum doca_eth_rxq_type | type, |
| uint32_t | rate, | ||
| uint16_t | pkt_max_time, | ||
| uint32_t | max_packet_size, | ||
| uint32_t | max_burst_size, | ||
| uint8_t | log_max_lro_pkt_sz, | ||
| uint16_t | head_size, | ||
| uint16_t | tail_size, | ||
| uint32_t * | buf_size | ||
| ) |
Get the recommended size for the mmap buffer of a doca_eth_rxq.
This function should be used for calculating the recommended size of the doca_mmap given to doca_eth_rxq_set_pkt_buf().
| [in] | type | Type of DOCA ETH RXQ. |
| [in] | rate | Rate in [MB/s] in which the doca_rxq is expected to receive traffic. |
| [in] | pkt_max_time | Max time in [μs] a packet may take to be processed. |
| [in] | max_packet_size | Max non-LRO packet size in [B]. |
| [in] | max_burst_size | Max size of packets burst. |
| [in] | log_max_lro_pkt_sz | Log of max LRO packet size. |
| [in] | head_size | Packet headroom size. |
| [in] | tail_size | Packet tailroom size. |
| [out] | buf_size | The recommended size for the mmap buffer in [B]. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_get_flow_queue_id | ( | struct doca_eth_rxq * | eth_rxq, |
| uint16_t * | flow_queue_id | ||
| ) |
Get the DPDK queue ID of the doca_eth receive queue. can only be called after calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [out] | flow_queue_id | The queue ID to be used in rte_flow or doca_flow. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_get_gpu_handle | ( | const struct doca_eth_rxq * | eth_rxq, |
| struct doca_gpu_eth_rxq ** | eth_rxq_ext | ||
| ) |
Get a gpu handle of a doca_eth_rxq.
This method should be used after ctx is started. The expected flow is as follows:
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [out] | eth_rxq_ext | A doca gpu eth_rxq handle. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_flow_tag | ( | struct doca_eth_rxq * | eth_rxq, |
| uint8_t | enable_flow_tag | ||
| ) |
Setter to enable flow tag support. User can retrieve flow tag per packet when this is enabled. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | enable_flow_tag | An indicator to enable/disable flow tag. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_max_burst_size | ( | struct doca_eth_rxq * | eth_rxq, |
| uint32_t | max_burst_size | ||
| ) |
Set max burst size property for doca_eth_rxq. 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().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | max_burst_size | Max burst size to use in context. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_max_packet_size | ( | struct doca_eth_rxq * | eth_rxq, |
| uint32_t | max_packet_size | ||
| ) |
Set max packet size property for doca_eth_rxq. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | max_packet_size | Max packet size to use in context. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_max_recv_buf_list_len | ( | struct doca_eth_rxq * | eth_rxq, |
| uint32_t | max_recv_buf_list_len | ||
| ) |
Set the maximal receive buffer list length for doca_eth_rxq. This value indicated what the maximal number of elements in a doca_buf list is. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | max_recv_buf_list_len | Maximal receive buffer list length to use in context. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_metadata_num | ( | struct doca_eth_rxq * | eth_rxq, |
| uint8_t | metadata_num | ||
| ) |
Set metadata number for doca_eth_rxq. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | metadata_num | Number of metadata per packet. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_notification_moderation | ( | struct doca_eth_rxq * | eth_rxq, |
| uint16_t | period_usec, | ||
| uint16_t | comp_count | ||
| ) |
Set notification moderation.
Notification moderation affects the number of events Rx completion events. Notification moderation can be modified at run time.
| [in] | eth_rxq | Pointer to instance to set the moderation |
| [in] | period_usec | (0 disables moderation) Period in microseconds from the first completion until event is fired |
| [in] | comp_count | (0 disables moderation) Number of Rx completions until event is fired |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_packet_headroom | ( | struct doca_eth_rxq * | eth_rxq, |
| uint16_t | head_size | ||
| ) |
Setter to enable packet headroom support. User can use doca_buf's headroom of size head_size when this is enabled. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | head_size | Head size to use for packet's headroom. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_packet_tailroom | ( | struct doca_eth_rxq * | eth_rxq, |
| uint16_t | tail_size | ||
| ) |
Setter to enable packet tailroom support. User can use doca_buf's tailroom of size tail_size when this is enabled. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | tail_size | Tail size to use for packet's tailroom. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_pkt_buf | ( | struct doca_eth_rxq * | eth_rxq, |
| struct doca_mmap * | mmap, | ||
| uint32_t | mmap_offset, | ||
| uint32_t | mmap_len | ||
| ) |
Set Eth packet buffer for a doca_eth_rxq. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | mmap | The mmap consist of the memrange for the Eth packet buffer. |
| [in] | mmap_offset | The offset from mmap start to set the packet buffer. |
| [in] | mmap_len | The mmap length of the packet buffer, starting from offset. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_rx_hash | ( | struct doca_eth_rxq * | eth_rxq, |
| uint8_t | enable_rx_hash | ||
| ) |
Setter to enable RX hash support. User can retrieve RX hash per packet when this is enabled. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | enable_rx_hash | An indicator to enable/disable RX hash. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_timestamp | ( | struct doca_eth_rxq * | eth_rxq, |
| uint8_t | enable_timestamp | ||
| ) |
Setter to enable timestamp support. User can retrieve timestamp in nanoseconds per packet when this is enabled. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | enable_timestamp | An indicator to enable/disable timestamp. |
| DOCA_EXPERIMENTAL doca_error_t doca_eth_rxq_set_type | ( | struct doca_eth_rxq * | eth_rxq, |
| enum doca_eth_rxq_type | type | ||
| ) |
Set RX queue type property for doca_eth_rxq. can only be called before calling doca_ctx_start().
| [in] | eth_rxq | Pointer to doca_eth_rxq instance. |
| [in] | type | RX queue type - see enum doca_eth_rxq_type. |