From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0040.outbound.protection.outlook.com [104.47.42.40]) by dpdk.org (Postfix) with ESMTP id A75651B751 for ; Tue, 17 Oct 2017 12:23:23 +0200 (CEST) Received: from BN3PR03CA0064.namprd03.prod.outlook.com (10.167.1.152) by CY4PR03MB2694.namprd03.prod.outlook.com (10.173.43.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 17 Oct 2017 10:23:21 +0000 Received: from BL2FFO11FD033.protection.gbl (2a01:111:f400:7c09::159) by BN3PR03CA0064.outlook.office365.com (2a01:111:e400:7a4d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Tue, 17 Oct 2017 10:23:21 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD033.mail.protection.outlook.com (10.173.161.129) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 17 Oct 2017 10:23:21 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9HANHXd024567; Tue, 17 Oct 2017 03:23:17 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 17 Oct 2017 22:08:30 +0530 Message-ID: <1508258314-11151-1-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131527094018150627; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(376002)(346002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(36756003)(189998001)(6666003)(81156014)(81166006)(8936002)(86362001)(498600001)(2906002)(8676002)(6916009)(77096006)(105606002)(316002)(76176999)(8656003)(966005)(356003)(305945005)(54906003)(2351001)(47776003)(2950100002)(104016004)(50986999)(5003940100001)(48376002)(16586007)(4326008)(53936002)(50466002)(53376002)(33646002)(69596002)(5660300001)(6306002)(97736004)(50226002)(68736007)(106466001)(85426001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2694; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD033; 1:/pan965gjx9fVmid3mU2rIWYhnUPgYirYD8cAnhj54d4Dlnhd0sGvj4oKx2f/IR5X2sQy/2E8M+virmzD4ktNdx340z0leOlRuS6aRHQ0U30EcZDG1lsxXzpb2kWmdkG MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 081295fb-85fb-4d2f-247a-08d5154917ac X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2694; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 3:Bi+8o6T/EACBXoaI+JFpAPRvgBUF/h0oeGpdS/FWIrP53kPH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8ZiEbGty7L5FVWG4wcTXEHbbafN/Lwy3YEfxfZFLcZIRICUxeez3HN6cZRNrZDSH+o6bsEG4D9uA2yWdW/hIoI57gfzdIQMr78f9RoRqAtEj+Qn9oOSLteDKRC0zbPaVskDnnM7XFiHVBJRQRJTIHH8C+sdk/qDh/7HMSGf77tAimSX1MRXQkWvCuo7oDTvjHJYahuL4jpUH9cT6GjXXWrkm3SlW0MK4sKSbiNwsta0aYaQ== X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123565025)(20161123556025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2694; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2694; X-Forefront-PRVS: 04631F8F77 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2694; 23:chVeQsbSxrf6G+0clLL9rewPUiEoe79u0ezq3jRsx?= =?us-ascii?Q?hU3/w7lB0HBncT/DMCarg4iuG16rEwl3nfTasvMaKmI03o7MZDe9iDkbWnEe?= =?us-ascii?Q?B9ZtxYlYSdEo+vDYRlkKSPiMEL04sDWTNwgbzz6hakHCEExbIrgmDpTBxTHC?= =?us-ascii?Q?OCYYVGZ8L8ZwOhYR/Ab5zCXnCnsDkTknwR4hC8qUAl5Lm/zvk6WEpR1gnE7v?= =?us-ascii?Q?qI4Mwx9Vnekdl8MOltZzCJ56s+K4YtOdj+OZ4joj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ata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2017 10:23:21.4562 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2694 Subject: [dpdk-dev] [PATCH v4 1/5] drivers: add queue parameter in event processing callback 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, 17 Oct 2017 10:23:24 -0000 For event dequeues for ethernet queues, a dpaa2_queue structure is required to get the configuration for that ethernet queue. Based on this configuration the rte_event is to be filled at the ingress side. Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- This patch series is based over the following patch: http://dpdk.org/dev/patchwork/patch/30430/ drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++++ drivers/event/dpaa2/dpaa2_eventdev.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 8f39cfb..e14a9a9 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -125,9 +125,12 @@ struct queue_storage_info_t { int toggle; }; +struct dpaa2_queue; + typedef void (dpaa2_queue_cb_dqrr_t)(struct qbman_swp *swp, const struct qbman_fd *fd, const struct qbman_result *dq, + struct dpaa2_queue *rxq, struct rte_event *ev); struct dpaa2_queue { @@ -144,6 +147,7 @@ struct dpaa2_queue { struct queue_storage_info_t *q_storage; struct qbman_result *cscn; }; + struct rte_event ev; dpaa2_queue_cb_dqrr_t *cb; }; diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 81286a8..8a6a3e3 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -189,10 +189,14 @@ static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks) static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp, const struct qbman_fd *fd, const struct qbman_result *dq, + struct dpaa2_queue *rxq, struct rte_event *ev) { struct rte_event *ev_temp = (struct rte_event *)DPAA2_GET_FD_ADDR(fd); + + RTE_SET_USED(rxq); + rte_memcpy(ev, ev_temp, sizeof(struct rte_event)); rte_free(ev_temp); @@ -202,6 +206,7 @@ static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp, static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp, const struct qbman_fd *fd, const struct qbman_result *dq, + struct dpaa2_queue *rxq, struct rte_event *ev) { struct rte_event *ev_temp = @@ -209,6 +214,7 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp, uint8_t dqrr_index = qbman_get_dqrr_idx(dq); RTE_SET_USED(swp); + RTE_SET_USED(rxq); rte_memcpy(ev, ev_temp, sizeof(struct rte_event)); rte_free(ev_temp); @@ -265,7 +271,7 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp, rxq = (struct dpaa2_queue *)qbman_result_DQ_fqd_ctx(dq); if (rxq) { - rxq->cb(swp, fd, dq, &ev[num_pkts]); + rxq->cb(swp, fd, dq, rxq, &ev[num_pkts]); } else { qbman_swp_dqrr_consume(swp, dq); PMD_DRV_LOG(ERR, "Null Return VQ received\n"); -- 1.9.1