From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nipun Gupta Subject: [PATCH 2/6 v2] bus/fslmc: introduce API to consume dqrr using index Date: Sat, 13 Jan 2018 02:52:57 +0530 Message-ID: <1515792181-11836-3-git-send-email-nipun.gupta@nxp.com> References: <1515792181-11836-1-git-send-email-nipun.gupta@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , Nipun Gupta To: Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0055.outbound.protection.outlook.com [104.47.41.55]) by dpdk.org (Postfix) with ESMTP id 634D81B161 for ; Fri, 12 Jan 2018 16:08:05 +0100 (CET) In-Reply-To: <1515792181-11836-1-git-send-email-nipun.gupta@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" A new API qbman_swp_dqrr_idx_consume is defined which takes input as DQRR index to consume corresponding DQRR entry. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 7 +++++++ drivers/bus/fslmc/qbman/qbman_portal.c | 7 +++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + 3 files changed, 15 insertions(+) diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h index 019deae..10f38ca 100644 --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h @@ -389,6 +389,13 @@ void qbman_pull_desc_set_channel(struct qbman_pull_desc *d, uint32_t chid, void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq); /** + * qbman_swp_dqrr_idx_consume() - Given the DQRR index consume the DQRR entry + * @s: the software portal object. + * @dqrr_index: the DQRR index entry to be consumed. + */ +void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index); + +/** * qbman_get_dqrr_idx() - Get dqrr index from the given dqrr * @dqrr: the given dqrr object. * diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index b5c8b50..b02dfa2 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -859,6 +859,13 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, QBMAN_IDX_FROM_DQRR(dq)); } +/* Consume DQRR entries previously returned from qbman_swp_dqrr_next(). */ +void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, + uint8_t dqrr_index) +{ + qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, dqrr_index); +} + /*********************************/ /* Polling user-provided storage */ /*********************************/ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index f59fc67..17e0ee4 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -97,5 +97,6 @@ DPDK_18.02 { dpaa2_virt_mode; qbman_fq_query_state; qbman_fq_state_frame_count; + qbman_swp_dqrr_idx_consume; } DPDK_17.11; -- 1.9.1