Go to the source code of this file.
NXP dpaa2 QDMA specific structures.
Definition in file rte_pmd_dpaa2_qdma.h.
#define RTE_QDMA_BURST_NB_MAX 256 |
#define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL) |
If user has configured a Virtual Queue mode, but for some particular VQ user needs an exclusive H/W queue associated (for better performance on that particular VQ), then user can pass this flag while creating the Virtual Queue. A H/W queue will be allocated corresponding to VQ which uses this flag.
Definition at line 49 of file rte_pmd_dpaa2_qdma.h.
#define RTE_QDMA_JOB_SRC_PHY (1ULL) |
#define RTE_QDMA_JOB_DEST_PHY (1ULL << 1) |
Determines the mode of operation
Enumerator |
---|
RTE_QDMA_MODE_HW |
Allocate a H/W queue per VQ i.e. Exclusive hardware queue for a VQ. This mode will have best performance.
|
RTE_QDMA_MODE_VIRTUAL |
A VQ shall not have an exclusive associated H/W queue. Rather a H/W Queue will be shared by multiple Virtual Queues. This mode will have intermediate data structures to support multi VQ to PQ mappings thus having some performance implications. Note: Even in this mode there is an option to allocate a H/W queue for a VQ. Please see 'RTE_QDMA_VQ_EXCLUSIVE_PQ' flag.
|
Definition at line 19 of file rte_pmd_dpaa2_qdma.h.
int rte_qdma_init |
( |
void |
| ) |
|
Initialize the QDMA device.
- Returns
- 0: Success.
- <0: Error code.
Get the QDMA attributes.
- Parameters
-
qdma_attr | QDMA attributes providing total number of hw queues etc. |
int rte_qdma_reset |
( |
void |
| ) |
|
Reset the QDMA device. This API will completely reset the QDMA device, bringing it to original state as if only rte_qdma_init() API has been called.
- Returns
- 0: Success.
- <0: Error code.
Configure the QDMA device.
- Returns
- 0: Success.
- <0: Error code.
int rte_qdma_start |
( |
void |
| ) |
|
Start the QDMA device.
- Returns
- 0: Success.
- <0: Error code.
int rte_qdma_vq_create |
( |
uint32_t |
lcore_id, |
|
|
uint32_t |
flags |
|
) |
| |
Create a Virtual Queue on a particular lcore id. This API can be called from any thread/core. User can create/destroy VQ's at runtime.
- Parameters
-
lcore_id | LCORE ID on which this particular queue would be associated with. |
flags | RTE_QDMA_VQ_ flags. See macro definitions. |
- Returns
- >= 0: Virtual queue ID.
- <0: Error code.
int rte_qdma_vq_enqueue_multi |
( |
uint16_t |
vq_id, |
|
|
struct rte_qdma_job ** |
job, |
|
|
uint16_t |
nb_jobs |
|
) |
| |
Enqueue multiple jobs to a Virtual Queue. If the enqueue is successful, the H/W will perform DMA operations on the basis of the QDMA jobs provided.
- Parameters
-
vq_id | Virtual Queue ID. |
job | List of QDMA Jobs containing relevant information related to DMA. |
nb_jobs | Number of QDMA jobs provided by the user. |
- Returns
- >=0: Number of jobs successfully submitted
- <0: Error code.
int rte_qdma_vq_enqueue |
( |
uint16_t |
vq_id, |
|
|
struct rte_qdma_job * |
job |
|
) |
| |
Enqueue a single job to a Virtual Queue. If the enqueue is successful, the H/W will perform DMA operations on the basis of the QDMA job provided.
- Parameters
-
vq_id | Virtual Queue ID. |
job | A QDMA Job containing relevant information related to DMA. |
- Returns
- >=0: Number of jobs successfully submitted
- <0: Error code.
int rte_qdma_vq_dequeue_multi |
( |
uint16_t |
vq_id, |
|
|
struct rte_qdma_job ** |
job, |
|
|
uint16_t |
nb_jobs |
|
) |
| |
Dequeue multiple completed jobs from a Virtual Queue. Provides the list of completed jobs capped by nb_jobs.
- Parameters
-
vq_id | Virtual Queue ID. |
job | List of QDMA Jobs returned from the API. |
nb_jobs | Number of QDMA jobs requested for dequeue by the user. |
- Returns
- >=0: Number of jobs successfully received
- <0: Error code.
Dequeue a single completed jobs from a Virtual Queue.
- Parameters
-
- Returns
- A completed job or NULL if no job is there.
Get a Virtual Queue statistics.
- Parameters
-
vq_id | Virtual Queue ID. |
vq_stats | VQ statistics structure which will be filled in by the driver. |
int rte_qdma_vq_destroy |
( |
uint16_t |
vq_id | ) |
|
Destroy the Virtual Queue specified by vq_id. This API can be called from any thread/core. User can create/destroy VQ's at runtime.
- Parameters
-
vq_id | Virtual Queue ID which needs to be uninitialized. |
- Returns
- 0: Success.
- <0: Error code.
int rte_qdma_vq_destroy_rbp |
( |
uint16_t |
vq_id | ) |
|
Destroy the RBP specific Virtual Queue specified by vq_id. This API can be called from any thread/core. User can create/destroy VQ's at runtime.
- Parameters
-
vq_id | RBP based Virtual Queue ID which needs to be uninitialized. |
- Returns
- 0: Success.
- <0: Error code.
void rte_qdma_stop |
( |
void |
| ) |
|
void rte_qdma_destroy |
( |
void |
| ) |
|