From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 1/6] bus/dpaa: added event dequeue and consumption support Date: Sat, 16 Dec 2017 18:04:01 +0530 Message-ID: <20171216123400.GB17045@jerin> References: <20171215130828.14218-1-sunil.kori@nxp.com> <20171215130828.14218-2-sunil.kori@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, hemant.agrawal@nxp.com To: Sunil Kumar Kori Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0077.outbound.protection.outlook.com [104.47.37.77]) by dpdk.org (Postfix) with ESMTP id 8DBEA237 for ; Sat, 16 Dec 2017 13:34:38 +0100 (CET) Content-Disposition: inline In-Reply-To: <20171215130828.14218-2-sunil.kori@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" -----Original Message----- > Date: Fri, 15 Dec 2017 18:38:23 +0530 > From: Sunil Kumar Kori > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, hemant.agrawal@nxp.com > Subject: [PATCH 1/6] bus/dpaa: added event dequeue and consumption support > X-Mailer: git-send-email 2.9.3 > > To receive events from given event port, corresponding > function needs to be added which receives events > from portal. Also added function to consume received > events based on entry index. > > Signed-off-by: Sunil Kumar Kori > --- > drivers/bus/dpaa/base/qbman/qman.c | 90 +++++++++++++++++++++++++++++-- > drivers/bus/dpaa/dpaa_bus.c | 1 + > drivers/bus/dpaa/include/fsl_qman.h | 26 +++++++-- > drivers/bus/dpaa/rte_bus_dpaa_version.map | 5 ++ > drivers/bus/dpaa/rte_dpaa_bus.h | 14 +++++ > drivers/net/dpaa/dpaa_rxtx.c | 1 + > 6 files changed, 128 insertions(+), 9 deletions(-) > > diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c > index 42d509d..f39e618 100644 > --- a/drivers/bus/dpaa/base/qbman/qman.c > +++ b/drivers/bus/dpaa/base/qbman/qman.c > @@ -41,6 +41,7 @@ > #include "qman.h" > #include > #include > +#include > > /* Compilation constants */ > #define DQRR_MAXFILL 15 > @@ -1144,6 +1145,74 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, > return limit; > } > > +u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, > + void **bufs) > +{ > + const struct qm_dqrr_entry *dq; > + struct qman_fq *fq; > + enum qman_cb_dqrr_result res; > + unsigned int limit = 0; > + struct qman_portal *p = get_affine_portal(); > +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ Use DPDK specific primitive(RTE_BYTE_ORDER) > + struct qm_dqrr_entry *shadow; > +#endif > + unsigned int rx_number = 0; > + > + do {