NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_dpdk.h File Reference
#include <doca_error.h>
Include dependency graph for doca_dpdk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DOCA_EXPERIMENTAL doca_error_t doca_dpdk_cap_is_rep_port_supported (const struct doca_devinfo *devinfo, uint8_t *is_rep_port_supported)
 Check if the device supports representors for port_probe. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_port_probe (struct doca_dev *dev, const char *devargs)
 Attach a DPDK port specified by DOCA device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_get_first_port_id (const struct doca_dev *dev, uint16_t *port_id)
 Return the first DPDK port id associated to a DOCA device. Assumption is that the doca device that was probed using doca_dpdk_port_probe(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_port_as_dev (uint16_t port_id, struct doca_dev **dev)
 Return the DOCA device associated with a DPDK port. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_open_dev_rep_by_port_id (uint16_t port_id, struct doca_dev *dev, struct doca_dev_rep **rep)
 Return a new DOCA device representor associated with a DPDK port. Assumption is that the DPDK port is probed using doca_dev or doca_dpdk_port_probe(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_get_rep_vf_index (const struct doca_devinfo_rep *rep, uint16_t *vf_idx)
 Return the VF index of a network VF representor. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_get_rep_sf_num (const struct doca_devinfo_rep *rep, uint16_t *sf_num)
 Return the SF number of a network SF representor. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_create (const struct rte_mempool *mbuf_pool, struct doca_dpdk_mempool **mempool_out)
 Create a DOCA DPDK memory pool, with ability to convert rte_mbuf to doca_buf Expected flow is as follows: Control path: // Create the memory pool based on a DPDK memory pool doca_dpdk_mempool_create() // Add 1 or more DOCA devices doca_dpdk_mempool_dev_add() // Set permission level across all devices (default=LOCAL_READ/WRITE) doca_dpdk_mempool_set_permissions() // Start the pool doca_dpdk_mempool_start() More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_destroy (struct doca_dpdk_mempool *mempool)
 Destroy a DOCA DPDK memory pool Before destroying need to make sure that all buffers that were acquired using doca_dpdk_mempool_mbuf_to_buf() have been released This must be called before destroying the originating DPDK mempool. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_dev_add (struct doca_dpdk_mempool *mempool, struct doca_dev *dev)
 Add a DOCA device to the mempool This allows the DOCA bufs that are retrieved from the pool to be compatible with other DOCA libraries, that use the DOCA device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_set_permissions (struct doca_dpdk_mempool *mempool, uint32_t access_mask)
 Set the read/write permissions of the memory for devices Default: DOCA_ACCESS_FLAG_LOCAL_READ_WRITE Setting the permission will set the access that the added devices have over the memory of the DOCA buffers. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_start (struct doca_dpdk_mempool *mempool)
 Start the DOCA DPDK memory pool Operations that must be done before start: Adding at least 1 device - doca_dpdk_mempool_dev_add() Optionally, setting the permission level - doca_dpdk_mempool_set_permissions() Operations that are allowed after start: Acquiring a matching doca_buf from an rte_mbuf - doca_dpdk_mempool_mbuf_to_buf() Destroying the DOCA DPDK memory pool - doca_dpdk_mempool_destroy() More...
 
DOCA_EXPERIMENTAL doca_error_t doca_dpdk_mempool_mbuf_to_buf (struct doca_dpdk_mempool *mempool, struct doca_buf_inventory *inventory, struct rte_mbuf *mbuf, struct doca_buf **buf)
 Acquire a doca_buf based on an rte_mbuf The acquired doca_buf attempts to be as similar as possible to the rte_mbuf Level of support: More...