From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0089.outbound.protection.outlook.com [104.47.37.89]) by dpdk.org (Postfix) with ESMTP id 14BFC1B248 for ; Tue, 10 Oct 2017 13:36:25 +0200 (CEST) Received: from DM5PR03CA0033.namprd03.prod.outlook.com (10.174.189.150) by CY1PR03MB2363.namprd03.prod.outlook.com (10.166.207.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 10 Oct 2017 11:36:24 +0000 Received: from BN1BFFO11FD028.protection.gbl (2a01:111:f400:7c10::1:190) by DM5PR03CA0033.outlook.office365.com (2603:10b6:4:3b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Tue, 10 Oct 2017 11:36:24 +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 BN1BFFO11FD028.mail.protection.outlook.com (10.58.144.91) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 10 Oct 2017 11:36:24 +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 v9ABaJOe014848; Tue, 10 Oct 2017 04:36:20 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 10 Oct 2017 23:21:24 +0530 Message-ID: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521089843852220; (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)(7966004)(336005)(376002)(346002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(104016004)(2906002)(81166006)(85426001)(50226002)(106466001)(2351001)(47776003)(105606002)(305945005)(33646002)(97736004)(36756003)(86362001)(189998001)(5003940100001)(53376002)(50466002)(69596002)(356003)(53936002)(48376002)(4326008)(316002)(16586007)(8656003)(8936002)(966005)(498600001)(77096006)(6916009)(6306002)(54906003)(5660300001)(81156014)(50986999)(68736007)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2363; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD028; 1:vYcTIC5s5YGnIe84OnyHwcdZREVVWEA5Ve7GHn6PzNTAtn70lt6Rc5jkbPAOBQ1oD3fBhCld+PHtvaE0n+DypEj5V+79eK5e0MZL+v6Fi/+KwfvAU8A5FJKPtTH5ekDS MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3863067-c486-4ff8-125b-08d50fd32312 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY1PR03MB2363; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 3:hmLn+KcXUnVjAyi3Fuc5pr377xvwhFznsnS+Oy1WMWb3kKCYQ6UhxKBZsBD/z3H8CbnddloK9sGsLE45rtYEzUAoyvenVfw1fsWX77QXEhizjVA3hNWUwdy4cc6AGC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kWAp7mRvPgfYh0H0htAAo6LY1u9yDREJKDmVcLC8izH4WfPYUuWkyJkRXFivA5nrA0ZyMcEbHqjn+1C8t8VUizEAZSCOMNcaXTMQLrkpCd54+hauKwwGxlfdmzXzkUEeGOMqzq21G004AVDo7FLS4cwInIjLu26vqw== 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)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(20161123561025)(20161123559100)(20161123565025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2363; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR03MB2363; X-Forefront-PRVS: 04569283F9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2363; 23:NrFwPingFrWqPhs0LayIstpdV0SnjaeiDnH+zGOz5?= =?us-ascii?Q?kHtqr+b6EfnvzhoK6BF86HHu7Bd3OEFezYlvhVbt/w7+lfJw+A5MlzoJvVut?= =?us-ascii?Q?Uq6QNdNgv23QMjU9LKh5TUV3ysy1caJl+iSkmEJN7fMGV1b+nDqAZlue4AF2?= =?us-ascii?Q?1vZ8yPWkMXcBxoiHYEL0efDRBndc/K/5A8yXo3o//RgSnGxxbUocZlskGwnF?= =?us-ascii?Q?f8U8XipaJSsIeF87bUmaZ90jOy5+lT4EQL1WB49mhvDo5xC9/cRIhqOUUxQ4?= =?us-ascii?Q?4LypQh+OcYQuGDicrC7qIvmc3QTYfFe6KVeP5+2fT4rkrj/pqtt9s5ui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microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 6:1LaasRlrMmVVCE00dgswGMxUwcfF0tPrhsVNf6rTQ+onK3b9mVg5p6wNZpWsieTFSw/X8jY06zYMVk53rrgKwOFJNRAM2bM06sQr2aQDGpdFbu1etfQrFTP54La38LviG5WLhwG7Z0Z5nXGK6SF/ihRw1i5s0a6IgxbgJrOBcQK5YYMbOUr5rZHVo+colFFTzZB1NIkW53QeYx1DQluBQ2Wmi8NQ1S8+l8oG2lMmuUrncDonT094zk43NDmO75AMNK136r4DGEqT2/6694OTJ23J2p41iNTdXeq66AvW6YYPKaS9TTx7TUKuA+tGq9388xSu8nO7ptBv86vpDucQDg==; 5:oVa3TvuTBu0+iZU+229DLQfGY+xqPxfm7SJRHlamEghV5Oqb6aLKHyM2rEOkqkk58Em3FihpgfXakE2SDsBel8gEDWeY9ftilaQgjs3tJ9UQVVGuc4JpZfIyZX8QrUnJHqJT6gGUsS5xswhsRzp/fw==; 24:s5MDJDRAV33/AyywJ/ugbN9XjDZGZTxb0GWlUyJWHM9fHoI0VlNEfUyUcHNDH16QjBpSTSG8fKo19xHhyWi+0FOZB8zB6hWGoq8k7LyjOQw=; 7:6sYXmXF/WYqkMUjlUPySqo2tk4nOQUtgM2T2wbpo9SLsJM/QtXCZJZIU9MweuzbSPkihvK6sapV9rPWnPBn/Re0cE9mAzi9ozA9+0rK1ozZqAwzgFCHxdXLsI2JYpJ22EVfZtAl8QEWdMdSaqfsrSzEM49DcE4JPsUvG8hsO1aCUBpwLC5RW2sPbLmsnbQmQhYUkpSSputbUXNaUb1TinCNkLgVJXH5NyNG+1KWgOBc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2017 11:36:24.1356 (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: CY1PR03MB2363 Subject: [dpdk-dev] [PATCH 1/4] 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, 10 Oct 2017 11:36:26 -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 --- These patches are based on the below patch series: http://dpdk.org/dev/patchwork/patch/29806/ 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 5d7a828..0d5be29 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -124,9 +124,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 { @@ -143,6 +146,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 cf2d274..6967741 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