From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30057.outbound.protection.outlook.com [40.107.3.57]) by dpdk.org (Postfix) with ESMTP id CB3204F90 for ; Tue, 18 Sep 2018 16:05:07 +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:X-MS-Exchange-SenderADCheck; bh=bztJ1EDnPY1prEr+vFrxKjEXhEYPanTYTkyzZwpmRoo=; b=kjeNXmEtW9cNiMMy+RVmSzalR6rUaC3Q3jVaNy5kR9WKU5BS4iMk0G0D7lBqOiWMaskPexikfo43xZxnGLs4chLovuOMfrX5uGZ6G3ByX5qc1CoHh7aKiFzXm0/8OkRJaSXslKA4OiM3teRn+f6eRaQLkHYTztVDcg1wyYzPoj0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.143.30.134) by VI1PR04MB4893.eurprd04.prod.outlook.com (2603:10a6:803:56::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Tue, 18 Sep 2018 14:05:05 +0000 To: Gagandeep Singh , dev@dpdk.org Cc: Hemant Agrawal References: <20180913060846.29930-1-g.singh@nxp.com> <20180913060846.29930-6-g.singh@nxp.com> From: Akhil Goyal Message-ID: Date: Tue, 18 Sep 2018 19:34:53 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180913060846.29930-6-g.singh@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR01CA0095.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::11) To VI1PR04MB4893.eurprd04.prod.outlook.com (2603:10a6:803:56::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0018e93-89dc-4d02-4a76-08d61d6fbcdd X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB4893; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB4893; 3:mD8/8CW+5B6KMKZ97DbhhLfpBOrCfQTq0yBWTJd0u9viXs1u/TVCh57nhkqjkBkh8Bgp+9jdtqMD1bs8T2xLp1u3P4oVmBBzHMfLVW98GzMZSC4M2NUHpDBZiaQmScscqmjbLwVxsVQM2a4VXuGPy3yXrVf+03EJ4F7aO3xUUEUBjnHIRXJQu/Sh/L11zrchrgwsxX5DbJHnlryJtidzcbRxQQ2wNi0vh5vETiTHAAob09hMyMFAGGLnKK/jL2LK; 25:dmbs9a4UuyOkgseGaue7I8ODW/J4yRgSt3G/enJcUblrIzpr38lw2rRpMqG6CzdtjpmWfZHjGmvKnvTgD2snQL7fXrMvdv15dD/GWOGQ1ztEq+ewJ5bE5aRIjFzJiTOYjpCjngWtGeXqLDuX3+o0nh236a4KT4PEE2gzFuuIa/VDcil0UUj+Kb/yHnoe9W2/JU1j7TZjkKeOLBUWh2Bm6eQsizforkg8dN5WZ38BVNAYHwm2cdMwZLIdt2Ytw/imWV6i/Px/9cOQ1siDRyJlHAQ2AQrrAzBYwz3Ly3FqjIUDJlK3oALb203XAHjlrTf4snSdErfmDMFGUGAQ0ASOlA==; 31:jrM6Kd3/e7M7LbG6EznKoJ56bMfoVc0WcJ/HyPA+KM8JPZuHBYUD8Waq3dt15n4ARQbrHm21qwtYFB9+KCuPGel5lEcK8OnsoEj6ri+qiaEwTY4XD+0vSXv/DrH4r+SpMvy6kiW+tw38rtoHPHUC18xwYE0KMOuDmmm7HSRPpDPbbiCLm3Rzi6OmWVcqvkJpUTxRQUlxUEgQmOd8NgQ3eOAsjOGf4EpaHCI3dTGStBA= X-MS-TrafficTypeDiagnostic: VI1PR04MB4893: X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB4893; 20:YZMkoI648T4XsoiEjEUMgtTx6eiFByGIeBGhJZzMjLWAdgLfjL9Y2ocdtjXMqe4BM+f9Bf1f4n+rRWRiX3df4ZYg/u4FKXyAjcUN4ii7OB7zaBj1qMcTaCLX9mrS9OmIuvCTK7/3IC8ci26RnsRcBwHSANozyBp7r6iRPPNd4kyvgrMW0eSk8CQXq3Wb/1KbKrq8t53YXfFORGl0KL6O/pRYwnWnjDovnvsv71UEu1J4rkR90QQizZyAsobgHZkWfLRPprY8IeWnKvu+eMCe+eB6HiNkBiwpc2Bz2drGxFoEQchu2qR7k3X+CV3grQyNyYlrDI5R0YV8cUCEHMcYO/Nnx/v5AKrYinW47uB4xhgYQIqZZmQp2NNOshGdMFIHsq2dPw3TMrvCLDZKtkn2XJNpx28Wr+i6wzL7JIcGRsduzS0n9OHSCU8ZkodxEkcb+iYRxB0LflGum7c6AHMr+whruhFzxo2co9iBWz0vNBQnJei0E/gEyFTwUhPZvUuf; 4:q6lCakb4YcqCh4aD+vW8VPSTCnllfVVHbbsQzWmagK4GPb93wqQVXZ4LxhWN0deSxcYgBCmAkxpUGYN2A88Zk4sMqsWOuy8AqCYypz8V4DIRmcrLlk1RJbQ3brtvs+OaFBj8dwq+FUMNc+KUnOcICVJqf1KpALT/lDcq9/p7MeiyXBiCoS4kbZkEjduybGx/hd3kMiQ7dYUKFuMHneJochjlxDn4uSlBuifVqIs2uT+UYxJRJOAtrmbR5Uez6Gf+rhfTJy2ztSPAz5BWEuNj05Wt8Eq66/ARjiTF4cw+z06bgkr6stT2RT/uqNTtdRz8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050); SRVR:VI1PR04MB4893; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB4893; X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(346002)(376002)(396003)(39860400002)(366004)(199004)(189003)(5660300001)(53936002)(2486003)(58126008)(76176011)(52146003)(23676004)(16576012)(230700001)(6486002)(53546011)(478600001)(7736002)(3846002)(6666003)(64126003)(6116002)(50466002)(486006)(105586002)(476003)(2616005)(5009440100003)(106356001)(44832011)(305945005)(229853002)(97736004)(11346002)(6246003)(52116002)(65956001)(66066001)(65806001)(31686004)(956004)(67846002)(14444005)(2906002)(316002)(4326008)(81166006)(86362001)(81156014)(47776003)(36756003)(26005)(68736007)(3260700006)(446003)(77096007)(386003)(8676002)(8936002)(31696002)(65826007)(16526019)(25786009)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4893; H:[10.232.134.144]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0TUI0ODkzOzIzOkxMSnFtMFVUQ1V5Z0JZcDJlcXpjUWpRblFp?= =?utf-8?B?cmtpUHExOTdaZmRsS01vM3hyVldSc09TRVg5Wmtjd0lUaVhRY0tPaVR3TFox?= =?utf-8?B?ZXhwWHk3cS9SK2RZc2NXYzhha3FBdFA0MG9ubldsUHNUckt6U1hReDgxTThK?= =?utf-8?B?MUNCRitway9TVFFzNGhCNk1wcVl4ME1LQVBrSDlBaDBiaU00dVFBdmFIWjZN?= =?utf-8?B?d1V2ZEFQTmd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khwED6c7aaWWonmNkEy0mRPs5zEps=; 7:v21ncHqZlYdL1Proddms1nSZBQPDl057liAor/rTDOOg+DwcnA68cqdRyw5Mp/CxHZ3VIKBhSK+0zdH0mAifqA1k4DIMJbLauqe/Crw36vzycz9jeJkt1iVCOzX45nIVsqNYXdjPS2FU9bTklXp1bhwHCmDNn3z1VHz7mtZ9beiOGdfgGiOmjXhSZSoTatw6fO1F6zRyR9pjLmXkt5TbGZe3WDoORmPN/2IMzyY28ukyUB1M26pwBFfURV+NLVP5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2018 14:05:05.8260 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0018e93-89dc-4d02-4a76-08d61d6fbcdd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4893 Subject: Re: [dpdk-dev] [PATCH 05/10] crypto/caam_jr: add queue config functions 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: Tue, 18 Sep 2018 14:05:08 -0000 Hi Gagan, On 9/13/2018 11:38 AM, Gagandeep Singh wrote: > From: Hemant Agrawal > > Signed-off-by: Gagandeep Singh > Signed-off-by: Hemant Agrawal > --- > drivers/crypto/caam_jr/caam_jr.c | 64 ++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > > diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c > index 43fe5233b..f05e966b0 100644 > --- a/drivers/crypto/caam_jr/caam_jr.c > +++ b/drivers/crypto/caam_jr/caam_jr.c > @@ -104,6 +104,67 @@ static void hw_flush_job_ring(struct sec_job_ring_t *job_ring, > } > } > > +/* Release queue pair */ > +static int > +caam_jr_queue_pair_release(struct rte_cryptodev *dev, > + uint16_t qp_id) > +{ > + struct sec_job_ring_t *internals; > + struct caam_jr_qp *qp = NULL; > + > + PMD_INIT_FUNC_TRACE(); > + > + CAAM_JR_DEBUG("dev =%p, queue =%d", dev, qp_id); > + > + internals = dev->data->dev_private; > + if (qp_id >= internals->max_nb_queue_pairs) { > + CAAM_JR_ERR("Max supported qpid %d", > + internals->max_nb_queue_pairs); > + return -EINVAL; > + } > + > + qp = &internals->qps[qp_id]; > + qp->ring = NULL; > + dev->data->queue_pairs[qp_id] = NULL; > + > + return 0; > +} > + > +/* Setup a queue pair */ > +static int > +caam_jr_queue_pair_setup( > + struct rte_cryptodev *dev, uint16_t qp_id, > + __rte_unused const struct rte_cryptodev_qp_conf *qp_conf, > + __rte_unused int socket_id, > + __rte_unused struct rte_mempool *session_pool) > +{ > + struct sec_job_ring_t *internals; > + struct caam_jr_qp *qp = NULL; > + PMD_INIT_FUNC_TRACE(); missing here and please check other ops as well > + CAAM_JR_DEBUG("dev =%p, queue =%d, conf =%p", dev, qp_id, qp_conf); > + > + internals = dev->data->dev_private; > + if (qp_id >= internals->max_nb_queue_pairs) { > + CAAM_JR_ERR("Max supported qpid %d", > + internals->max_nb_queue_pairs); > + return -EINVAL; > + } > + > + qp = &internals->qps[qp_id]; > + qp->ring = internals; > + dev->data->queue_pairs[qp_id] = qp; > + > + return 0; > +} > + > +/* Return the number of allocated queue pairs */ > +static uint32_t > +caam_jr_queue_pair_count(struct rte_cryptodev *dev) > +{ > + PMD_INIT_FUNC_TRACE(); > + > + return dev->data->nb_queue_pairs; > +} > > static int > caam_jr_dev_configure(struct rte_cryptodev *dev, > @@ -186,6 +247,9 @@ static struct rte_cryptodev_ops caam_jr_ops = { > .dev_stop = caam_jr_dev_stop, > .dev_close = caam_jr_dev_close, > .dev_infos_get = caam_jr_dev_infos_get, > + .queue_pair_setup = caam_jr_queue_pair_setup, > + .queue_pair_release = caam_jr_queue_pair_release, > + .queue_pair_count = caam_jr_queue_pair_count, > }; > >