From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0047.outbound.protection.outlook.com [104.47.32.47]) by dpdk.org (Postfix) with ESMTP id 42BEA1B3F7 for ; Fri, 22 Dec 2017 16:17:38 +0100 (CET) Received: from CY4PR03CA0009.namprd03.prod.outlook.com (10.168.162.19) by CY1PR03MB2361.namprd03.prod.outlook.com (10.166.207.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Fri, 22 Dec 2017 15:17:37 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::112) by CY4PR03CA0009.outlook.office365.com (2603:10b6:903:33::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Fri, 22 Dec 2017 15:17:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BY2FFO11FD047.mail.protection.outlook.com (10.1.15.175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Fri, 22 Dec 2017 15:17:21 +0000 Received: from sunil-OptiPlex-790.ap.freescale.net (sunil-OptiPlex-790.ap.freescale.net [10.232.132.53]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBMFHVet024113; Fri, 22 Dec 2017 08:17:34 -0700 From: Sunil Kumar Kori To: CC: , Date: Fri, 22 Dec 2017 20:47:15 +0530 Message-ID: <20171222151725.11273-2-sunil.kori@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171222151725.11273-1-sunil.kori@nxp.com> References: <20171215130828.14218-7-sunil.kori@nxp.com> <20171222151725.11273-1-sunil.kori@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131584294418350221; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(39860400002)(396003)(376002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(575784001)(47776003)(53936002)(77096006)(86362001)(2906002)(68736007)(104016004)(16586007)(2950100002)(6916009)(6666003)(48376002)(8656006)(1076002)(316002)(50466002)(305945005)(8936002)(81166006)(498600001)(85426001)(81156014)(36756003)(8676002)(5660300001)(59450400001)(2351001)(76176011)(54906003)(106466001)(105606002)(51416003)(4326008)(97736004)(356003)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2361; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD047; 1:L4ky3C7Kg+AVfTN7VZEWmk3Joz0I7sMgjl4+5yb/m85QxPFVuD7W9PMwf/nV8DGQdASoZVc7/AEm1rOvUNFlfNtbsIJZArDdb1lLJy/xlMiqJkbV0qE8DGC6MVbd3yM8 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d45d2486-0da9-4d5e-808d-08d5494f194a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2361; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 3:1RKVKbVeFsQr8Ol6NoCMMkp5CGeWGXDmV9kzrywNXEgypQV4ose9l1COup9wSCX0i9lxz+6MIW1d5ypWi21E+WOtyKrrCqlfeTTi21P0UDHgWp8B9GRorXgKpPJUG3w6MVGMo2DqvIVCZfaPNa2xLOWwg5JUaVm5gyy3vrm0fyEwPvq1rP8cS8jlxdrlE5kos/OHJM450I3KxMLUnJImtMwaiR3lso7VtCPbm2zNPPCrJ59wTjS0cza6VM7FZgN1XzT/xzweL0G9de6vQQ35zWgUvAUkSnmwk8i2znFvie83b6yOkzOsAx6etgPs8Wpwwy2IYznX0lB9mmSeKAahyz1pLJ8teV2wRzZcvETWdhg=; 25:2CmOkGCPPULOZi7EQk5x9sspIjGDmLtp4iHj66G65ERgU5UoVDraIdeCx4UjMLju9F3QEL/nimj9iI6PE25IN8SiEF5sRNqwQMUIm4dJjaHd4m1SwQE+F71U/iz7lnM1Wrh22oarbKreAkmTbKZcEou8JsR1Xr2wEc7m6793JgYDp/uZoMXMraU/IHQKvNWR7mCCnHDnxMBCq5yBooKZ11XcB3DDGj/b/L+BQ6j+Qc8ymNqEO654WNFVbNovjjschMZqRTYWvsBGBCQ7wYevsFpZyzHUpwWSqXRF7kcuIHPUSt8D5YxaGipHJvIYdjbWKMuHlV7+801W5q7llXRTbQ== X-MS-TrafficTypeDiagnostic: CY1PR03MB2361: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 31:5VsD7a3xgGpq2YouGvQeAlbgwRaDYXgDa+C+NP5W2UMiNF39/7FR0/otPYipCxCC720xuLxCbCsuVYLBkxA63hlbMvI8i1eaHaWHQhYEmmqur9dl4tFmQfZJrHzG4+Xi/CKbxXpSAYCAdToLe6tSHHVpHMCS37129e7hj1Ka4yyojM8OzK2tpAZb95Nxb2rXHzVYjqyxTLovVGreR2M6wpzmbiV0DIRz8LlecYS8Cbc=; 4:Zo8d9zrkoQ8+YOdthZ2jZvXslfWXLhz4XLXlLOuTaI5FJakSiFy2QCnvp0b7KBo9Sm7kiDp74mC6LfyxvwsL1FYCqfMvJa+Q4eF2crGsiPBYJAXVu/gW1TuzUtzpL58z3ExxcB27wk2C18z9nhDOvR+JC4yWz+rxyj0i4UexhrwMC3a5ELV8wsyW67EZApYLTfUNIZvLvyduwbEDxOOMgrte2n0Rf6n3JBxWMYJ8YibE4AsfYdvBsdPK8yeO3UfLSDQ50+Y1MJSWlqI+3GDFBCl+AQYD03kCRWKTsM30Hyax+RmkuH9doOZTAYUXuHa/Nmc8zyBnB6L68L0H22UYyc2SzRTVH3xf9stEGw74cPVUdMsKT8SWxyepA3/QCSl4 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)(93006095)(93001095)(10201501046)(3002001)(3231023)(944510044)(944921044)(946801044)(946901044)(6055026)(6096035)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123561025)(20161123556025)(20161123563025)(201708071742011); SRVR:CY1PR03MB2361; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2361; X-Forefront-PRVS: 05299D545B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2361; 23:S6YykeYZIKyGsI+9gVeetLErVW0+bd0tfw83m7M5G?= =?us-ascii?Q?xQADVJmaEhfisT2zt3ocqzpll6hIjjU+aLoKWUDJ7C9SN8Slo314Sknk8lBE?= =?us-ascii?Q?w4vHuF2qTdFiCiRDlfBhVnpwT4/jxanXk53N078D5e4dcg3r/4qaF8kdx/r9?= =?us-ascii?Q?wwJVBuEbAnaILacxWCA/Po+xDrsjmW43iRb/9ZJDFMMHlrmpERNkDDvdWm/v?= =?us-ascii?Q?RuRHqsUOXgoNwDbwwcoViC5yV4JmULIcsUXsvpTy1JG7LbgFsQr020OhnS8K?= =?us-ascii?Q?YZc+OoyToHaKFSJre0AiNkkzcI8dpA3wQ76ZHrAsdlb7MSz3I4HZEEb4pG7+?= =?us-ascii?Q?Ec1qaNumPrBTaKXPB0HDB6N146LpEKrY3iOLKBWmMuzORbrfl/Fak1VI/ON3?= =?us-ascii?Q?MapOGEv5AaSYghAg/Gs4FG4mhH5ryHASOxL0E8FY+EZzMQ0C8O2y0BVCn/Z7?= =?us-ascii?Q?QeiriVdtpwhCZyGfjzZO6gsnR/+VKSZFGILDuf83ipEjlZp84OjzQXId/2p3?= =?us-ascii?Q?a/MQUJknELI3NIGQK5z9OF8KMtRGk85t7QN3REf+PabxIe6/gg0YL8/c7ssa?= =?us-ascii?Q?0UB3Dja7HqkuznRcU9z/Iyfd8cBy2RgPcHetjZoiY2WRhhz22KECIGJ3U4u6?= =?us-ascii?Q?pZxjrXrAOUoKB735TrD4PHBF80PDsEhhcFJKPS6aelEL2hRcZn+Q+PKPKc2M?= =?us-ascii?Q?9CHMde24jBvIPxX+HAPvBK3KybmILDwKSvctSrtNlnSnvplReMbP5WS94vFb?= =?us-ascii?Q?oWSX79+Enh1pRAis8jkr1PKs4NfbIUEBwMp7+fNJM6/S1pGPAOies6+bbu7l?= =?us-ascii?Q?5ggoIBmY2qnx/9QQ5xDorPGl9rSnKwNuutgV336DSfGUtQ0ZhdPZpMqYqy79?= =?us-ascii?Q?DQTE5rfBmoZOub3/wUF0OtL0FKq1PRF+7b80z1UGhaph3PLW5ov6oJbXkM0G?= =?us-ascii?Q?vNgDxJEEElIexfDbV++M2Xza+tRsidIVnRIuxvsGMbX0MVJXhYM4xXnDWQCi?= =?us-ascii?Q?Nx/px2fpSSW+civKSJ56iXOIHde5ULNFz26QAXJ/RNJgjV2gz0y/xRabbC3j?= =?us-ascii?Q?L40/mmxf1yGSANWxmCRcrnKCvFN5ZdCBovzes8tHIrMaFZSGKIz9Ls4mjmZD?= =?us-ascii?Q?ooH7qqWmPbsOs1tPW2sCBA6ETjd+MPIOQyRVxIN14s5Vli0KgCv7w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 6:uMkFhs72/AanaWhN5NuDf3Fvjb325smllVIExakxyyL++Cl36GeySiArPFgm7yOF3+C+4vJmQnpObm0M0/vlTyUApa5dlWauEivnW++w7paEiNf/m9RAvROL9poE/k8SDfzwJn/gmRabFtrOjLpaABWZCOkxGExfhJN9ElKxbmqnvfZVbdlJFTc+FD//lZQPd6MUQjsFy+92AT1kujBER0ByxmCPGnHtiLxASklHm/+I0Kq1UAtcAfiFc0y7OciqeNZTKeT7otAkrwVOkRAIE0CsYaki4MuWCWf4DOpgyaSjQQPOf9jWVlQmBiNOL7Z7boIZt8qNaLd1Hc8D/7gSZHlksxrbPi8NUd9wKxapQ7k=; 5:D5jgiERUAxGK1WEaM0dlDJQC5XF3vB8AiPiGqJUjffsGnT7R4/cZqPPWySpuC3UT+UhnGYH+NOYAkySTXPiiryum1KjOGWC7KP+UzWCIqzV0+yvSJHJYr/bBTpYxmZ3hR2vuGZa3Q8o8rtL66uijoEq/Q12UHwW7tVl4lZ7VwKE=; 24:9PUpwB70ZCu0LCvwoOKe4C0AvZYwr5Q54oXDbbXr8nlTibTUptPxhDI/o6n4y5edeqgJWcnaA8P5eB7uHIlPTqxLeK0n5ODnYdtvSTQdOpY=; 7:6fgT44gzvgLY7ezJbVWUouihTWIitDCOJvqwLqRMyuo+3fZVTDsHug2ReSvDDROLyEoQua5GOYrKcWQdHsT71rKLIDEHx19RJ289skF5iex1vx/eLpfxM4VROmxte3mvJGNSjmb5uC5ZR+NP06LOqYQ1Qmhxk86HrXuhnvfRe5oHt+yGuEbEVyh+40JSsZf2YB+7lDoSFGIjDd3C8RIjkSHSTkrE4yCrS+danRSKcJnajaYVyu0RbU/MlFjar0mT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2017 15:17:21.6322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d45d2486-0da9-4d5e-808d-08d5494f194a 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: CY1PR03MB2361 Subject: [dpdk-dev] [PATCH v2 02/12] 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: Fri, 22 Dec 2017 15:17:39 -0000 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 | 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 42d509d..532afac 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -41,6 +41,8 @@ #include "qman.h" #include #include +#include +#include /* Compilation constants */ #define DQRR_MAXFILL 15 @@ -1144,6 +1146,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(); @@ -1262,13 +1332,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) { @@ -2116,8 +2193,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; @@ -2125,7 +2202,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) { @@ -2149,7 +2226,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 8d74643..01b332a 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -80,6 +80,7 @@ pthread_key_t dpaa_portal_key; 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 7ec07ee..145c1c1 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -45,6 +45,7 @@ extern "C" { #endif #include +#include /* FQ lookups (turn this on for 64bit user-space) */ #if (__WORDSIZE == 64) @@ -1239,6 +1240,7 @@ struct qman_fq { /* DPDK Interface */ void *dpaa_intf; + struct rte_event ev; /* affined portal in case of static queue */ struct qman_portal *qp; @@ -1329,6 +1331,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 @@ -1462,7 +1467,21 @@ u32 qman_static_dequeue_get(struct qman_portal *qp); * 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 @@ -1730,9 +1749,8 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr); */ 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); typedef int (*qman_cb_precommit) (void *arg); diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index 460cfbf..afc40bc 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -69,14 +69,19 @@ 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_modify_cgr; + qman_portal_dequeue; qman_portal_poll_rx; qman_query_fq_frm_cnt; qman_release_cgrid_range; + 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 b0f7d48..6aa9e60 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -181,6 +181,20 @@ static void dpaainitfn_ ##nm(void) \ } \ 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 088fbe1..1caecf2 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -800,6 +800,7 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) 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; -- 2.9.3