X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fraw%2Fdpaa2_qdma%2Frte_pmd_dpaa2_qdma.h;h=a1f9050358b9eafe966482d9cad2f3c2e04d1429;hb=9aee7a8418d4;hp=17fffcb74c60e0b9aa58dba5c12e3026022ecd19;hpb=81142e505f9f2724841c6d8cd7e4a9681b2ee092;p=dpdk.git diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h index 17fffcb74c..a1f9050358 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2018 NXP + * Copyright 2018-2019 NXP */ #ifndef __RTE_PMD_DPAA2_QDMA_H__ @@ -12,6 +12,9 @@ * */ +/** Maximum qdma burst size */ +#define RTE_QDMA_BURST_NB_MAX 256 + /** Determines the mode of operation */ enum { /** @@ -31,7 +34,7 @@ enum { }; /** - * If user has configued a Virtual Queue mode, but for some particular VQ + * 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 @@ -70,6 +73,40 @@ struct rte_qdma_config { int fle_pool_count; }; +struct rte_qdma_rbp { + uint32_t use_ultrashort:1; + uint32_t enable:1; + /** + * dportid: + * 0000 PCI-Express 1 + * 0001 PCI-Express 2 + * 0010 PCI-Express 3 + * 0011 PCI-Express 4 + * 0100 PCI-Express 5 + * 0101 PCI-Express 6 + */ + uint32_t dportid:4; + uint32_t dpfid:2; + uint32_t dvfid:6; + /*using route by port for destination */ + uint32_t drbp:1; + /** + * sportid: + * 0000 PCI-Express 1 + * 0001 PCI-Express 2 + * 0010 PCI-Express 3 + * 0011 PCI-Express 4 + * 0100 PCI-Express 5 + * 0101 PCI-Express 6 + */ + uint32_t sportid:4; + uint32_t spfid:2; + uint32_t svfid:6; + /* using route by port for source */ + uint32_t srbp:1; + uint32_t rsv:4; +}; + /** Provides QDMA device statistics */ struct rte_qdma_vq_stats { /** States if this vq has exclusively associated hw queue */ @@ -102,8 +139,10 @@ struct rte_qdma_job { /** * Status of the transaction. * This is filled in the dequeue operation by the driver. + * upper 8bits acc_err for route by port. + * lower 8bits fd error */ - uint8_t status; + uint16_t status; }; /** @@ -113,7 +152,7 @@ struct rte_qdma_job { * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_init(void); /** @@ -122,7 +161,7 @@ rte_qdma_init(void); * @param qdma_attr * QDMA attributes providing total number of hw queues etc. */ -void __rte_experimental +void rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr); /** @@ -134,7 +173,7 @@ rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_reset(void); /** @@ -144,7 +183,7 @@ rte_qdma_reset(void); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_configure(struct rte_qdma_config *qdma_config); /** @@ -154,7 +193,7 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_start(void); /** @@ -171,9 +210,14 @@ rte_qdma_start(void); * - >= 0: Virtual queue ID. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags); +/*create vq for route-by-port*/ +int +rte_qdma_vq_create_rbp(uint32_t lcore_id, uint32_t flags, + struct rte_qdma_rbp *rbp); + /** * Enqueue multiple jobs to a Virtual Queue. * If the enqueue is successful, the H/W will perform DMA operations @@ -190,7 +234,7 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags); * - >=0: Number of jobs successfully submitted * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_enqueue_multi(uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs); @@ -209,7 +253,7 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, * - >=0: Number of jobs successfully submitted * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_enqueue(uint16_t vq_id, struct rte_qdma_job *job); @@ -225,9 +269,10 @@ rte_qdma_vq_enqueue(uint16_t vq_id, * Number of QDMA jobs requested for dequeue by the user. * * @returns - * Number of jobs actually dequeued. + * - >=0: Number of jobs successfully received + * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_dequeue_multi(uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs); @@ -241,7 +286,7 @@ rte_qdma_vq_dequeue_multi(uint16_t vq_id, * @returns * - A completed job or NULL if no job is there. */ -struct rte_qdma_job * __rte_experimental +struct rte_qdma_job * rte_qdma_vq_dequeue(uint16_t vq_id); /** @@ -252,7 +297,7 @@ rte_qdma_vq_dequeue(uint16_t vq_id); * @param vq_stats * VQ statistics structure which will be filled in by the driver. */ -void __rte_experimental +void rte_qdma_vq_stats(uint16_t vq_id, struct rte_qdma_vq_stats *vq_stats); @@ -262,25 +307,40 @@ rte_qdma_vq_stats(uint16_t vq_id, * VQ's at runtime. * * @param vq_id - * Virtual Queue ID which needs to be deinialized. + * Virtual Queue ID which needs to be uninitialized. * * @returns * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_destroy(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. + * + * @param vq_id + * RBP based Virtual Queue ID which needs to be uninitialized. + * + * @returns + * - 0: Success. + * - <0: Error code. + */ + +int +rte_qdma_vq_destroy_rbp(uint16_t vq_id); /** * Stop QDMA device. */ -void __rte_experimental +void rte_qdma_stop(void); /** * Destroy the QDMA device. */ -void __rte_experimental +void rte_qdma_destroy(void); #endif /* __RTE_PMD_DPAA2_QDMA_H__*/