raw/dpaa2_qdma: add support for route by port in DMA
PATCH 1/2 raw/dpaa2_qdma: add support for route by port in DMA
RBP or route by ports can help in translating the DMA address over the PCI. Thus adding the RBP support with long and short formats
Signed-off-by Minghuan Lian <[email protected]>
Signed-off-by Sachin Saxena <[email protected]>
Signed-off-by Nipun Gupta <[email protected]>
--- .../bus/fslmc/qbman/include/fsl_qbman_base.h | 84 ++++ drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 399 ++++++++++++------ drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 17 +- drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 9 + 4 files changed, 364 insertions(+), 145 deletions(-)
drivers/bus/fslmc/qbman/include/fsl_qbman_base.h +84 -0
@@ -135,6 +135,90 @@ struct qbman_fd {uint32_t flc_lo;uint32_t flc_hi; } simple; + +struct qbman_fd_us_pci_simple { +uint32_t saddr_lo; +uint32_t saddr_hi; + +uint32_t len_sl:18 ; +uint32_t rsv1:14 ; + +uint32_t sportid:4 ; +uint32_t rsv2:22 ; +uint32_t bmt:1 ; +uint32_t rsv3:1 ; +uint32_t fmt:2 ; +uint32_t sl:1 ; +uint32_t rsv4:1 ; + +uint32_t acc_err:4 ; +uint32_t rsv5:4 ; +uint32_t ser:1 ; +uint32_t rsv6:3 ; +uint32_t wrttype:4 ; +uint32_t dqos:3 ; +uint32_t drbp:1 ; +uint32_t dlwc:2 ; +uint32_t rsv7:2 ; +uint32_t rdttype:4 ; +uint32_t sqos:3 ; +uint32_t srbp:1 ; + +uint32_t error:8 ; +uint32_t dportid:4 ; +uint32_t rsv8:5 ; +uint32_t dca:1 ; +uint32_t dat:2 ; +uint32_t dattr:3 ; +uint32_t dvfa:1 ; +uint32_t dtc:3 ; +uint32_t so:1 ; +uint32_t dd:4 ; + +uint32_t daddr_lo; +uint32_t daddr_hi; + } simple_pci; +struct qbman_fd_us_ddr_simple { +uint32_t saddr_lo; + +uint32_t saddr_hi:17 ; +uint32_t rsv1:15 ; + +uint32_t len; + +uint32_t rsv2:15 ; +uint32_t bmt:1 ; +uint32_t rsv3:12 ; +uint32_t fmt:2 ; +uint32_t sl:1 ; +uint32_t rsv4:1 ; + +uint32_t acc_err:4 ; +uint32_t rsv5:4 ; +uint32_t ser:1 ; +uint32_t rsv6:2 ; +uint32_t wns:1 ; +uint32_t wrttype:4 ; +uint32_t dqos:3 ; +uint32_t rsv12:1 ; +uint32_t dlwc:2 ; +uint32_t rsv7:1 ; +uint32_t rns:1 ; +uint32_t rdttype:4 ; +uint32_t sqos:3 ; +uint32_t rsv11:1 ; + +uint32_t error:8 ; +uint32_t rsv8:6 ; +uint32_t va:1 ; +uint32_t rsv9:13 ; +uint32_t dd:4 ; + +uint32_t daddr_lo; + +uint32_t daddr_hi:17 ; +uint32_t rsv10:15 ; + } simple_ddr; }; };
drivers/raw/dpaa2_qdma/dpaa2_qdma.c +268 -131
423 lines not on this page · raw message
drivers/raw/dpaa2_qdma/dpaa2_qdma.h +3 -14
@@ -1,12 +1,12 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright 2018 NXP +* Copyright 2018-2019 NXP */ #ifndef __DPAA2_QDMA_H__#define __DPAA2_QDMA_H__struct qdma_sdd ; -struct qdma_io_meta ; +struct rte_qdma_job ;#define DPAA2_QDMA_MAX_FLE 3#define DPAA2_QDMA_MAX_SDD 2
@@ -14,7 +14,7 @@ struct qdma_io_meta;#define DPAA2_DPDMAI_MAX_QUEUES 8/** FLE pool size: 3 Frame list + 2 source/destination descriptor */ -#define QDMA_FLE_POOL_SIZE (sizeof(struct qdma_io_meta) + \ +#define QDMA_FLE_POOL_SIZE (sizeof(struct rte_qdma_job *) + \ sizeof(struct qbman_fle) * DPAA2_QDMA_MAX_FLE + \ sizeof(struct qdma_sdd) * DPAA2_QDMA_MAX_SDD)/** FLE pool cache size */
@@ -108,17 +108,6 @@ struct qdma_per_core_info {uint16_t num_hw_queues; }; -/** Metadata which is stored with each operation */ -struct qdma_io_meta { -/** -* Context which is stored in the FLE pool (just before the FLE). -* QDMA job is stored as a this context as a part of metadata. -*/ -uint64_t cnxt; -/** VQ ID is stored as a part of metadata of the enqueue command */ -uint64_t id; -}; -/** Source/Destination Descriptor */ struct qdma_sdd {uint32_t rsv;
drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +9 -0
@@ -33,6 +33,12 @@ enum { RTE_QDMA_MODE_VIRTUAL }; +/** Determines the format of FD */ +enum { +RTE_QDMA_LONG_FORMAT , +RTE_QDMA_ULTRASHORT_FORMAT , +}; +/** * If user has configured a Virtual Queue mode, but for some particular VQ * user needs an exclusive H/W queue associated (for better performance
@@ -62,6 +68,8 @@ struct rte_qdma_config {uint16_t max_vqs;/** mode of operation - physical(h/w) or virtual */ uint8_t mode; +/** FD format */ +uint8_t format;/** * User provides this as input to the driver as a size of the FLE pool. * FLE's (and corresponding source/destination descriptors) are
@@ -143,6 +151,7 @@ struct rte_qdma_job {* lower 8bits fd error */ uint16_t status; +uint16_t vq_id; };/**
Signature · 1 line
2.17.1
PATCH 2/2 event/dpaa2: support ordered queue case type
Ordered queue is supported on DPAA2. Enable this case.
Signed-off-by Nipun Gupta <[email protected]>
--- drivers/event/dpaa2/dpaa2_eventdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/event/dpaa2/dpaa2_eventdev.c +2 -2
@@ -477,7 +477,6 @@ dpaa2_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,RTE_SET_USED (dev);RTE_SET_USED (queue_id); -RTE_SET_USED (queue_conf); queue_conf->nb_atomic_flows =DPAA2_EVENT_QUEUE_ATOMIC_FLOWS ; queue_conf->schedule_type =RTE_SCHED_TYPE_PARALLEL ;
@@ -496,8 +495,9 @@ dpaa2_eventdev_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,switch (queue_conf->schedule_type) {case RTE_SCHED_TYPE_PARALLEL :case RTE_SCHED_TYPE_ATOMIC : -break ;case RTE_SCHED_TYPE_ORDERED : +break ; +default :DPAA2_EVENTDEV_ERR ("Schedule type is not supported." );return -1 ; }
Signature · 1 line
2.17.1
Acked-by Hemant Agrawal <[email protected]>
Thomas Monjalon
Applied07/11/2019 10:57, Hemant Agrawal:
Quoted 1 line
Acked-by Hemant Agrawal <[email protected]>
Applied, thanks