From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0046.outbound.protection.outlook.com [104.47.0.46]) by dpdk.org (Postfix) with ESMTP id 9DB897F50 for ; Mon, 16 Apr 2018 15:45:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9mQ6uz+QtzQPpRiwVclFjKcfOgDcwd57cS2cvioS8dI=; b=eBW5irl9jA+APSukTH/+oEy0Nw2ofBjVSwJytNcq40L9zRDSnHQ3GWV3mprl7Qh5xacadNUtKME9mvUxPU4W6cRm/GpINQL0p+N13vxaztxNbDXQztcx9kJ23LWgQ/xviHOkMTfjH9Ne0mtr9AZV7wLouUIQDN7cyvTDzzUPqCg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by VI1PR0402MB2783.eurprd04.prod.outlook.com (2603:10a6:800:ad::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.11; Mon, 16 Apr 2018 13:45:09 +0000 To: Nipun Gupta Cc: dev@dpdk.org References: <1523114224-9852-1-git-send-email-nipun.gupta@nxp.com> <1523114224-9852-7-git-send-email-nipun.gupta@nxp.com> From: Shreyansh Jain Message-ID: Date: Mon, 16 Apr 2018 19:31:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1523114224-9852-7-git-send-email-nipun.gupta@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0057.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::19) To VI1PR0402MB2783.eurprd04.prod.outlook.com (2603:10a6:800:ad::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB2783; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB2783; 3:eVG8QAw6TjD7fohoIySoLRux2zEsvXt9zYRysNvG1JmGvxYZMjfll69Ag2mdAosfc+NN8jEhKXIsTuOx7LdYX5gIXYk7RS4GP+iueb/NhoRfeza5t0tDjW0CTkY/vZqVYQUZSNKEbdAROMtz3+zMnWzFLURKYUDlTa+DclLyo8C9VUWZEfqORKvdeR+V1m3eT8ciTv2A/sY99GG9rRgFJfxKj7PEOsiQCBUGlvxDORBMoOtVoKRwO+n/zT7WhCgA; 25:48lcA3HBp51kjTOYIvbMmP+1Qwf1LSlx5dKU4cODQWbPB73AwEdwimi7ZiYlJgngQyAPnIJqFvoNA8SPcppQq71cS95c9NDAr8LAzlVxrw3gI55wDeGst9Bs3dfeZjMfp22UokDDFqZbrXYBv6YBN2jo1051qdNmWlYWfILhaGgoIXgmtVfdqY8hUuGyPzmeE7t37B1PEWfKtBcx2onlduXIIOYz3TwR3E/dgdH4ZBDrxG0sL+yP19vcTbEqnEvhgYg4wpPHihR2T/MDjbpFS1qPylcUfYtqNLsrImsgeslPPvHtE9TV/1pQwhuSKtAZa7AFIkEQHbS1RGotF7/hKA==; 31:OdLLyOfJSkXTyXJQQ+7TfGGFaFamfqBBNlijY5fVjDSRC2T+q4H7nUfsnms7EAnYHhewR47PcralhgivDgLb/IuSXf4YMSl1cir4uuJlfUJnILojy3Lt1/c9whBQ/g+77ebAMQStlSN8EmbCuqWszRG/+TcvieSCTxSdVMMCG3HHyXLDkP4FQo/G/Us4t86/L12NiC6YmOh56DVN/rCDfYzHZKOBDv2Z4suvkjipqD8= X-MS-TrafficTypeDiagnostic: VI1PR0402MB2783: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB2783; 20:kQ6Uu2+m4WAlKSQfcxlTM072CL/OMx+L2/eoTY0globQ4s0wHh0L8ARQ3vTDujL/3z9+2dylGKXRfXcAjHRAOAFNTLyNPvGS1Ec8l52ws0z/TMTfXSHcVw9ZeFLuP0r6Z+NVEE0AwFnnObGwcyp/l+dE8GbIVKjI7hmNoxGcuA0oYgqsT0lD+fxkbvBwgHqD57DE9gMurSQPvJFxHm4ZnaS2Qlzmf+q6XAeKFjNjpZu+4BqZklEJgNIdbAO7kgXfJvqtepZcOSSWPi3fHAYkDxN2PSqhdwFGf+kfjJe12qaUwky4mhY1KMCABST/hDuL4o/h6+X+19GDvBORi83mpPka6NKg6w3wqs2xLARoDYhcNtSzXInAp2EbcAvVlVL7HyLnMtPZJ597mwmIR/w6xLnoTahISGfEVbDEKPp/x+T5ebF9+JOjt+/YR/Iy1J+8Om5qUOklgH1sEieGzBhpNfzgSRmuyrF7xXdFuYgTTp7xWp/OOWQU4ZMJSaG6CI7D; 4:wsFiitGH0YR/RjZNYyuNvaxTpjt1m0YSs8YeMfTQc8J7E1Y8zNHCX0F2o2EHCr+saMNa0Mw8NbCYVpFhsxKYXLI3IRTNOsxTMauD4wQmtq6djh8udjdnD3+lT3/TgS+QtHDdCdHDEIBw8qwmAJFq+U3PmAbUjkyeQytGaYUEDQ+kOxLU1WMhrHxEZDdMaWsSxImIYTHdK+cPuBKiCPtD0lKOp36vsT8tNLeog+cr0z6nU048Q95K4VIa+Q1PBCnVjfZiOnCQQV16jqOv5pVkyPIwkuciEvZS6dVrXi10plmEJkgAU5N+nhRpuhtGMdCoZi5grlDKcG9gS48qiCT+8BSzdDWZR4scAZ3IQJQfHHk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231232)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR0402MB2783; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0402MB2783; X-Forefront-PRVS: 0644578634 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(39380400002)(346002)(366004)(39860400002)(396003)(189003)(199004)(2906002)(47776003)(31686004)(478600001)(67846002)(52116002)(59450400001)(52146003)(106356001)(23676004)(2486003)(105586002)(76176011)(6246003)(229853002)(68736007)(6666003)(6486002)(5660300001)(53936002)(50466002)(6862004)(11346002)(7736002)(16576012)(97736004)(66066001)(476003)(65956001)(25786009)(65806001)(58126008)(64126003)(65826007)(4326008)(305945005)(37006003)(446003)(230700001)(81156014)(6636002)(81166006)(6116002)(8676002)(316002)(31696002)(956004)(2616005)(86362001)(186003)(26005)(16526019)(486006)(55236004)(36756003)(5009440100003)(3846002)(386003)(77096007)(8936002)(44832011)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB2783; H:[10.232.14.39]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0MDJNQjI3ODM7MjM6TTlGb0h2Q2QrcFVyWEk5cWFVYk1ydGlv?= =?utf-8?B?QXdxSU9jWTQwQ2VUZUdudVgrRllIMlY2czZDYkhOblN5YjNNL0IxcERJd2xP?= =?utf-8?B?SmpNVE9sQlN1SkV1UlBWSWVuYXFBNC9ENDdMQ29JMzFSZ1BnWGY1c3VGQ2ho?= =?utf-8?B?dFBjZ3hJR2crQkRxay9kb3VrcnJjaW1IWTFVTWg3S2U5K1NxNU8xSnQrL002?= =?utf-8?B?RHh4Y3Er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kySS38Ye1Fol+mF3DsMbKEV0586gnbqGOLI/HrcjXQGcfcqWoAMG3ZaCnrPl53HSoRJOQ18efKMs374HNig= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB2783; 7:dG5cBTl9of49UVALvw/GeoEZdswS4ACD5rcPR1jA1jZgquPEdJeGi7LpR8+t+QemDAxd7GacUXv/sZJJ2PTNcZ1pNITNjDCSbIvtqVuOYI7SiFzirLlNHDngpk2JbemJMkcwTs7i8uJxw+Lc5duuxHy0Cicc/9IVDzm/6zUhzzM1T7h6wcJ1phQj7/phSAUzZXflXpuP174iGz6ZlNe27HOUMwa/JeIL0AJODTs8FgbdlgqRXV5NB7GcKoVWUDtH X-MS-Office365-Filtering-Correlation-Id: 9ed9bfc0-3205-4473-02d1-08d5a3a04587 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Apr 2018 13:45:09.2020 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ed9bfc0-3205-4473-02d1-08d5a3a04587 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2783 Subject: Re: [dpdk-dev] [PATCH 6/8] raw/dpaa2_qdma: support enq and deq operations 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 Apr 2018 13:45:12 -0000 On Saturday 07 April 2018 08:47 PM, Nipun Gupta wrote: > Signed-off-by: Nipun Gupta > --- > drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 332 +++++++++++++++++++++ > drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 21 ++ > drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 70 +++++ > .../raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map | 4 + > 4 files changed, 427 insertions(+) > > diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > index b5f6bd9..5cd18ec 100644 > --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c > @@ -344,6 +344,338 @@ > return i; > } > > +static void > +dpaa2_qdma_populate_fle(struct qbman_fle *fle, > + uint64_t src, uint64_t dest, > + size_t len, uint32_t flags) > +{ > + struct qdma_sdd *sdd; > + > + DPAA2_QDMA_FUNC_TRACE(); > + > + sdd = (struct qdma_sdd *)((uint8_t *)(fle) + > + (DPAA2_QDMA_MAX_FLE * sizeof(struct qbman_fle))); > + > + /* first frame list to source descriptor */ > + DPAA2_SET_FLE_ADDR(fle, DPAA2_VADDR_TO_IOVA(sdd)); > + DPAA2_SET_FLE_LEN(fle, (2 * (sizeof(struct qdma_sdd)))); > + > + /* source and destination descriptor */ > + DPAA2_SET_SDD_RD_COHERENT(sdd); /* source descriptor CMD */ > + sdd++; > + DPAA2_SET_SDD_WR_COHERENT(sdd); /* dest descriptor CMD */ > + > + fle++; > + /* source frame list to source buffer */ > + if (flags & RTE_QDMA_JOB_SRC_PHY) { > + DPAA2_SET_FLE_ADDR(fle, src); > + DPAA2_SET_FLE_BMT(fle); > + } else { > + DPAA2_SET_FLE_ADDR(fle, DPAA2_VADDR_TO_IOVA(src)); > + } > + DPAA2_SET_FLE_LEN(fle, len); > + > + fle++; > + /* destination frame list to destination buffer */ > + if (flags & RTE_QDMA_JOB_DEST_PHY) { > + DPAA2_SET_FLE_BMT(fle); > + DPAA2_SET_FLE_ADDR(fle, dest); > + } else { > + DPAA2_SET_FLE_ADDR(fle, DPAA2_VADDR_TO_IOVA(dest)); > + } > + DPAA2_SET_FLE_LEN(fle, len); > + > + /* Final bit: 1, for last frame list */ > + DPAA2_SET_FLE_FIN(fle); > +} > + > +static int > +dpdmai_dev_enqueue(struct dpaa2_dpdmai_dev *dpdmai_dev, > + uint16_t txq_id, > + uint16_t vq_id, > + struct rte_qdma_job *job) > +{ > + struct qdma_io_meta *io_meta; > + struct qbman_fd fd = {}; > + struct dpaa2_queue *txq; > + struct qbman_fle *fle; > + struct qbman_eq_desc eqdesc; > + struct qbman_swp *swp; > + int ret; > + > + DPAA2_QDMA_FUNC_TRACE(); > + > + if (unlikely(!DPAA2_PER_LCORE_DPIO)) { > + ret = dpaa2_affine_qbman_swp(); > + if (ret) { > + DPAA2_QDMA_ERR("Failure in affining portal\n"); > + return 0; > + } > + } > + swp = DPAA2_PER_LCORE_PORTAL; > + > + txq = &(dpdmai_dev->tx_queue[txq_id]); > + > + /* Prepare enqueue descriptor */ > + qbman_eq_desc_clear(&eqdesc); > + qbman_eq_desc_set_fq(&eqdesc, txq->fqid); > + qbman_eq_desc_set_no_orp(&eqdesc, 0); > + qbman_eq_desc_set_response(&eqdesc, 0, 0); > + > + /* > + * Get an FLE/SDD from FLE pool. > + * Note: IO metadata is before the FLE and SDD memory. > + */ > + ret = rte_mempool_get(qdma_dev.fle_pool, (void **)(&io_meta)); > + if (ret) { > + DPAA2_QDMA_ERR("Memory alloc failed for FLE\n"); > + return ret; > + } > + > + /* Set the metadata */ > + io_meta->cnxt = (size_t)job; > + io_meta->id = vq_id; > + > + fle = (struct qbman_fle *)(io_meta + 1); > + > + /* populate Frame descriptor */ > + DPAA2_SET_FD_ADDR(&fd, DPAA2_VADDR_TO_IOVA(fle)); > + DPAA2_SET_FD_COMPOUND_FMT(&fd); > + DPAA2_SET_FD_FRC(&fd, QDMA_SER_CTX); > + > + /* Populate FLE */ > + memset(fle, 0, QDMA_FLE_POOL_SIZE); > + dpaa2_qdma_populate_fle(fle, job->src, job->dest, job->len, job->flags); > + > + /* Enqueue the packet to the QBMAN */ > + do { > + ret = qbman_swp_enqueue_multiple(swp, &eqdesc, &fd, NULL, 1); > + if (ret < 0 && ret != -EBUSY) > + DPAA2_QDMA_ERR("Transmit failure with err: %d\n", ret); Similar comment to one of the other patch - your macro definition has '\n' already in it. So, double new lines. > + } while (ret == -EBUSY); > + > + DPAA2_QDMA_DEBUG("Successfully transmitted a packet\n"); Macros like the above are compiled into the code unlike the DP_ variants. If this is I/O path and such conditionals impact performance, maybe DP_ variant would be more efficient. > + > + return ret; > +} > + > +int > +rte_qdma_vq_enqueue_multi(uint16_t vq_id, > + struct rte_qdma_job **job, > + uint16_t nb_jobs) > +{ > + int i, ret; > + > + DPAA2_QDMA_FUNC_TRACE(); > + > + for (i = 0; i < nb_jobs; i++) { > + ret = rte_qdma_vq_enqueue(vq_id, job[i]); > + if (ret < 0) > + break; > + } > + > + return i; > +} > + > +int > +rte_qdma_vq_enqueue(uint16_t vq_id, > + struct rte_qdma_job *job) > +{ > + struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; > + struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; > + struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; > + int ret; > + > + DPAA2_QDMA_FUNC_TRACE(); > + > + /* Return error in case of wrong lcore_id */ > + if (rte_lcore_id() != qdma_vq->lcore_id) { > + DPAA2_QDMA_WARN("QDMA enqueue for vqid %d on wrong core", /^^^^^^^^^^^^^^^ / Should this be DPAA2_QDMA_ERR? > + vq_id); > + return -EINVAL; > + } > + > + ret = dpdmai_dev_enqueue(dpdmai_dev, qdma_pq->queue_id, vq_id, job); > + if (ret < 0) { > + DPAA2_QDMA_ERR("DPDMAI device enqueue failed: %d\n", ret); > + return ret; > + } > + > + qdma_vq->num_enqueues++; > + > + return 1; > +} > + [...] > + > +struct rte_qdma_job * > +rte_qdma_vq_dequeue(uint16_t vq_id) > +{ > + struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; > + struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; > + struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; > + struct rte_qdma_job *job = NULL; > + struct qdma_virt_queue *temp_qdma_vq; > + int dequeue_budget = QDMA_DEQUEUE_BUDGET; > + int ring_count, ret, i; > + uint16_t temp_vq_id; > + > + DPAA2_QDMA_FUNC_TRACE(); > + > + /* Return error in case of wrong lcore_id */ > + if (rte_lcore_id() != (unsigned int)(qdma_vq->lcore_id)) { > + DPAA2_QDMA_WARN("QDMA dequeue for vqid %d on wrong core", > + vq_id); > + return NULL; > + } > + > + /* Only dequeue when there are pending jobs on VQ */ > + if (qdma_vq->num_enqueues == qdma_vq->num_dequeues) > + return NULL; > + > + if (qdma_vq->exclusive_hw_queue) { > + /* In case of exclusine queue directly fetch from HW queue */ for above comment s/exclusine/exclusive/ [...] - Shreyansh