From patchwork Fri May 5 12:34:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 98634 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp99265qge; Fri, 5 May 2017 05:35:55 -0700 (PDT) X-Received: by 10.237.60.23 with SMTP id t23mr10868710qte.206.1493987755264; Fri, 05 May 2017 05:35:55 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m80si4949756qkh.175.2017.05.05.05.35.55; Fri, 05 May 2017 05:35:55 -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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E9C6160991; Fri, 5 May 2017 12:35:54 +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=-2.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS 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 69E4E6069B; Fri, 5 May 2017 12:35:49 +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 2D15D60796; Fri, 5 May 2017 12:35:46 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0139.outbound.protection.outlook.com [104.47.2.139]) by lists.linaro.org (Postfix) with ESMTPS id C9C5260A4F for ; Fri, 5 May 2017 12:35:18 +0000 (UTC) Received: from AM4PR0701CA0013.eurprd07.prod.outlook.com (10.165.102.23) by VI1PR0701MB2125.eurprd07.prod.outlook.com (10.169.137.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Fri, 5 May 2017 12:35:17 +0000 Received: from VE1EUR03FT059.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by AM4PR0701CA0013.outlook.office365.com (2603:10a6:200:42::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7 via Frontend Transport; Fri, 5 May 2017 12:35:16 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.241 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.241) by VE1EUR03FT059.mail.protection.outlook.com (10.152.19.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Fri, 5 May 2017 12:35:16 +0000 Received: from fihe3nok0735.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v45CYZu8005646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 May 2017 15:34:35 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v45CYZWv005640 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 5 May 2017 15:34:35 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 5 May 2017 15:34:34 +0300 Message-ID: <20170505123435.11019-2-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170505123435.11019-1-petri.savolainen@linaro.org> References: <20170505123435.11019-1-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39400400002)(39450400003)(39840400002)(39850400002)(39860400002)(2980300002)(189002)(199003)(9170700003)(81166006)(53936002)(2906002)(2351001)(305945005)(50986999)(86362001)(76176999)(1076002)(508600001)(33646002)(8676002)(8936002)(105596002)(106466001)(2950100002)(189998001)(6916009)(110136004)(38730400002)(50466002)(22756006)(356003)(5003940100001)(36756003)(47776003)(5660300001)(77096006)(48376002)(50226002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2125; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT059; 1:YbJqNdcJ3neBBw8QAhqSHOlCvv74VpP/eRW2nXq61znwm24aPe7IxSQIqUNQfhvys6IfBf+7MekIcD2f54T3ACVjDiclSIm4fUeqtdBHAESTeux9zMBOPjw74zSe+0APnUlRA7xmSOZYALYt/DKrgmEMLESWerMh0N5d3G3bgoHPpvUy3WHZXW72jhvEZ3MTmpSs6LAcdmO4PcxXe4iZ2vRHvPPSQEhZtmAFXWWBi31Upenqiip5JVaKGQu3OYV543x3FCPZiwEVVGFQlj77CkdJI2BOhc9yLIcuviGRldMmmDwZUO5jriqP33mRhNCFZsqhI0XJ7fkeAu+DHyAY/XWn1r9Q7fhwKiTfj4l4ae5fVjJkKr9KrecvXVKe8O2o832MLFzBL9MdvoaOvv05rfTfS+ahwW7sqmTsyIrddASNmgdG/ECVMaOdmMAF7BvNk6lU3TDLEa9pZxaZHO9pFU4JY/qM3lilDT4f5e7Sr77ILs0YOotHtZSn//A/QdBw/vhVrRIuwGpQusIuSABT5A== MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b134ea4d-0b75-4c3d-9d15-08d493b32ef0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:VI1PR0701MB2125; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2125; 3:9yz0F/v1uG5TRnhzokoDY9HK/EZLcm9nqiD8ZjyHg5in/9xQthFw3mLZIbqktCk2pmwZ+NyObi05pLgOJb4Ytw2UTKEerbvJfNo5bYLZk7a59b39eNq3LhGGYc8sLc1Itilhh6/OBrxQukj1Q7gJoIEgjcPzy5UF1q64dLpWWrqPwAQiN7eB+yiq19YLHiXwVzojF2FBwoY3boZABGUPznILnuHj5u15wMKlaxTn3N7+BKwTA/OjpSHmde+V1isy9F2pIZtq5ECzDXLnvyEBm2eAyDlhdCTNI8CTQ3YUEk/cdsGrPsdV25FKhPo7oeRHIt9HdEBUiv7hRhZt5LHQSVmkFn2qibQ1wZg6A6pMOs4JTpGoI1y9M3+X1tNxWtmzQ4U4AgwDYpiDXxptdHzh69GdiAUMc2SCltx6RDyFVVgIImihYFqm//ByLj13r2g2fdHsKT1WwSRzLquT9f6TAw== X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2125; 25:br4lHvG/JPWAubdghYCt+IhPvyr0OtT/Wr7FXjsbnmAtSTrbfT4A5bj1F0cTmh1SHvnhWEq29/IfCSCIuwOLPTKGeC+NK4Tptu0qKl5voRhQoMrDqDkgHxVUCBnTNiC1YnlWXSn/Bnjsd0KE/KhXwEb8KH4EnbbedRB9Vsbu1EUTldi3XNi+3JU3roDcV28yQ8E6LMIHx9rWkv/wM3aYNUC0OIJJo5vaDgu1ELQcFyB0QxWUiTMQJsmaVMBv/SMS1kbug6muF/30JF1WUgvyD+72L+kp8TpueD79geKgZOt6SwSVQP3Pk2wNNjfzs8u8/Db6V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8F7Q1mRM69JJe2Agq+t5nZyEPpwCyEgIiP5yEgya3gqkcHDxIDmVc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13021025)(13013025)(13023025)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93003095)(6055026)(6041248)(201703131423075)(201703011903075)(201702281528075)(201703061421075)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:VI1PR0701MB2125; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2125; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2125; 4:+IV3JA0yhZuL/JVRT3q8XzK5yp66WPSfs60OSe/LVRDHxBxwLI2X+AuSsfZuPiFBRnIZ5HsLt6SwvFfGRq5/Q2oHya2uiDvr5/VQ7g9pvPC7uH+lw8z1jmGif+a498HCv2dbm2O5PH4Zuoeo0+39wDfS2vApLvdcH1AArldrhbZQkomnxDjG1hIl2B4EJW9B4+Fo1ARi59o0P7htHB+xjMNFviOE3JHDdO3jn7A5u57r49Wv1L6+8jIU5B0cFZUPxBXh3zpFoDnk4Gz6A63xEv/2laaGpf/VqMt5JImnRnK3jU7pamusgnHbQoXEqCMA1O41oXrX74cDz2bKDputay2tRxJmKJXT+KHkoMxcpJyg3MWdBZAddEJKoGSO3zpsTo8vOCWEiZbnRYEOU9Htl78HNHU4bz0eKC3/zNUJWwL3Bt2KvqeQK9EzI8wwupSqrU9NYjmCMt/W8xPyRcbYIwYIEb794GqP9fjhutXKIT7HdwDhYpq4yNu02sYL1mQq60C+R3FQCVQ7378TesbV2hqLpbd8dPC6K3b7Dx7doE641nW6RD6p5Hu4Dqy4+dJycbtgnkLmqaCU0YBLVkgWqKuyKf9VKMKyBsDo8qlNbPSJzP6hvOX3GpsE49f7IMrjcYsoJJEVLQmWY7n6AhHs5c59XTrGE6S3rgjj4KWCCXPVUX5xYjDk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xGdHhSr5xTLgLvTF7xZuHbS0C6oByz6WgTA2/h0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2125; 7:OOD/10Ygj1/k8BHSZCDhhPjCznf0T92hduSDQK9Cuk1AfoNxUVrxGoL5n0YFBh7yfA+RiAHEyuNr4AeB+k3/q5sBexjgopZmpyr6BAdC+lAnYY/SbwGiMW9bM+JXXapq8EVhjFyMyDyLSwTm1kb2Z2j/SIJEPn9rFuBKh2cem4hAb23Dr6cGkaPEpOPpZhD+08Z0Mc8DXo0EI+m6yafe/PIHE6H+L4iReo8bqvK4vufwrBd+7m5h1H3TizKzcN5PvIJ0sS49TtguG8ZhVgRV0c7czEBOo3Nd6TE2V5YMr+0WStxjM9YXwg15Ym00IDmJPDtu9WKPW2t1hCng93CQRQ== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2017 12:35:16.0001 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.241]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2125 Subject: [lng-odp] [API-NEXT PATCH 2/3] api: ipsec: add capability for max packets per result event 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" Added maximum number of packets per result event to make it easy for application to prepare enough storage for packets. Signed-off-by: Petri Savolainen --- include/odp/api/spec/ipsec.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) -- 2.11.0 Reviewed-by: Dmitry Eremin-Solenikov diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index bec9c561..255fee50 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -270,6 +270,11 @@ typedef struct odp_ipsec_capability_t { /** Supported authentication algorithms */ odp_crypto_auth_algos_t auths; + /** Maximum number of packets in operation result + * (odp_ipsec_op_result_t) per event. + */ + int max_op_res_pkt; + } odp_ipsec_capability_t; /** @@ -1283,14 +1288,18 @@ int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes * any resulting packet handles to other ODP calls. * + * The operation returns number of packets in the event. If this is larger than + * 'result.num_pkt', all packets did not fit into result struct and + * application must call the function again with a larger result struct. IPsec + * capability max_op_res_pkt defines the maximum number of packets an event may + * contain. + * * @param[out] result Pointer to operation result for output. Maybe NULL, if * application is interested only on the number of * packets. * @param event An ODP_EVENT_IPSEC_RESULT event * - * @return Number of packets in the event. If this is larger than - * 'result.num_pkt', all packets did not fit into result struct and - * application must call the function again with a larger result struct. + * @return Number of packets in the event. * @retval <0 On failure * * @see odp_ipsec_in_enq(), odp_ipsec_out_enq()