From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0045.outbound.protection.outlook.com [104.47.40.45]) by dpdk.org (Postfix) with ESMTP id 188D57CC4 for ; Mon, 23 Oct 2017 08:21:54 +0200 (CEST) Received: from DM5PR03CA0033.namprd03.prod.outlook.com (10.174.189.150) by CY1PR03MB2361.namprd03.prod.outlook.com (10.166.207.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 23 Oct 2017 06:21:53 +0000 Received: from BN1AFFO11OLC001.protection.gbl (2a01:111:f400:7c10::106) 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) id 15.20.156.4 via Frontend Transport; Mon, 23 Oct 2017 06:21:53 +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 BN1AFFO11OLC001.mail.protection.outlook.com (10.58.53.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.156.4 via Frontend Transport; Mon, 23 Oct 2017 06:21:53 +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 v9N6LntU000944; Sun, 22 Oct 2017 23:21:50 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Mon, 23 Oct 2017 18:07:02 +0530 Message-ID: <1508762226-18938-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: 131532133131992273; (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)(376002)(39860400002)(39380400002)(346002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(86362001)(54906003)(8656005)(104016004)(68736007)(498600001)(966005)(8656005)(81156014)(316002)(47776003)(81166006)(8936002)(85426001)(16586007)(305945005)(6666003)(50986999)(76176999)(2906002)(53376002)(2351001)(33646002)(97736004)(356003)(53936002)(2950100002)(6916009)(8676002)(36756003)(5003940100001)(48376002)(106466001)(189998001)(105606002)(4326008)(5660300001)(50466002)(77096006)(6306002)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2361; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC001; 1:pB1jm/3GVlhCAyMMdzX/SKxB2si6EYt/3CvwBqrODpUVzlYVennD1Aj+51SBwX3vmQXXaA7PVlcNB+Jn4cALFQ7Qj8vBFvZYIVsP6Iw2PN9MGakW5LnfqzRTw0KLqMgY MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d46200b-8f34-40be-5b74-08d519de5a56 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:CY1PR03MB2361; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 3:5QUaTAsj3IzSYaaN5vhntHU+uq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d+7fmof7RPTrWqWb/G79UGND/HooIu3SCdj33o0vICqcANoFKBfWiVWjqnHxbbBWsPxdRgH2omALOAj1EAaFx+xAc92Z3mPXG5w5p2ZPy661jIPfEPI3VJW5V/Ow//l1jEdCVLt0n0O6ocWr41wRmpT/CYQzwDX1i0wir8zOIoIbSr1R6ch7lwevIsne3p99d/jzVjE5zxJzcj1MNAsAv6i2px8W7izPDwpReZEtvsr3z0rWfhpAkdOzw== 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)(10201501046)(3231020)(100000703101)(100105400095)(3002001)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(20161123561025)(20161123563025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2361; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR03MB2361; X-Forefront-PRVS: 046985391D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2361; 23:LN+d7LY5A4aeq2hC2vztWUaJYMPHZ2tPn+KXi1rH0?= =?us-ascii?Q?RRQgJHHKDfT08y1ivcdV3eMbqGjrCRnap4AGr/kiyr9fvwn965APVBReZARK?= =?us-ascii?Q?N0Iw3nJgqyFnk2vWIqQQObpnHZ6CAwStAoPNCnVax2jx2g7/Aod/IAE5rLiW?= =?us-ascii?Q?1kx8lIhGM2cEm3X6+fdh//OfYNnfkPLsH/S2sXlfgyfVYOba3R695G+4NhS9?= =?us-ascii?Q?KY4H+/IM9LbMoVxtLnN3VTsWw/p+LKJa2UP0u1Z+p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-CrossTenant-OriginalArrivalTime: 23 Oct 2017 06:21:53.0276 (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: CY1PR03MB2361 Subject: [dpdk-dev] [PATCH v5 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: Mon, 23 Oct 2017 06:21:55 -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