From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0076.outbound.protection.outlook.com [104.47.34.76]) by dpdk.org (Postfix) with ESMTP id 4FB591B014 for ; Fri, 15 Dec 2017 13:59:42 +0100 (CET) Received: from CY4PR03CA0086.namprd03.prod.outlook.com (10.171.242.155) by MWHPR03MB2703.namprd03.prod.outlook.com (10.168.207.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 15 Dec 2017 12:59:40 +0000 Received: from BL2FFO11FD020.protection.gbl (2a01:111:f400:7c09::154) by CY4PR03CA0086.outlook.office365.com (2603:10b6:910:4d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 15 Dec 2017 12:59:40 +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 BL2FFO11FD020.mail.protection.outlook.com (10.173.161.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 15 Dec 2017 12:59:31 +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 vBFCxZpL020705; Fri, 15 Dec 2017 05:59:38 -0700 From: Sunil Kumar Kori To: CC: , Date: Fri, 15 Dec 2017 18:29:28 +0530 Message-ID: <20171215125933.14302-2-sunil.kori@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171215125933.14302-1-sunil.kori@nxp.com> References: <20171215125933.14302-1-sunil.kori@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131578163718113327; (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)(7966004)(39380400002)(346002)(39860400002)(396003)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(97736004)(50466002)(6666003)(6916009)(2950100002)(8936002)(48376002)(575784001)(77096006)(5660300001)(86362001)(8656006)(81166006)(81156014)(8676002)(68736007)(356003)(76176011)(51416003)(53936002)(4326008)(104016004)(59450400001)(36756003)(47776003)(1076002)(50226002)(2351001)(54906003)(498600001)(85426001)(316002)(105606002)(106466001)(16586007)(2906002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2703; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD020; 1:1ltaA78ll+oGJYWpSc2+66UBwjHIRDmYxYn1i5cMBEDW/jOwwVSeT2icZ8CEQd3yiLrt52clC0k3Wid2/Xk7mUJZlLQW5AUJbP/f6GYT6zAjqxJVcW62hw8OSEFvfA8R MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 643c2a39-e71b-4e26-c82f-08d543bbaf14 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:MWHPR03MB2703; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 3:V9oixxv3aX2brIibSxzVd8LBh+whlL5YNPGHcTi3bTnVFuDk0/3GBhItuYMk5Y9Wf8EX1rXJBCwadGdpdhR6RPOqUXoBShMIUoYDYMoOz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HmBO6YHANOu0yGmJrojPX/mLYbIEPpoocF3T5DQRMsmJG09/sOWkxwg3q6VufdXDHMwH6Wp52pLYidJSjxiGnLQuv+Bh7qbxs2kfM16jwbYQ5tdgfoV8oQLgS/qYudM1Nw+L+rxLnYXoPx1XfgyssBL1w3rt55tPB8psPGhZwhNSRVslLj3LjxRMgfi14elsNNpIVODBO2gxEsfDihRJ9IyuN4nSTFkyxoOPxB+tkoCRUOua 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)(5005006)(8121501046)(3231023)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123565025)(20161123561025)(20161123556025)(20161123559100)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011); SRVR:MWHPR03MB2703; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2703; X-Forefront-PRVS: 05220145DE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2703; 23:RgpUYCaqTgrBbB+iAXr4F7b3kxttOrlK3TkHwQpof?= =?us-ascii?Q?W5YAMtRSEaiB9UwwP9KlCUfVwvs347qBl1fgipabQEYoCQqJVdAWjhhZZSmW?= =?us-ascii?Q?98OosvKNVhKCcXhn7ZRm8t4Wc9a094r56s0AVhxxSODUzvydk+A/a00A5PPA?= =?us-ascii?Q?iXbviOx8/0lnTveyFKlC39upOG3wse0uPLxBPyyFUiODlV2p7ugQ6KzDJ/e8?= =?us-ascii?Q?uUgzIsACQdylg1f/KY6mCApV9oUaTlCXR8BQ0DtrLjgVYSe3DmU+vRVAk2Z7?= =?us-ascii?Q?onQ/stDPRXkXy1WO/SjElbojr/ezRG0hjIYiR2wn62/9U5BdZ4dPkxzIuMgz?= =?us-ascii?Q?bEoQWMYFdBtfXBLVXmwVwYa9kkPHeZh5w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KHQLjOw5+ssR3e0p8krqBAKNOX6RKXc2HVJ6AwIGvNOMrHZDXI68PmJyT9jrIZRO2h+6GM23+By7/5VyyFzU7JTLrF8BNgP3N3RZK/G3RRVMw6eJZI78CXX4VvkXEmga2IxRbiNF3Yp/234/MUdtASPHk1dMibAK3HYcMZWW1V/vuG3lW43JfEHjpOjRdlgmz8kc92D8Knm0tNDBSMdDfm4KDq90JR6BA/mkQTZue72Q7rWcAq9t9GgRqjiWHAONEmjZQUl882gFag4TdRbW43GhsJKk2ob67fpvC8aIcHkgmGB7B1iIjKPU3FTIZKg=; 5:Y0FrP/RkAvsFBTgwkwviZmdjwgU9bfWSz/Ce1Jh2fv8+RFsRzIBvJLJ1zgivWD/BkQ+9z9vQxuI9f6230HtSwycyCb00KjOKCvUTYwRE5q42pq/ntITv/P5D7DuFYrh0WRhuQOqnajsaxhBOro0/sC7dqRSKymbB1NBCDq5EtlE=; 24:BFkwxsxKVAA0ToDayPEpP7xP8si4taWdg6rYAJGWFkF/CwkMByQW1BnvO+RJamaz7XNKvjtHVUyPGuHfZtm6hYhvd9e5pcCHAqnK606LGIo=; 7:NQW+tQz7EsntCmcj+8zcgizBRLBjwiBF3QBWwLM+F9Krv4BFV6jjeY7LdxuXWGaJsj1gsE/rr9c9JSGNYG7SoP86Sui4XVH/06n/bUU/+L58jWDKIzsNQeWRyaeiS90n2/K56x93QY+hlhmSGc0NbkGRlSUd0hY2kEAIvD+a0r+m+8EpCb1PGQ2Su/q44Z4o9mGuhV92AHS8glU6Qcl2nBkd9bJz4/Kjt+Ij1O9AIor3DdiJXnqPHCpe3iF4zcck SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 12:59:31.6553 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 643c2a39-e71b-4e26-c82f-08d543bbaf14 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: MWHPR03MB2703 Subject: [dpdk-dev] [PATCH 1/6] bus/dpaa: added 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, 15 Dec 2017 12:59:43 -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 | 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__ + 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 __BYTE_ORDER__ == __ORDER_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 +1331,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 +2192,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 +2201,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 +2225,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