DPDK  19.02.0
Data Structures | Macros | Enumerations | Functions
rte_pmd_dpaa2_qdma.h File Reference

Go to the source code of this file.

Data Structures

struct  rte_qdma_attr
struct  rte_qdma_config
struct  rte_qdma_vq_stats
struct  rte_qdma_job

Macros

#define RTE_QDMA_VQ_EXCLUSIVE_PQ   (1ULL)
#define RTE_QDMA_JOB_SRC_PHY   (1ULL)
#define RTE_QDMA_JOB_DEST_PHY   (1ULL << 1)

Enumerations

enum  { RTE_QDMA_MODE_HW, RTE_QDMA_MODE_VIRTUAL }

Functions

int __rte_experimental rte_qdma_init (void)
void __rte_experimental rte_qdma_attr_get (struct rte_qdma_attr *qdma_attr)
int __rte_experimental rte_qdma_reset (void)
int __rte_experimental rte_qdma_configure (struct rte_qdma_config *qdma_config)
int __rte_experimental rte_qdma_start (void)
int __rte_experimental rte_qdma_vq_create (uint32_t lcore_id, uint32_t flags)
int __rte_experimental rte_qdma_vq_enqueue_multi (uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs)
int __rte_experimental rte_qdma_vq_enqueue (uint16_t vq_id, struct rte_qdma_job *job)
int __rte_experimental rte_qdma_vq_dequeue_multi (uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs)
struct rte_qdma_job
*__rte_experimental 
rte_qdma_vq_dequeue (uint16_t vq_id)
void __rte_experimental rte_qdma_vq_stats (uint16_t vq_id, struct rte_qdma_vq_stats *vq_stats)
int __rte_experimental rte_qdma_vq_destroy (uint16_t vq_id)
void __rte_experimental rte_qdma_stop (void)
void __rte_experimental rte_qdma_destroy (void)

Detailed Description

NXP dpaa2 QDMA specific structures.

Definition in file rte_pmd_dpaa2_qdma.h.

Macro Definition Documentation

#define RTE_QDMA_VQ_EXCLUSIVE_PQ   (1ULL)

If user has configued 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 40 of file rte_pmd_dpaa2_qdma.h.

#define RTE_QDMA_JOB_SRC_PHY   (1ULL)

States if the source addresses is physical.

Definition at line 43 of file rte_pmd_dpaa2_qdma.h.

#define RTE_QDMA_JOB_DEST_PHY   (1ULL << 1)

States if the destination addresses is physical.

Definition at line 46 of file rte_pmd_dpaa2_qdma.h.

Enumeration Type Documentation

anonymous enum

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 16 of file rte_pmd_dpaa2_qdma.h.

Function Documentation

int __rte_experimental rte_qdma_init ( void  )

Initialize the QDMA device.

Returns
  • 0: Success.
  • <0: Error code.
void __rte_experimental rte_qdma_attr_get ( struct rte_qdma_attr qdma_attr)

Get the QDMA attributes.

Parameters
qdma_attrQDMA attributes providing total number of hw queues etc.
int __rte_experimental 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.
int __rte_experimental rte_qdma_configure ( struct rte_qdma_config qdma_config)

Configure the QDMA device.

Returns
  • 0: Success.
  • <0: Error code.
int __rte_experimental rte_qdma_start ( void  )

Start the QDMA device.

Returns
  • 0: Success.
  • <0: Error code.
int __rte_experimental 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_idLCORE ID on which this particular queue would be associated with.
flagsRTE_QDMA_VQ_ flags. See macro definitions.
Returns
  • >= 0: Virtual queue ID.
  • <0: Error code.
int __rte_experimental 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_idVirtual Queue ID.
jobList of QDMA Jobs containing relevant information related to DMA.
nb_jobsNumber of QDMA jobs provided by the user.
Returns
  • >=0: Number of jobs successfully submitted
  • <0: Error code.
int __rte_experimental 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_idVirtual Queue ID.
jobA QDMA Job containing relevant information related to DMA.
Returns
  • >=0: Number of jobs successfully submitted
  • <0: Error code.
int __rte_experimental 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_idVirtual Queue ID.
jobList of QDMA Jobs returned from the API.
nb_jobsNumber of QDMA jobs requested for dequeue by the user.
Returns
Number of jobs actually dequeued.
struct rte_qdma_job* __rte_experimental rte_qdma_vq_dequeue ( uint16_t  vq_id)
read

Dequeue a single completed jobs from a Virtual Queue.

Parameters
vq_idVirtual Queue ID.
Returns
  • A completed job or NULL if no job is there.
void __rte_experimental rte_qdma_vq_stats ( uint16_t  vq_id,
struct rte_qdma_vq_stats vq_stats 
)

Get a Virtual Queue statistics.

Parameters
vq_idVirtual Queue ID.
vq_statsVQ statistics structure which will be filled in by the driver.
int __rte_experimental 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_idVirtual Queue ID which needs to be deinialized.
Returns
  • 0: Success.
  • <0: Error code.
void __rte_experimental rte_qdma_stop ( void  )

Stop QDMA device.

void __rte_experimental rte_qdma_destroy ( void  )

Destroy the QDMA device.