From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0051.outbound.protection.outlook.com [104.47.32.51]) by dpdk.org (Postfix) with ESMTP id 2C9601B71D for ; Fri, 13 Oct 2017 16:48:21 +0200 (CEST) Received: from BN6PR03CA0024.namprd03.prod.outlook.com (2603:10b6:404:23::34) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 14:48:20 +0000 Received: from BN1AFFO11FD036.protection.gbl (2a01:111:f400:7c10::198) by BN6PR03CA0024.outlook.office365.com (2603:10b6:404:23::34) 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; Fri, 13 Oct 2017 14:48:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BN1AFFO11FD036.mail.protection.outlook.com (10.58.52.240) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Fri, 13 Oct 2017 14:48:19 +0000 Received: from [10.214.249.170] ([10.214.249.170]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9DEmFFI016106; Fri, 13 Oct 2017 07:48:16 -0700 To: Nipun Gupta , References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1507828729-18194-1-git-send-email-nipun.gupta@nxp.com> CC: , From: Hemant Agrawal Message-ID: Date: Fri, 13 Oct 2017 20:18:15 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1507828729-18194-1-git-send-email-nipun.gupta@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131523796996227682; (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)(39860400002)(39380400002)(376002)(346002)(2980300002)(1110001)(1109001)(339900001)(199003)(24454002)(377454003)(189002)(356003)(68736007)(81166006)(81156014)(8676002)(105606002)(31696002)(76176999)(31686004)(86362001)(36756003)(47776003)(65806001)(65956001)(83506001)(106466001)(54356999)(50986999)(2906002)(104016004)(8936002)(305945005)(65826007)(33646002)(85426001)(23746002)(64126003)(5660300001)(50466002)(189998001)(97736004)(53936002)(2950100002)(230700001)(53546010)(4326008)(498600001)(77096006)(8656003)(229853002)(54906003)(110136005)(6246003)(58126008)(69596002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD036; 1:qC7yPCl7LU+5poqoNFdbRgAsUIFmTousMHkpXENvH4S9CIC1xrcUu+RHkrTkzNdNs1/3tIksspvd64M/7SMT/VnSuw6GSeBmusT8CSyilnzdGVunxRPXt+Fqo6MBQx7Q X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c9c59c4-a3f1-4231-2101-08d5124971ed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:SN2PR03MB2366; X-Microsoft-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PwaZtOQk3pNgn+BD8qcPtkeP049M6Ns8M2WyJXHhTGEMkHXzWKkJEjY9J4eZS/Vk6pZW/nPS/gjCBUw7e70w78qzCVCETdwz0GD3WasT+B58lL+axwdg5wGsrAVYX0ey1idSVHzbnOkGufZ8miUJL+YtyAH+M8JPm94pMwCiuUGpAHTusrzI7HWF3hpxTiEzs3Hp6xL/5RGqt+VBcAlr/OkxiGZtumbl0nNPvwd9KnVE5yUTG243/O6Cj11LH08lHIzT8poDPmnOHn+/hfnjhPCi5b1BlBiqVzYcMSh+h689/TDk46P9h/ygGKzxl8X1cYgg== 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)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123561025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 04599F3534 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN2PR03MB2366; 23:dsCkv+V3tb99YPT61U2J5XppiP2PcDoqHJ0Bo?= =?Windows-1252?Q?c6DJNG52eVdVFikdl+y/YxeIzV1qauolT9eYM2dFV3PPVgCfN67rWnja?= =?Windows-1252?Q?SBWYyaUEarvm/hGJ54hi5LUx3bO4lE8SHqnsPpf7+3dqsJzO/UQZu6+o?= =?Windows-1252?Q?MAr5xbgQRbQAl3723tlVgxJpiScnV0KYBLXeAueZkN4i0oqD2u23hbC0?= =?Windows-1252?Q?3ZtA1uvWOHw5EQI8qGSJ4AQdpB3p+gz4hiXBV8dm7186zUHaAyl10oWW?= =?Windows-1252?Q?cbAmr4N/6T2Oe5zmncEiHzsu5GnNNu92x0FMa8V8ZHw3cl6eVyyTAYDg?= =?Windows-1252?Q?Hl5qFrrxlvvMc3Ug4gviMF1wKE/YJPOLUhqqo3Dvtmfypyhh1Xsxax9D?= =?Windows-1252?Q?sAY6QZge3iJt5aqWyPcTlK/ZtVmohElJZlkT/fivqqtUU0/142I4GzR9?= =?Windows-1252?Q?waBUcOquLTDkw2S/ywGFybj3KsWLNlzI5FLiRA9zIk1bG96DjFBLq5vm?= =?Windows-1252?Q?qRvYbGX8eX+ToXS5YU1HY79gYKUYFwW/kwSX5qEnyLuTG+yzJxPrPyCR?= =?Windows-1252?Q?mUuDh9oLHgYJJVKUsU8bntnhO/3tXGNbXZsncuJ4MbAjYIP+Ir8IMxY1?= =?Windows-1252?Q?O/gcKybJxkSelrjfPNv9u1G33/aXsrZsAFOFd1Lp+TDv85p4aBVe1C3d?= =?Windows-1252?Q?Os8hpfHUQBuejmydrkdko/D1ARm6A7qO/Fp8dA30igSD6E1uVa3awID1?= =?Windows-1252?Q?mlprNblssxQdLAa1KaRewGQAJ+xFvAWl/K7dKAe9RImGW4raSj4hxFQ9?= =?Windows-1252?Q?1qrDuwYLbuM6qRYol4g8iYnKSvudZyI7Va4QQX3YZSBV2RkmtLHXVzOk?= =?Windows-1252?Q?5fBWQS6+U1kj5Wu1GG6hoH+5fk5sbVUc/0O92cTvTCD2yuZV+rHbSTtX?= =?Windows-1252?Q?tJdVL5oU1bwcbWJ7kSuCloIlZuUlF9+5q6WoOK+zzBLuuZ5kLGwAmc22?= =?Windows-1252?Q?JNRrgTg61ONy4tTglS39twYxaW+fzaoA8AEMWsvRAteR832LVP4oB4iH?= =?Windows-1252?Q?RxepEEFTu6kySYN/4pd0Jd/8QCowlEQ0Wc6HZJo2+DAN4vjb5FgqSBB6?= =?Windows-1252?Q?EPRccer6yqCwpG4FK4fq0TjilPp2lHCGnGpKV+itlWt3XnnY/dRVgTMC?= =?Windows-1252?Q?hFt+x6cHOWhmEznna6jlBFfgFjS+cgucHZJ+cUjuk3C7CTub/ZNFHDo6?= =?Windows-1252?Q?MtTUjSVlxwI8HoHKdfSJrsnmuIFNj8WNlNq4Lv3QNWW6qT6THUHxL3Gu?= =?Windows-1252?Q?RDW7wvhb1iVoivj3S7deGqIvFrPS3kSX2DGjakkOEczWeM55Y3gC56Rl?= =?Windows-1252?Q?HsMFdwQQao9APxNX4s15mIc3LwMMxMwROZvOsZvY6qSCmJzq95Kxylyi?= =?Windows-1252?Q?LPS3P2R8fF3CBH6EGwJqomlF/Igh1s5Cld21zzrx3/wLZ6Pj4kvM2GgL?= =?Windows-1252?Q?uh0rLqS7wdfFshf/kUQWJqix1K9JZNhpa/yY/U91g/q5E8Jng=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 6:D1YvBMtDh+6Ph53UhUhMTQgkJD2xpDJiSPjrMsYL2JCfp6ymd75GtAhJlarcHhFkwlztLdINgtwhsjaC6Jx3NNV9Ywr2nCYEpTIk+3Oqq+QvOT9s1J4RWbWZ0paGJIQ7S8OFRPeRkfjRZ9/te1BSGycfe9O7GgoSNc6lYdzXp1v70yYQNNKAwbDm9ITgWyR8QFORFMIefekREo11mK30S8nmysxwPF+TCmTW9RqMJxAAHTtD2Gc0DSJ/p3E9X3HWO077Kx9C1rs6tLFzmNtithABCsm/ySgPv3YsAjSRVp+msVEpzGGT6yDpGucVIyAR1gwHeYPauw0vhcB4gzCJjA==; 5:hrXF6wXNF43vH+xoeRapOwBCh8rZfGwUbVW4Rygv71djwaLVKcGkL4W0AHYGBoMIS7c73Nx6Zu1hSc2YQDY1NmdUWKaO1ZX86iK192fcPXJtIzzovxndWzakX99JmROVLZVpPh7xUOBu8geuZzld1A==; 24:1aC9MF9s00S30t2ZppJDpocLOWqTzxji1ZfBqVckIqusogwFTkgAE97A80MHF+X51RmQdYYjK/QLLBuEic7z6hCKVOaSarrczRmQEm8Pnpg=; 7:q/1n22TLjyMcm7GvYF9sYuLvLI6HhFWvSgPXzZlGKtFP5qv08aVvse3ta0kEch6UHz7ytLUbQrVUoV6gQjYSxVQBp6CkEZE82tvTasqOVy2kaZ94VnT+HR/VnM6F9aoZ9ub+oRRT84aIIHchYZgb1IMAImpNSax0vr8Guu3clpXfKsvXJGw3BAfPFdHtzvsIWMdsJj16gTaUqSlfI71XBa7E7Wu8jdC4zytRJE0+rnE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 14:48:19.3887 (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: SN2PR03MB2366 Subject: Re: [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: Fri, 13 Oct 2017 14:48:21 -0000 On 10/12/2017 10:48 PM, Nipun Gupta wrote: > 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"); > Acked-by: Hemant Agrawal