[dpdk-dev,v5,1/5] drivers: add queue parameter in event processing callback
Checks
Commit Message
For event dequeues for ethernet queues, a dpaa2_queue structure is
required to get the configuration for that ethernet queue. Based on
this configuration the rte_event is to be filled at the ingress side.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
This patch series is based over the following patch:
http://dpdk.org/dev/patchwork/patch/30430/
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++++
drivers/event/dpaa2/dpaa2_eventdev.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
Comments
-----Original Message-----
> Date: Mon, 23 Oct 2017 18:07:02 +0530
> From: Nipun Gupta <nipun.gupta@nxp.com>
> To: dev@dpdk.org
> CC: hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com,
> nikhil.rao@intel.com, Nipun Gupta <nipun.gupta@nxp.com>
> Subject: [PATCH v5 1/5] drivers: add queue parameter in event processing
> callback
> X-Mailer: git-send-email 1.9.1
>
> For event dequeues for ethernet queues, a dpaa2_queue structure is
> required to get the configuration for that ethernet queue. Based on
> this configuration the rte_event is to be filled at the ingress side.
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> This patch series is based over the following patch:
> http://dpdk.org/dev/patchwork/patch/30430/
Series applied to dpdk-next-eventdev/master. Thanks.
@@ -125,9 +125,12 @@ struct queue_storage_info_t {
int toggle;
};
+struct dpaa2_queue;
+
typedef void (dpaa2_queue_cb_dqrr_t)(struct qbman_swp *swp,
const struct qbman_fd *fd,
const struct qbman_result *dq,
+ struct dpaa2_queue *rxq,
struct rte_event *ev);
struct dpaa2_queue {
@@ -144,6 +147,7 @@ struct dpaa2_queue {
struct queue_storage_info_t *q_storage;
struct qbman_result *cscn;
};
+ struct rte_event ev;
dpaa2_queue_cb_dqrr_t *cb;
};
@@ -189,10 +189,14 @@ static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks)
static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp,
const struct qbman_fd *fd,
const struct qbman_result *dq,
+ struct dpaa2_queue *rxq,
struct rte_event *ev)
{
struct rte_event *ev_temp =
(struct rte_event *)DPAA2_GET_FD_ADDR(fd);
+
+ RTE_SET_USED(rxq);
+
rte_memcpy(ev, ev_temp, sizeof(struct rte_event));
rte_free(ev_temp);
@@ -202,6 +206,7 @@ static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp,
static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp,
const struct qbman_fd *fd,
const struct qbman_result *dq,
+ struct dpaa2_queue *rxq,
struct rte_event *ev)
{
struct rte_event *ev_temp =
@@ -209,6 +214,7 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp,
uint8_t dqrr_index = qbman_get_dqrr_idx(dq);
RTE_SET_USED(swp);
+ RTE_SET_USED(rxq);
rte_memcpy(ev, ev_temp, sizeof(struct rte_event));
rte_free(ev_temp);
@@ -265,7 +271,7 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp,
rxq = (struct dpaa2_queue *)qbman_result_DQ_fqd_ctx(dq);
if (rxq) {
- rxq->cb(swp, fd, dq, &ev[num_pkts]);
+ rxq->cb(swp, fd, dq, rxq, &ev[num_pkts]);
} else {
qbman_swp_dqrr_consume(swp, dq);
PMD_DRV_LOG(ERR, "Null Return VQ received\n");