From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0050.outbound.protection.outlook.com [104.47.34.50]) by dpdk.org (Postfix) with ESMTP id 456D81B248 for ; Thu, 12 Oct 2017 13:03:36 +0200 (CEST) Received: from BN3PR03CA0080.namprd03.prod.outlook.com (10.167.1.168) by DM5PR03MB2699.namprd03.prod.outlook.com (10.168.197.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 12 Oct 2017 11:03:34 +0000 Received: from BN1AFFO11FD027.protection.gbl (2a01:111:f400:7c10::174) by BN3PR03CA0080.outlook.office365.com (2a01:111:e400:7a4d::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Thu, 12 Oct 2017 11:03:34 +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 BN1AFFO11FD027.mail.protection.outlook.com (10.58.52.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 11:03:34 +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 v9CB3Ukh001793; Thu, 12 Oct 2017 04:03:31 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Thu, 12 Oct 2017 22:48:46 +0530 Message-ID: <1507828729-18194-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: 131522798142144577; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(6666003)(50986999)(189998001)(106466001)(76176999)(36756003)(316002)(68736007)(16586007)(50466002)(305945005)(498600001)(48376002)(105606002)(104016004)(356003)(2351001)(2950100002)(6916009)(5003940100001)(53936002)(47776003)(85426001)(2906002)(5660300001)(97736004)(77096006)(86362001)(54906003)(50226002)(8936002)(8656003)(4326008)(33646002)(81156014)(81166006)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2699; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD027; 1:LLO0R/ya6wwBhPwEY44swN5FZnAwkGT8dCgfbvK3301GYzlVawH1kRUCbx7txS+Pkrn+3c5+/M8Bjb6H5XS3QMHuNGaI3bmK32pPXBtOzmW12mMqgUpJW/z8XpdzeNON MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 232bed52-0069-43cc-5ee0-08d51160e195 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2699; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 3:03ln/D6RYSE1IBEJqlMLf3asSdlTSCaDE6LmpFt605MQjc6StOZlWjTiA46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wWHE/9uOMkK4UAzP09WTO22wuubJq3rd3rja7DN4M9g8cjLLGPREusD80/J0mjxcUgb2DmZC1b+MoW4sXYfjKbpNDl5JBo+ymDafzLZzoa/WCjrZj9pkQulYYsdrXt/JYEgtlcg3N9Pl/LHfbvec0ndjXgiL5vNWP0EYWpHAEtR5Pw6B5QuTGh7YBKc2TXcPoQzKdib5GjFNhcmo+zyM/QhLsnGdPpFB5BHR/w== 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)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2699; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2699; X-Forefront-PRVS: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2699; 23:Tt6icABk+avwAK3qn00oeZrjg6/Qjdz7Uj41fkFAk?= =?us-ascii?Q?0DaCkJpZf8lbfLCC9NszDlee4I/Y4SMPPdd/74jJAHeLyGXWXT0xnXzn7akH?= =?us-ascii?Q?n4IDTLaSFgEOiPaO+7cNWn4DXYtYUSr6JV3vuU+Vppp83Atb5/+Jdcz3MTtg?= =?us-ascii?Q?2oCG6Mirt3l1NTPBSjqeXLRhY0wPdKfSFiJ8Nti+nGWCM4zeEoctRSFKR5Wd?= =?us-ascii?Q?9iIUVFYgl4kYbgEx2oOQCU1FGSc8LEVJww5KDMSTa1YMUi+9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+CHC9DKVyzn59lSHB/t9HHoPsGagf2xm9fIZfda7/0xQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 6:zNDmbFgi9m4wPMzWrfjdK7CKOcWJFCvyxWvQYOX28TGWVJHE0iG6hgbzESFs8GIYG9EJPsZPj25B5BX6PET9AwBhOA+enYDwEyZBlYrwajJlbQZUT/XWDQwoqSPaBly2GezRXsZEtFPcnCN0Y2zLBRSfaCLbX77VsN2K//ieocx7usP3vlnCgkZszVll4IQY4IMMLLmPtkENCp0xqJHkgWU6OEuNW6Xh6V1cSPHgFVrJ6AXUkVCNBG88ctBviboywEbLXXFzRUdWLe7mePVq8MNYY6RV8pB/B5BJdenfqpr7y6+SW3sYO0sLuf1OijN3n3rIUDmetDBpwng1L5bsqQ==; 5:/2la1DMkNndemux+os/dQ+yFbi62b7J8zrgMERwUo/9zJqDnQ2ije0QxbL7S8YJnYLcf449D/k+DBJ5LRKS5G6KYmeaC5Oq+40nXWZlcF3xbUSPVShw7dqasZOb+8L8DlgWEPIxfDO04KQTayG34vg==; 24:ge0T6BfBUUAVs+8Csm4VQg8TojO1QsNAT1gQMLfoTScTqX0V94vJkQY/7w2Rpef86t4t0Zx6WMWsDPR9E2UPS2WDzFw4Qh/W21ZOROXDfhI=; 7:GYRZDQi9I8iqdKWzexRmfLDifKn2ujyn5bYRUr/ULMCNBFYjEebvGld2RS06vPYUmhPLF4qiprw8c6B8CGcFo2xPtwfgm7Exf9R5YjcIV8h2cY5PWKYYiWDj+FEFCKfkUqcYs5CqQVmxdKH2P0z11LZ1CcAbIf0PlTYz8U+GkEPqxSJjvqiRLlVAbPoNNlIqnjmGCW68fiLkoYcamwxLl0MSZIgaBHymVdtfQqqnyAk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 11:03:34.0272 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2699 Subject: [dpdk-dev] [PATCH v2 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: Thu, 12 Oct 2017 11:03:36 -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 --- 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