From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0077.outbound.protection.outlook.com [104.47.34.77]) by dpdk.org (Postfix) with ESMTP id 5DBD912001 for ; Tue, 16 Jan 2018 12:43:10 +0100 (CET) Received: from CY4PR03CA0100.namprd03.prod.outlook.com (10.171.242.169) by CY1PR03MB2362.namprd03.prod.outlook.com (10.166.207.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 11:43:08 +0000 Received: from BL2FFO11FD030.protection.gbl (2a01:111:f400:7c09::197) by CY4PR03CA0100.outlook.office365.com (2603:10b6:910:4d::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Tue, 16 Jan 2018 11:43:08 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD030.mail.protection.outlook.com (10.173.161.40) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Tue, 16 Jan 2018 11:43:08 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0GBgtjM014705; Tue, 16 Jan 2018 04:43:06 -0700 From: Nipun Gupta To: CC: , , Date: Tue, 16 Jan 2018 23:27:55 +0530 Message-ID: <1516125485-28919-3-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516125485-28919-1-git-send-email-nipun.gupta@nxp.com> References: <20171215130828.14218-1-sunil.kori@nxp.com> <1516125485-28919-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131605765884020726; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39860400002)(39380400002)(376002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(51416003)(2351001)(105606002)(8676002)(47776003)(50226002)(6916009)(316002)(8656006)(8936002)(26005)(81156014)(16586007)(81166006)(76176011)(498600001)(356003)(106466001)(296002)(68736007)(305945005)(6666003)(53936002)(2906002)(104016004)(36756003)(48376002)(50466002)(2950100002)(77096006)(97736004)(59450400001)(54906003)(85426001)(4326008)(5660300001)(86362001)(575784001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2362; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD030; 1:FIvxTUpWMVZozLYQ/osUN4U9cHH1YmLcORkTveyeA2ezGriwAT2axhzv9j64k8s3ISoyjeFoUR1wtGXSYHJC3LjUF4E9FQPMk/d549MBiWQJvd02VXr6oLK0t8troJvR MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9bf474a1-a223-4bb3-07f6-08d55cd65060 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 3:CscAZhlQPkB1d1gNs/ZxYBkPWUqFAlwLgchP4FYFkJtmKnIlyqo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QEpkVjsL/yhudOUOih2FQ3eoYqHeHn8GKLf/jTFGrxn/hkK94Kxqt/sLMxEgb2ObH+27GWucvknVeXO0UJM1I2keEAiaEn3es1ltkX/evExiLcJOonJN8NrbJkNbkTtB3WRcjPowbQ59fQ9vicqAQpsZVimBNWcJ9PV7jpgukPcmfJ3jLAOJ/LIpkYQwKfKlJ2KcCe/d8Seah0zycQtz817GHhGMTKv5IrDY3nFZtptajoTz8CFWDSpzk3qKOonR2ZUEQU+zf3TaOfRKJ0ROD2ng/RkhreeOiS6HD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(944501161)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123565025)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703151042153)(20161123559100)(20161123556025)(20161123563025)(201708071742011); SRVR:CY1PR03MB2362; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2362; X-Forefront-PRVS: 0554B1F54F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2362; 23:D/R9tNUt+wZlJXc3HKY/1RdV/Z0YiEHuB/7owlIPs?= =?us-ascii?Q?ZIKR8uArd9nFWqiUP2MOOSYlG1ozH4p3x6h0eMWFCCIzmJ93nNEB5YNb9Y/P?= =?us-ascii?Q?CsZ/nSLzYVVDY0ZIkPqzzj3LdaCgt7coX2jl16t55xwHKn7Ygb0OrGwMZQHC?= =?us-ascii?Q?XEVDtLuKancavwB7w1zKSq2ZP3f5Qs9xmmlJBUNtoL2HPzZQy7dZHdX3QztD?= =?us-ascii?Q?RKQIcMQohK6I5lyeSDYYMaOgdlZ6RHFG4s/2ShFHmqi15PdLBx4OFr1yJdRV?= =?us-ascii?Q?bYBVbxtx0CP0fJrPjA6U4UcVP6WTc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:Uufsfw8polyciaQYI0tHMiLKPC4cDC/crqKgvRPwmAaXujvgw7Lq/nRcPfSklgm0vTx1LkOziw+BOJbAJ9H3UPh4WIzPshyHJk5vfbml5hPCJrqHWHJaj+AUEnQAlPeYcYXxMCKvYAO0BVttjUrWnz/6nctLrgv2sOzBRnPE6J0ELmu1Q/2mv/fgtQmkL2s9kNh+hwtAZ7gZn1UXDMeosJGFkDttmWv0K8szL4Ee0uzB5rDv3G/VQjBzHodUelQX7BbxOhhCAYcY7qUewmGpKEXOETA80fxW8EVZvID3wTYT8KU+gGFKVW9Ey67ujdA5sfhXTYqBqvnkmsTDjnO9kdERV9VGPTdcoKFtEJcZtiI=; 5:iCy3+3vPp3ndaxUXTO5RaQ/hfEumlJN5omb8kxsP0tWEHTX0feL7GIgjSuxtQLjRDWyk8zIVUjXQfp74jAPBFN84OePf7QvEfguLKmFMKt4Gj44GiLMQccH2gc/QfvuHFQaQaon9CwPBKnN3VwjI+RxObEmAPtErgNMupupgQsM=; 24:NXn72XWZe56fXO2yXFx1P8vkUKs0IOtsJYT9TnCvCnowi2KL3w7t7temXshX0x/ZviPpum7jxUGfg5BQXFKTuByWp5BHFbJk9UBQC0/vCZc=; 7:eczox2i2W3rqqQLip61Xj7vzODIuXfNRaRc3TCeDG6R85pJGIcmWIgFbxTTmq5VjlM7IF6wl7ylVhLMgs/MNfqZR4KN3ZNGeQBW9zxLYjCL6ArqwgbcU971U5gmCRqOIfuvbkvAUuO311U/ipSKDX8xvG99hiRyEgtXpK5RPRD/pStIFSbRO7enzMEMOXmfhaWc4BuoEcDMD5AuZ7bL1Unfff9L+0fLbHaurxfQILHY4jZMqm9T8oklcPRiERKVh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 11:43:08.2460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bf474a1-a223-4bb3-07f6-08d55cd65060 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2362 Subject: [dpdk-dev] [PATCH 02/12 v3] bus/dpaa: add event dequeue and consumption support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2018 11:43:11 -0000 From: Sunil Kumar Kori 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 Acked-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman.c | 91 +++++++++++++++++++++++++++++-- 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, 129 insertions(+), 9 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index e171356..609bc76 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -8,6 +8,8 @@ #include "qman.h" #include #include +#include +#include /* Compilation constants */ #define DQRR_MAXFILL 15 @@ -1115,6 +1117,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 RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN + struct qm_dqrr_entry *shadow; +#endif + unsigned int rx_number = 0; + + do { + qm_dqrr_pvb_update(&p->p); + dq = qm_dqrr_current(&p->p); + if (!dq) + break; +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN + /* + * If running on an LE system the fields of the + * dequeue entry must be swapper. Because the + * QMan HW will ignore writes the DQRR entry is + * copied and the index stored within the copy + */ + shadow = &p->shadow_dqrr[DQRR_PTR2IDX(dq)]; + *shadow = *dq; + dq = shadow; + shadow->fqid = be32_to_cpu(shadow->fqid); + shadow->contextB = be32_to_cpu(shadow->contextB); + shadow->seqnum = be16_to_cpu(shadow->seqnum); + hw_fd_to_cpu(&shadow->fd); +#endif + + /* SDQCR: context_b points to the FQ */ +#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP + fq = get_fq_table_entry(dq->contextB); +#else + fq = (void *)(uintptr_t)dq->contextB; +#endif + /* Now let the callback do its stuff */ + res = fq->cb.dqrr_dpdk_cb(&ev[rx_number], p, fq, + dq, &bufs[rx_number]); + rx_number++; + /* Interpret 'dq' from a driver perspective. */ + /* + * Parking isn't possible unless HELDACTIVE was set. NB, + * FORCEELIGIBLE implies HELDACTIVE, so we only need to + * check for HELDACTIVE to cover both. + */ + DPAA_ASSERT((dq->stat & QM_DQRR_STAT_FQ_HELDACTIVE) || + (res != qman_cb_dqrr_park)); + if (res != qman_cb_dqrr_defer) + qm_dqrr_cdc_consume_1ptr(&p->p, dq, + res == qman_cb_dqrr_park); + /* Move forward */ + qm_dqrr_next(&p->p); + /* + * Entry processed and consumed, increment our counter. The + * callback can request that we exit after consuming the + * entry, and we also exit if we reach our processing limit, + * so loop back only if neither of these conditions is met. + */ + } while (++limit < poll_limit); + + return limit; +} + struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq) { struct qman_portal *p = get_affine_portal(); @@ -1233,13 +1303,20 @@ u32 qman_static_dequeue_get(struct qman_portal *qp) return p->sdqcr; } -void qman_dca(struct qm_dqrr_entry *dq, int park_request) +void qman_dca(const struct qm_dqrr_entry *dq, int park_request) { struct qman_portal *p = get_affine_portal(); qm_dqrr_cdc_consume_1ptr(&p->p, dq, park_request); } +void qman_dca_index(u8 index, int park_request) +{ + struct qman_portal *p = get_affine_portal(); + + qm_dqrr_cdc_consume_1(&p->p, index, park_request); +} + /* Frame queue API */ static const char *mcr_result_str(u8 result) { @@ -2088,8 +2165,8 @@ int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags) } int qman_enqueue_multi(struct qman_fq *fq, - const struct qm_fd *fd, - int frames_to_send) + const struct qm_fd *fd, u32 *flags, + int frames_to_send) { struct qman_portal *p = get_affine_portal(); struct qm_portal *portal = &p->p; @@ -2097,7 +2174,7 @@ int qman_enqueue_multi(struct qman_fq *fq, register struct qm_eqcr *eqcr = &portal->eqcr; struct qm_eqcr_entry *eq = eqcr->cursor, *prev_eq; - u8 i, diff, old_ci, sent = 0; + u8 i = 0, diff, old_ci, sent = 0; /* Update the available entries if no entry is free */ if (!eqcr->available) { @@ -2121,7 +2198,11 @@ int qman_enqueue_multi(struct qman_fq *fq, eq->fd.addr = cpu_to_be40(fd->addr); eq->fd.status = cpu_to_be32(fd->status); eq->fd.opaque = cpu_to_be32(fd->opaque); - + if (flags[i] & QMAN_ENQUEUE_FLAG_DCA) { + eq->dca = QM_EQCR_DCA_ENABLE | + ((flags[i] >> 8) & QM_EQCR_DCA_IDXMASK); + } + i++; eq = (void *)((unsigned long)(eq + 1) & (~(unsigned long)(QM_EQCR_SIZE << 6))); eqcr->available--; diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 329a125..78d60be 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -54,6 +54,7 @@ unsigned int dpaa_svr_family; RTE_DEFINE_PER_LCORE(bool, _dpaa_io); +RTE_DEFINE_PER_LCORE(struct dpaa_portal_dqrr, held_bufs); static inline void dpaa_add_to_device_list(struct rte_dpaa_device *dev) diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index 927efb1..99e46e1 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -12,6 +12,7 @@ #endif #include +#include /* FQ lookups (turn this on for 64bit user-space) */ #if (__WORDSIZE == 64) @@ -1208,6 +1209,7 @@ struct qman_fq { /* DPDK Interface */ void *dpaa_intf; + struct rte_event ev; /* affined portal in case of static queue */ struct qman_portal *qp; @@ -1298,6 +1300,9 @@ struct qman_cgr { */ int qman_get_portal_index(void); +u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, + void **bufs); + /** * qman_affine_channel - return the channel ID of an portal * @cpu: the cpu whose affine portal is the subject of the query @@ -1431,7 +1436,21 @@ void qman_dqrr_consume(struct qman_fq *fq, * function must be called from the same CPU as that which processed the DQRR * entry in the first place. */ -void qman_dca(struct qm_dqrr_entry *dq, int park_request); +void qman_dca(const struct qm_dqrr_entry *dq, int park_request); + +/** + * qman_dca_index - Perform a Discrete Consumption Acknowledgment + * @index: the DQRR index to be consumed + * @park_request: indicates whether the held-active @fq should be parked + * + * Only allowed in DCA-mode portals, for DQRR entries whose handler callback had + * previously returned 'qman_cb_dqrr_defer'. NB, as with the other APIs, this + * does not take a 'portal' argument but implies the core affine portal from the + * cpu that is currently executing the function. For reasons of locking, this + * function must be called from the same CPU as that which processed the DQRR + * entry in the first place. + */ +void qman_dca_index(u8 index, int park_request); /** * qman_eqcr_is_empty - Determine if portal's EQCR is empty @@ -1699,9 +1718,8 @@ void qman_dqrr_consume(struct qman_fq *fq, */ int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags); -int qman_enqueue_multi(struct qman_fq *fq, - const struct qm_fd *fd, - int frames_to_send); +int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags, + int frames_to_send); /** * qman_enqueue_multi_fq - Enqueue multiple frames to their respective frame diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index 64068de..f5c291f 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -69,17 +69,22 @@ DPDK_18.02 { global: dpaa_svr_family; + per_lcore_held_bufs; + qm_channel_pool1; qman_alloc_cgrid_range; qman_alloc_pool_range; qman_create_cgr; + qman_dca_index; qman_delete_cgr; qman_enqueue_multi_fq; qman_modify_cgr; qman_oos_fq; + qman_portal_dequeue; qman_portal_poll_rx; qman_query_fq_frm_cnt; qman_release_cgrid_range; qman_retire_fq; + qman_static_dequeue_add; rte_dpaa_portal_fq_close; rte_dpaa_portal_fq_init; diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index d9ade83..6fa0c3d 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -155,6 +155,20 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr) } \ RTE_PMD_EXPORT_NAME(nm, __COUNTER__) +/* Create storage for dqrr entries per lcore */ +#define DPAA_PORTAL_DEQUEUE_DEPTH 16 +struct dpaa_portal_dqrr { + void *mbuf[DPAA_PORTAL_DEQUEUE_DEPTH]; + uint64_t dqrr_held; + uint8_t dqrr_size; +}; + +RTE_DECLARE_PER_LCORE(struct dpaa_portal_dqrr, held_bufs); + +#define DPAA_PER_LCORE_DQRR_SIZE RTE_PER_LCORE(held_bufs).dqrr_size +#define DPAA_PER_LCORE_DQRR_HELD RTE_PER_LCORE(held_bufs).dqrr_held +#define DPAA_PER_LCORE_DQRR_MBUF(i) RTE_PER_LCORE(held_bufs).mbuf[i] + #ifdef __cplusplus } #endif diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 0413932..3e3719d 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -774,6 +774,7 @@ static struct rte_mbuf *dpaa_get_dmable_mbuf(struct rte_mbuf *mbuf, loop = 0; while (loop < frames_to_send) { loop += qman_enqueue_multi(q, &fd_arr[loop], + NULL, frames_to_send - loop); } nb_bufs -= frames_to_send; -- 1.9.1