From patchwork Wed Jun 8 17:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Agarwal X-Patchwork-Id: 69632 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2442358qgf; Wed, 8 Jun 2016 04:39:21 -0700 (PDT) X-Received: by 10.55.201.154 with SMTP id m26mr4255285qkl.18.1465385961474; Wed, 08 Jun 2016 04:39:21 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f22si417554qta.44.2016.06.08.04.39.20; Wed, 08 Jun 2016 04:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B18C46808E; Wed, 8 Jun 2016 11:39:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7B64C6806D; Wed, 8 Jun 2016 11:39:15 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A28DE68075; Wed, 8 Jun 2016 11:39:13 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0073.outbound.protection.outlook.com [157.56.111.73]) by lists.linaro.org (Postfix) with ESMTPS id DB8CF68065 for ; Wed, 8 Jun 2016 11:39:12 +0000 (UTC) Received: from CH1PR03CA001.namprd03.prod.outlook.com (10.255.156.146) by SN2PR03MB2381.namprd03.prod.outlook.com (10.166.210.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Wed, 8 Jun 2016 11:39:10 +0000 Received: from BY2FFO11FD010.protection.gbl (10.255.156.132) by CH1PR03CA001.outlook.office365.com (10.255.156.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8 via Frontend Transport; Wed, 8 Jun 2016 11:39:10 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Wed, 8 Jun 2016 11:39:09 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u58Bd7eo017504 for ; Wed, 8 Jun 2016 04:39:08 -0700 From: Nikhil Agarwal To: Date: Wed, 8 Jun 2016 22:38:35 +0530 Message-ID: <1465405715-4764-1-git-send-email-nikhil.agarwal@linaro.org> X-Mailer: git-send-email 2.8.2 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131098595493854836; (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)(2980300002)(199003)(189002)(189998001)(5008740100001)(36756003)(11100500001)(110136002)(50986999)(107886002)(47776003)(97736004)(2906002)(50466002)(19580395003)(104016004)(2351001)(48376002)(586003)(77096005)(87936001)(69596002)(68736007)(19580405001)(8936002)(106466001)(86362001)(92566002)(450100001)(50226002)(5003940100001)(105596002)(33646002)(229853001)(81156014)(81166006)(6806005)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2381; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:3Iws1uOdo/0p6LEStJtb+ZdwJUAEv6U6m2ZDiGNDgxcrxmEf2KuqB+OHdyNIialWA09FTAbAonuNf8EWK+qHiff6JeUhyEqWqxscbgh1Bjw/jLf0T83uk9+6TWE//7EYGqqK4mD1j5b972CIMng5PSvSsS9a1H1S9u2Q3CZJ/bPNvfWFr4QDfQ02IiK5KsoO2/W9zUXCLze01PVJw03Ihw+3ubCaQGb5AFAH/Kb7DJw/lMfj2p4vt50z3XR8LUL714lY3WbMxjkibk3INl+BP/I5wAqNMlQr92Tzyu3YDpDtUwTHWuslWl3ccK4OW0gSwGWPmwiCRsDi0mEc8gzXrHD/ow34cG7pwTTZfhZ8ZhYvU3ghSbubTfJpMA8bJFz9RbDnO40ta4EI1+9pdXHpsGpXBikBWX2nKb7G4R3Z3txt33l3icv8QdAnfsx/WnHHGGsP5qU/XIAdAUMo14zcgLfp2LlI1IlAHAmBRzIiMTmlnZIpYEu1LgZFIGJB2bbzGPgxRZr+wGbu6GYfxGtq+g== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 058345a9-55e7-4de6-5d15-08d38f91816b X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2381; 2:9OYTJZPnNVOG6NIAMGI5dk+2db1x71sU4IEMDhK0remoYesqjLw29Qxw/7kgV2Z7QfKsCh5TJxJ3ErruwP3dxB0T2DicsptimEx5uqLt31fv/NlTcrLiq99LPFyZyZeiRGP2Mu+Cs6GAc3of5uhXKdreUlwVySEenY5TY1+gf8/r4oZRJ+qeW7P1Xm5p14o0; 3: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-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(8121501046)(5005006)(13015025)(13024025)(13017025)(13018025)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB2381; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2381; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2381; 4:8dJEOdylzVnU142gDW3fSUeEbKSHL5xcPUJT4Dq0ebU/VzQdx16RUk2lX29aou1mx6Qf9eJvUBtdck5ttWwzMAJAz48o3CNa05N0LWwyrGw12iTSPtqXiVhjdImy6AJexIJ3TZ8T4u+0jBRr+dlYKl4c9kIyNBUc9bjJx/mAm922KXjS5Ukror0sv9adp+galS08Sm+HpUcUhHvNsvFESoR/SInGy4Wq4sMBgLy3nVZAybalX6p+hl7mEx4WjZ7qpeoSrgIijPzfv/u3K8ATpjBBmEClAwRJa+CGSZzIhy27KZBm4QAL/HnTUagjuxdDNqFE5rkJJodIUgUvz2ucJQK+yVdj6ZnLG7rxImvXpambzJ3hBatvA8QqnIOBmv+hNJAVl/5EDaG03bYJuA1JMSwKODb9tDCMsmixB/b6qO0hGDPQlMMIMu51cEzszlfM0SNTY+XTeBwEhB22JZ4t7780hqiOiccJFuhBNsbpiZw= X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2381; 23:Zpdg2EByQNor8Dhby9sC2oSf/NtNqBHQM/OaMsRKf?= =?us-ascii?Q?+XpoYB0f2R2gWo/eG+h3qTe9+Lda/JvS/YlMxmeXrbo7OBggVwN8dkj5Yve/?= =?us-ascii?Q?j3hoPKigqUvkA6h75QbRAcH7TxwvclJbzbBf0Yg5yFQkdqoOTLbTM8TSqBYB?= =?us-ascii?Q?vE8grmUIo8O0anTwuojToLn3i+CqO1idwc6+rvtgs6W7YjB9b3VEbLQqEerc?= =?us-ascii?Q?am96Likl+Ei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v+i6AqXk0sS23yQfnVe1omGRWIiUH0pI8B9Nis2FenFczYxf3UsohdH55qC47iK7IplvLOd+0Sy476HzOtLWiUPZB+I/xcKQPuK5pMrN9puVpLJH6RWpPEZmdaZKc3YTkdwtDWfkWhY=; 24:SV5aIHps9T5eTD/TfFrMDeThkE1/xONVc4OyeEdKViYgiehwPDqRDOVzTZbA/9BOaN3fIsdulRU+fIQhfjw1Uia9YzeE72O0te/oR3lWJpg=; 7:xy5ydt/lcdjE/hD07StBnWRaACoN1VX0T7DttkUCDp/J/Ggt+rQXMMmRCUAACzEs1qR5ftL8iEDiN7lRjRCS/f/LKG+vHPJYU3QvDXIk94XgaOwqNdMYi8phplvE6hl0ptGiGIvrNkKqyfORHEiwyoEPyp82H+Tkfo7Db/723UfjOOP0JGxhjvv7EtqwYTRewdx7HthC0Wb9Bu3N3oA5O2MQkjkWswta076tKtOU11E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2016 11:39:09.2606 (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: SN2PR03MB2381 X-Topics: crypto Subject: [lng-odp] [RFCv2 API-NEXT] Adding API for Multi crypto operation support. X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Nikhil Agarwal --- include/odp/api/spec/crypto.h | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d8123e9..7b4424d 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -214,7 +214,6 @@ typedef struct odp_crypto_session_params { * @todo Clarify who zero's ICV and how this relates to "hash_result_offset" */ typedef struct odp_crypto_op_params { - odp_crypto_session_t session; /**< Session handle from creation */ void *ctx; /**< User context */ odp_packet_t pkt; /**< Input packet buffer */ odp_packet_t out_pkt; /**< Output packet buffer */ @@ -406,6 +405,7 @@ void odp_crypto_compl_free(odp_crypto_compl_t completion_event); * If "posted" returns TRUE the result will be delivered via the completion * queue specified when the session was created. * + * @param session Session handle * @param params Operation parameters * @param posted Pointer to return posted, TRUE for async operation * @param result Results of operation (when posted returns FALSE) @@ -413,10 +413,35 @@ void odp_crypto_compl_free(odp_crypto_compl_t completion_event); * @retval 0 on success * @retval <0 on failure */ -int odp_crypto_operation(odp_crypto_op_params_t *params, +int odp_crypto_operation(odp_crypto_session_t session, + odp_crypto_op_params_t *params, odp_bool_t *posted, odp_crypto_op_result_t *result); + +/** + * Crypto packet burst operation + * + * Performs the cryptographic operations specified during session creation + * on the list of packets. Burst operation can only be performed asynchronously, + * and the result will be delivered via the completion queue specified when the + * session was created. + * + * @param session Session handle + * @param params Array of Operation parameters + * @param posted Pointer to return posted, TRUE for async operation + * @param result Results of operation (when posted returns FALSE) + * @param num Number of operations reuested + * + * @return Number of operations actually enqueued/completed (0 ... num) + * @retval <0 on failure + */ +int odp_crypto_operation_multi(odp_crypto_session_t session, + odp_crypto_op_params_t *params[], + odp_bool_t *posted, + odp_crypto_op_result_t *result[], + int num); + /** * Crypto per packet operation query result from completion event *