From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0070.outbound.protection.outlook.com [104.47.40.70]) by dpdk.org (Postfix) with ESMTP id 1090A1B762 for ; Mon, 16 Oct 2017 17:29:22 +0200 (CEST) Received: from CY4PR03CA0077.namprd03.prod.outlook.com (2603:10b6:910:4d::18) by SN2PR03MB2368.namprd03.prod.outlook.com (2603:10b6:804:e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 16 Oct 2017 15:29:21 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::125) by CY4PR03CA0077.outlook.office365.com (2603:10b6:910:4d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Mon, 16 Oct 2017 15:29: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 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.77.10 via Frontend Transport; Mon, 16 Oct 2017 15:29: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 v9GFTHP7021125; Mon, 16 Oct 2017 08:29:18 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 17 Oct 2017 03:14:32 +0530 Message-ID: <1508190275-32305-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: 131526413612952478; (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)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(104016004)(105606002)(106466001)(966005)(498600001)(8936002)(76176999)(50226002)(50986999)(53376002)(53936002)(4326008)(47776003)(6306002)(189998001)(5003940100001)(6916009)(77096006)(68736007)(2950100002)(6666003)(85426001)(33646002)(2351001)(5660300001)(86362001)(97736004)(8656003)(16586007)(50466002)(54906003)(69596002)(8676002)(2906002)(36756003)(48376002)(81156014)(81166006)(316002)(356003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2368; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD047; 1:PEIi+GQmdYe3uK5szDCYEhJhU2YB4Xvi1EcGiOTvpu1DFR2waukUyaxBPkkVKarENJlO888m5RVxyojc95oe/7HKzQMjALH4/DxUDtnyF1xMQTYROwOJKMzQNbv1zZe0 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a37ef46c-bfcc-429b-ca3e-08d514aaac6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:SN2PR03MB2368; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 3:xhdCvBbZ76/uJMU69U2RW3BwIa6Mfpi/c1lgU10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g+6rYBNJ3Hu54QU70Qk01kVoXSsakMGJarGbghdjESqWu/Me8xVHM8efVKsCxJtzqtX0ACXl1wo23f5aaj+UsS6VA1nTypo1icWcdH/IsJ2kqHhbsyHyIo5dPDUyM76Z4miilDEJiH+fwIHhuoyx8vZ2HsSJew1q+an+c3bxI/pVHKYDmMEvrxyWwnvyFcVMf+oDeVX/ipN3PNsWniiuSZXCHisuEHHcuCg8b+Pt3p9DqwX/j/yAvcEKChtqtNw== 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123561025)(20161123563025)(20161123565025)(20161123556025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2368; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2368; X-Forefront-PRVS: 0462918D61 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2368; 23:NfJUD1WD+tqeJqg+12mHcCYkRQWJl5/yLUTcDCQ8o?= =?us-ascii?Q?w5yd5CInFRalRGOR0BJG3jkDVHZHMnLDLlo3nA8+UDu/4Wx6i0xeZ0ipTEra?= =?us-ascii?Q?HfWTFo9yUAWJD9auaNp2r3FiVYJkWEZ9dLUgE+vTLF1ESKWRl6PDg8MjqMiy?= =?us-ascii?Q?yI8AR8gvHbo/YZVPqNDCS9QIQhYEwG1j3nLM3muFT/RS/GUiBG2QIW7G/Im1?= =?us-ascii?Q?4BmbsYuOFM6cW9jttxrye4CKg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nosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2017 15:29:21.1704 (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: SN2PR03MB2368 Subject: [dpdk-dev] [PATCH v3 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: Mon, 16 Oct 2017 15:29:23 -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