From patchwork Wed Jun 14 14:08:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 105525 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp313130qgd; Wed, 14 Jun 2017 07:10:57 -0700 (PDT) X-Received: by 10.237.45.103 with SMTP id h94mr332867qtd.204.1497449457784; Wed, 14 Jun 2017 07:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497449457; cv=none; d=google.com; s=arc-20160816; b=CMTNWruEsolFH10Yr8DCJ+9P7tNGUV6d0uxJfCmkF7rS38Yi/baYS06sAsiKHCFyvN ggABC1DGMwN8l9BkWbfDnbBh0vw0JadaR6bV4aVvsYVW5Nfjq8HwR+bhzqs6D34oOELZ 4JNB4cSk/apfTeT0GC2ZdvK3rXtsIKudKMKRDMm3laKtyfIWjl6mpP257mtBIcqLwwqP 8HMoFrIgbdjhe1x4Z38YegHTPMWrobqhTYxcnhuj3IzeqR1FWme/aPfwoJUoAEbR9eW0 JAJwv4twRc19HHMnCSoHL1cyoDJgeeUpjeL7A8htPXIZ0xZPAYRdFf0hwe56aqXQAF/x rXAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=IvQoJuUiHQaPxOEXpOEyq3QzTZrmYImT3V6Aimg9bIM=; b=Nz32SmXZ1+lPDEVzTDyNuFRHDVFioUgAVG7aPYc17PuTTgWvdjlyohyMdFN5Kk6D1/ iyUqkPxHHTYJ2eMCBI7EMIukR1eeWxilEyV10rSqWseevm2k5Dy4gXHjpiMG9GZPVWEi GazSORX3M2gP3r+qHPGBJgV8TnA9camjZpuXwJfZzg9mzIYjrnCElm1JA9/fIBmJ2paq QiWOyv5bHC9Hm/pG5a3b4Zz5ZxvnHrZgixi2H4bQdn102IFvbC03IeVbjHqe9LZ0ur5j UG1I5PiafvxzHvSsEozEM7hLqPP487avRmQLj6pn4Gmq8MNdaxRMPYU7IF1fvSXIZMx+ DyeA== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c145si104103qke.81.2017.06.14.07.10.57; Wed, 14 Jun 2017 07:10:57 -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 6E6C660687; Wed, 14 Jun 2017 14:10:57 +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.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 1E00E609CD; Wed, 14 Jun 2017 14:10:39 +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 C90F760962; Wed, 14 Jun 2017 14:10:33 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20101.outbound.protection.outlook.com [40.107.2.101]) by lists.linaro.org (Postfix) with ESMTPS id 2A6F060687 for ; Wed, 14 Jun 2017 14:09:28 +0000 (UTC) Received: from AM3PR07CA0138.eurprd07.prod.outlook.com (2603:10a6:207:8::24) by VI1PR0701MB2480.eurprd07.prod.outlook.com (2603:10a6:800:6e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10; Wed, 14 Jun 2017 14:09:26 +0000 Received: from AM5EUR03FT006.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by AM3PR07CA0138.outlook.office365.com (2603:10a6:207:8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10 via Frontend Transport; Wed, 14 Jun 2017 14:09:26 +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 AM5EUR03FT006.mail.protection.outlook.com (10.152.16.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1157.12 via Frontend Transport; Wed, 14 Jun 2017 14:09:26 +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 v5EE8ld7019849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +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 v5EE8lS0019837 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 14 Jun 2017 17:08:45 +0300 Message-ID: <20170614140847.30399-2-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170614140847.30399-1-petri.savolainen@linaro.org> References: <20170614140847.30399-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; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39840400002)(39860400002)(39850400002)(39450400003)(39400400002)(2980300002)(199003)(189002)(9170700003)(33646002)(305945005)(77096006)(76176999)(5660300001)(356003)(50986999)(189998001)(1076002)(575784001)(86362001)(36756003)(498600001)(5003940100001)(8936002)(50466002)(48376002)(47776003)(81166006)(2906002)(2950100002)(22756006)(50226002)(6916009)(38730400002)(2351001)(105596002)(8676002)(53936002)(106466001)(110136004)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2480; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT006; 1:Ts46QzzRkDHddZvxf1ghvllVwfIYbxQLizSKYsUhm30geTOk5s31b+GPms2+ScjF+hm+Iym2F72idn6DOrE1ADPu4pbKMhXB6zpMW92j2YWxK5hJYaw3RRG7EnLTyRGhas7Aq/pKJbvM+hOt2zsQ/3wV2laJ/mPX3pW5P1VUxiUrwxcX5IbnDASm7sllHv93LsUCmN0aoHIEtnfvk3lqAD1uap/uSX8/SNRcIR6/jPALPo5aiCrXuSe17arhJ3xv+CR/F1CSvTvP1cRApq12pqI6pn8WAF2EtYNN82I9lGRSqsSfzqR1DIOX0bUr3gZ1bmkyyt5uGDRANdpbhlD4BySF1Mio5llQwoGMEes6SXNDJgBXSn68jpW2wmTexGp7kepEjhcW4Ty0r5cTAHakspVR01GLRf5gqNcoXOXG+BPu1zd7rrbpr2VEq4AIiYF9/rYltbTCLzGssAOS3OLGLv+LFwo0JqBiF5Fu2MveLWf0k6qzk+0Tl3D7ZX/OdblIx3krRxWbhob2I7OQ2q4JCY7AHqhxGTYwM/xt/ph2Jes= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2cb7f20a-3d69-4cfd-3052-08d4b32ef731 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:VI1PR0701MB2480; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2480; 3:eUOVKpHRkSd0sJo+XFmBRfyJE/tjLmRJVKAp6AEahlTIfbJPVOjj1J/N7M73rNDhtmWRl6voywE1TOyyOoBXNQ2cjUuhcPm4lFPkfpGp8svq+dOL6NUHZgFFaN3+fD1d6q/+HXZL2qPqoVULH6d+GtHlIieef7plOkaiwx4NEZKwrk8dbLsuzu7/tS0+BBpK6Bpc3taOOvB82CgfxqI3vztDvybXCn2oNppkJosCwgjGzHwEPo++CtV2gifiQnOpSqsXnGCTpN5kLMhs/s5+YYGYQ3gErrrekhSoZDaZTGIp95ZJPI0seIL51P4hJKKYps+QrIuTlx69xizqYIZDnymfqlINj9/9O+7COa2Zs9zQ0N/5Afnymt7YiLmzTt867JrwsiYduXGzwYk7NVFuR0seYUGzHiVpDCOqthUXIa/ANnPOM4YDnTfDJnV+u5BPMsSvBxL1ciL9CcWiCH67Mw== X-MS-TrafficTypeDiagnostic: VI1PR0701MB2480: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2480; 25:Hej40Vt3mKsMk/+Nzgl8Jv8FQCRs7+A+1j/1J3CGRbVrAlK1E+9FZcRwx4Qd5aOzE2LzVSoQeWNUC9f0GrZY98zjFyvcO5G95/jGzb/TZyrchUTSoivA9kaW+FEjdv9V5c3+ZqOIYCNydeVrbx2VUxNZdsaI9gGURU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0h5S2FzVZNCttPOf2G6rgppCAi/l6AwudAZP28aD3f8BUQKhBlmudM5z26O0enRXC7R/+6zad1HZyBF+RYjY6doUmZJDv1b+Ff6Wmpcd6cvq2XjVv0daOfHeon3P6CgYVjyFXO7D54bcmeM0ya6MKHtKhbri1ThV2PVwO1UBItUqUm60GsY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13013025)(8121501046)(5005006)(13021025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93003095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0701MB2480; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0701MB2480; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0701MB2480; 4:v6IDQirT+EpD5uHc9KD5ImIowj+MIlWW8rJmdIrJ?= wYwIYzqEYi53rIy4zyCbLHnr5uKlK6ZZtXlRmqjJu0kBN8xq//HJKpmTu/fTqAFNSs1Is7fl2/ZZepLSuiflzyYINpDuB6IFt1ZLKV5R9Y+6rnXA7l2IHd05H/SYLK+xngLVrl8S4gb0mNwtLC+SpdcbJ6bmRaEG4zpEMw2gux7GeZWLX7eYSWjmUb8ZQkwCZ86Z3uFk97EimF5Cl9J8C90Tpgvf7oLtEfWoGsaxvzAqp0juoblqhyKXgNU/BenkAi7VFglcCdCcdLB2pMS92M9Vf3qvvYTt0Rzc6aqfbcEQ5pK3DpFwoFcQFuAIhmvyek0r4OuEd8Z7sGEzmDZuEt9w22YZKoP94r+EtHXdDrp1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8r1uGlFK0Z9dFcxHQNveQnkQ6NRLnekKxgkeZ5OGke8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2480; 7:mdQZah1+Rh5fVANP71v90WibBcoL4k3B9PrAFkBRr3Gsv3YZgatbA3rgukamCHBZfE7ijvPQrzNke21zhSOEf/wBIa/q6ZpfQ52pt6bsRqQdDWvyDwRKGvWgajx7KfgpHFPwrWipUrLclrkN8eBrbOCy2S6Rc4SmxMlEaEssnSX1a7m+gFsqsuNLoGhv6HUBHSS//l+iWvbGa+8PwY7UnEDv96AJQaCSj40hgjvWhSUlsn6a9MDzrYyupfTN9CwXK9fKISmtWjeN2N1d+lz/xGDtfpnZFJwEm17pYMG8yu53FbvnJ8KLlF1SR1Yh0wMaNq+biAJwp2Fu0vDU8I6jYQ== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 14:09:26.1427 (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: VI1PR0701MB2480 Subject: [lng-odp] [API-NEXT PATCH v2 1/3] api: event: add subtype to expand event type 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" Event subtype gives more detailed information about the event. Two subtypes (basic and IPSEC packet) are introduced initially. Later on, other packet producing APIs (crypto, comp, etc) may also produce packet events with additional subtypes. Signed-off-by: Petri Savolainen --- include/odp/api/spec/event.h | 80 ++++++++++++++++++++-- include/odp/arch/default/api/abi/event.h | 9 ++- .../include/odp/api/plat/event_types.h | 8 ++- 3 files changed, 89 insertions(+), 8 deletions(-) -- 2.13.0 diff --git a/include/odp/api/spec/event.h b/include/odp/api/spec/event.h index f22efce5..ac92c339 100644 --- a/include/odp/api/spec/event.h +++ b/include/odp/api/spec/event.h @@ -37,21 +37,91 @@ extern "C" { /** * @typedef odp_event_type_t - * ODP event types: - * ODP_EVENT_BUFFER, ODP_EVENT_PACKET, ODP_EVENT_TIMEOUT, - * ODP_EVENT_CRYPTO_COMPL, ODP_EVENT_IPSEC_RESULT, ODP_EVENT_IPSEC_STATUS + * Event type + * + * Event type specifies purpose and general format of an event. It can be + * checked with odp_event_type() or odp_event_types(). Each event type has + * functions (e.g. odp_buffer_from_event()) to convert between the generic event + * handle (odp_event_t) and the type specific handle (e.g. odp_buffer_t). + * Results are undefined, if conversion function of a wrong event type is used. + * Application cannot change event type by chaining conversion functions. + * + * List of event types: + * - ODP_EVENT_BUFFER + * - Buffer event (odp_buffer_t) for simple data storage and message passing + * - ODP_EVENT_PACKET + * - Packet event (odp_packet_t) containing packet data and plenty of + * packet processing related metadata + * - ODP_EVENT_TIMEOUT + * - Timeout event (odp_timeout_t) from a timer + * - ODP_EVENT_CRYPTO_COMPL + * - Crypto completion event (odp_crypto_compl_t) + * - ODP_EVENT_IPSEC_STATUS + * - IPSEC status update event (odp_ipsec_status_t) */ /** - * Get event type + * @typedef odp_event_subtype_t + * Event subtype * - * @param event Event handle + * Event subtype expands event type specification by providing more detailed + * purpose and format of an event. It can be checked with odp_event_subtype() or + * odp_event_types(). Each event subtype may define specific functions + * (e.g. odp_ipsec_packet_from_event()) to convert between the generic event + * handle (odp_event_t) and event type specific handle (e.g. odp_packet_t). When + * subtype is known, these subtype specific functions should be preffer over the + * event type general function (e.g. odp_packet_from_event()). Results are + * undefined, if conversion function of a wrong event subtype is used. + * Application cannot change event subtype by chaining conversion functions. + * + * List of event subtypes: + * - ODP_EVENT_PACKET_BASIC + * - Packet event (odp_packet_t) with basic packet metadata + * - ODP_EVENT_PACKET_IPSEC + * - Packet event (odp_packet_t) generated as a result of an IPsec + * operation. It contains IPSEC specific metadata in addition to the basic + * packet metadata. + * - ODP_EVENT_NO_SUBTYPE + * - An event type does not have any subtypes defined + */ + +/** + * Event type of an event + * + * Event type specifies purpose and general format of an event. + * + * @param event Event handle * * @return Event type */ odp_event_type_t odp_event_type(odp_event_t event); /** + * Event subtype of an event + * + * Event subtype expands event type specification by providing more detailed + * purpose and format of an event. + * + * @param event Event handle + * + * @return Event subtype + */ +odp_event_subtype_t odp_event_subtype(odp_event_t event); + +/** + * Event type and subtype of an event + * + * Returns event type and outputs event subtype. + * + * @param event Event handle + * @param[out] subtype Pointer to event subtype for output + * + * @return Event type + */ +odp_event_type_t odp_event_types(odp_event_t event, + odp_event_subtype_t *subtype); + +/** * Get printable value for an odp_event_t * * @param hdl odp_event_t handle to be printed diff --git a/include/odp/arch/default/api/abi/event.h b/include/odp/arch/default/api/abi/event.h index 87220d63..ab3c0f75 100644 --- a/include/odp/arch/default/api/abi/event.h +++ b/include/odp/arch/default/api/abi/event.h @@ -29,10 +29,15 @@ typedef enum odp_event_type_t { ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, ODP_EVENT_CRYPTO_COMPL = 4, - ODP_EVENT_IPSEC_RESULT = 5, - ODP_EVENT_IPSEC_STATUS = 6 + ODP_EVENT_IPSEC_STATUS = 5 } odp_event_type_t; +typedef enum odp_event_subtype_t { + ODP_EVENT_NO_SUBTYPE = 0, + ODP_EVENT_PACKET_BASIC = 1, + ODP_EVENT_PACKET_IPSEC = 2 +} odp_event_subtype_t; + /** * @} */ diff --git a/platform/linux-generic/include/odp/api/plat/event_types.h b/platform/linux-generic/include/odp/api/plat/event_types.h index 0f517834..5b3a07e3 100644 --- a/platform/linux-generic/include/odp/api/plat/event_types.h +++ b/platform/linux-generic/include/odp/api/plat/event_types.h @@ -39,9 +39,15 @@ typedef enum odp_event_type_t { ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, ODP_EVENT_CRYPTO_COMPL = 4, - ODP_EVENT_IPSEC_RESULT = 5 + ODP_EVENT_IPSEC_STATUS = 5 } odp_event_type_t; +typedef enum odp_event_subtype_t { + ODP_EVENT_NO_SUBTYPE = 0, + ODP_EVENT_PACKET_BASIC = 1, + ODP_EVENT_PACKET_IPSEC = 2 +} odp_event_subtype_t; + /** * @} */ From patchwork Wed Jun 14 14:08:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 105526 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp313783qgd; Wed, 14 Jun 2017 07:12:11 -0700 (PDT) X-Received: by 10.200.9.93 with SMTP id z29mr391483qth.102.1497449531095; Wed, 14 Jun 2017 07:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497449531; cv=none; d=google.com; s=arc-20160816; b=AUrxIcWbiQoSU7zlBIjDtjIpcC5/i2zR2kmZkJW/Rpf8Xom6afkIGTcb8k4JfJK3c9 fOztENkgi7nA28DwV/CKIaIf2/WfiYmBe+suE1k2Fv/DBXfhAJ17eJHQ3vAwd4YyHS+s t7X/NsbE49CyuYkRO1ZjnvRmOJFRtqpyB2n0LCuaGcylo4VbdGVkg7YxkLvEs0le/MB2 VPk5KBGJ0F0HMlp/2/Vgfd7ZwqA/dzu8FsI99BQ+7CxgjZt0qUbiuUe5SPrHeV6tciFE pjtLB46QV9Vy/hJXl+s2M7Q7Jd+GzuJdlasPE32HfYZrEtfScX+332rYDdkusxhlxDpk ZJFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=/kwVIDidEU0YszaRw/kIABv+fGOID2Qo1CmN4q+BiYE=; b=XKmKrKQbgv5AAfC8+uxR09AOUByu164mt6bJk0Ko/rP7HTRBJlgiImmEPIi1bnLThw gE8ORQAFJr2R43vYUdtXsW24/gO8ISyKZ99tQgYxt9WpOJ0VbJXjHQ1e1FpJY6zotR7p F5jVudMsZH6ZWstQhG1kg2sUgOyxWsTw5TJ+Io9GwY66NU6sCFhLdYGOgxMNxropwr+h S4MYTOh6D/+FwzdgQpGRAGkpfqBtJjJOhMDT2bcQHwckzbx8Muj83qKPiamEVt5lqdZy uWROCmw/XkUc9x/0fVpDjQmtqgrvBFZCn8H+mY7aMVRA+aoR8i0tCbrXlKel8q98b+uF sbZw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u72si113018qku.66.2017.06.14.07.12.10; Wed, 14 Jun 2017 07:12:11 -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 9D6566050B; Wed, 14 Jun 2017 14:12:10 +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=-4.7 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, 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 680E860687; Wed, 14 Jun 2017 14:11:03 +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 65F9660953; Wed, 14 Jun 2017 14:10:50 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0102.outbound.protection.outlook.com [104.47.0.102]) by lists.linaro.org (Postfix) with ESMTPS id 25CF360C0E for ; Wed, 14 Jun 2017 14:09:29 +0000 (UTC) Received: from VI1PR07CA0181.eurprd07.prod.outlook.com (2603:10a6:802:3e::29) by VI1PR0701MB1760.eurprd07.prod.outlook.com (2603:10a6:800:38::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10; Wed, 14 Jun 2017 14:09:26 +0000 Received: from DB5EUR03FT016.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::204) by VI1PR07CA0181.outlook.office365.com (2603:10a6:802:3e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10 via Frontend Transport; Wed, 14 Jun 2017 14:09:26 +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 DB5EUR03FT016.mail.protection.outlook.com (10.152.20.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1157.12 via Frontend Transport; Wed, 14 Jun 2017 14:09:26 +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 v5EE8lMd019853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +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 v5EE8lS1019837 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 14 Jun 2017 17:08:46 +0300 Message-ID: <20170614140847.30399-3-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170614140847.30399-1-petri.savolainen@linaro.org> References: <20170614140847.30399-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; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39860400002)(39400400002)(39850400002)(39410400002)(39450400003)(2980300002)(199003)(189002)(9170700003)(6916009)(110136004)(2950100002)(36756003)(189998001)(77096006)(2351001)(33646002)(50226002)(53936002)(22756006)(5003940100001)(1076002)(305945005)(53946003)(5660300001)(81166006)(2906002)(8676002)(48376002)(106466001)(8936002)(105596002)(47776003)(498600001)(76176999)(50466002)(38730400002)(575784001)(86362001)(356003)(50986999)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB1760; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT016; 1:eRsEDyObQL+KuMrvps4K/2PRV+nkkqcLORKsLJlnakcnJuRBItMf8/rCe7UjmpKOph9pFjS8+MDAOGulwKnsRUb6kg54dTNWvcKwN0wdCU/hGWvRLVTVLYuEuzy2wddQiC/QSnse3JCxXcKNol+OtTwpwI8RJW0BV29l8y47q/qD3tV1/AMskWeTHP4nVvjTXbRZvwXhRf6i0SDyLAML/6v97UwO+q+VsWzh8IveEReGl7WU0AT2SQgD7gSLNrGyZfbdgu7zCRYPKwvXQbwciL+MTMmwyOv7blO3irnkqUPbeLYvAOlTwoCK4cGfLj5nRuHZ6mEZgyDQ6voLccTvQBjZGN+fLoeZiY51KFpr9EXcKlC418166yJmm3ch8AvzcXS0m16RQRzA0ARn9u2ODz8rBx2k+IF8IZz5oj7A5a2+QihRo/YoQry5QgH6ulRjtQUX0bLzXFTyoOWEaKru+lod8Cv1kxASU8O/w0ohfOHQVZGzqNPSCfGiKVzC9cK85ZTW5ysdAMgiaUDBbm5iORh+sT4pgukTtnZFVnFb7is= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: bde7898a-d1af-4283-7d44-08d4b32ef748 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:VI1PR0701MB1760; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1760; 3:M8hudJOxAGqMOTL6bA5U51pubqXuMg8MEuT6PUlKuRoEQDnZXIGWNOx8PfGaTUn9/v1YkYkqRKsQrI9o4HpDx/xH3ZXV86B5V2VUP8z98jfZ5oqlpGTmcEUkMshha1/ylFEsOsRBGGkzbsbZmSnwK/j3v55uW7W6pgfdstwYKsPo3GnAYsMHOt+MFLzvvdBQdtEGO7ODjzHqD1cUYgS+vGLGyxY4jyNhkZ6A32HDq6Ocm+XgLql1MlnMxzkB854xDvhhiNWs37WIDeP86uvskfRutZPsF+Lifoea75JXJEK+IZ4GCYXttFfNbJ6SJ7DreY9FVK13sbMckGv49/laHq0xun3tZdjzF/d2ko5faQ+Hv4AG9iR0BAhEoktO81ONRTCWiIh+Pkg5VUyrZYT4lzGraD5NCFEMVIhL3Oy2vP89DBy0sNkYqpzU/3ZrV4AfZjxMamsnkgOLox4huD4oaw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0701MB1760: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1760; 25:daH88JWLdcZ0YRFLxaKzrUaN/fXDVkl3YBHy8QDeZLprKeTbSy0+8OBuVf4kAN2ClGE4REjsqFrA9Jc6evK1wxrQxYCL3EI/r7TBf0ZBUyPYT4JNdL/JHkQtyMchXbBtkeDToOKEdAM/eA3gawl4cT/QZtkk76EiYA0smltMYKc/ybeLDdQ00ogy4AEo/fgrGTR0OnL6q3y6Q8qzqaAgGL9mRBvG+IGKmdwsbkuqNIRZXGI2POlPoPS0W76Srb6LP/bZFvxBqAV2IGqC6Y/TViLw7R/phoydIEofWVrZwEbA60nBZcXsXow1kibtpR/iCzN13hXqc2CfrA3rW1U1NNwHly4aJYLLiMahWwan89FaUnIXlx0aBQwxG8QiXztfhDerCXVRjKaIEma2eHLo6OUpUeZfbYTH5eGf+sF6P+aIQYuYnPQdGgOz2bHcawl1PLcKnkyxTpkl0xJwmiRvfu+gvfC9nxG5OYOclHf4PYY=; 31:s3PIgmatGCMIe6rST0//bdmdTgW4eJlfJpt5XZoShaqoxMWEwoONwgsW/NvIq10sqS3ZjIkVxQP/26Qqa0J8wgeKwR0PuJEScDrz8fSObwFeVwSgSFJGAfLIeSFVkMkjxf3cBLHQZVY2FR0R5j5cgDOMfMVRZ+QuVoeeKWwFmDDvopAkBDhkusvbZlttVPK7VtEeiAY2ElezIP40RNcOQ+Xx71GYsRiMs5YuyQRW/dw0hmccFzFw/i3PcbCP0r7x X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1760; 20:NFVBcSDxZBwGiNDf9scmSziS82+h5nkCVK3N+vC+kSjHU0x2e22EBJ/8xtNT2lhPFTFcITS/p6reFgpbyNPKc1Zu8X0uxxCo7ho/Tze70UE3Mvf4zFpUl1nHTKS/ZZ/W0neqad3o3B+pvVQ2GdRS24RHFWpChAeSLazmYZVOE70mI6X2emQWBFO44fgzs873HK7F8xM2gVdaqzgfQvKgsZa3if0DI4Y1kUnC2X4qHTDObPe4zTHVDuH0lIQ7ljwdEO7IHDdRrPwpzCZQj3QEE/8+FwHGD0u3hECRO6f1woe0Yc5Hyqpuw07yabtuiqL0NUXXDa60HlBtd046CP5tMS+xdU+00DRbkZFRoQZcNIFlCwbI95SUFHzi85urA26e91iGQp0X4T11aw9rdyXpR2HVRNFgddQyBgR37sB8M33skAO4Oc+YgSMaNxcsOff0lEpV2JJLWysqaX19QUM/DWgr+hwk15qT5EThaWqMhC4/F//5Mb05eIhd2jVAd0sFrZDkdirVqAagYYovAa5UCX/SNV6dZ2o1dBFfWz3j2afoT3RE5gbfOZlSTrOPVCoBDePENjVjXaPyqIczTY+mCkvY9c2tfKyd0Yg5AYR4uXQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13021025)(8121501046)(5005006)(13013025)(93006095)(93003095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0701MB1760; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0701MB1760; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0701MB1760; 4:7HchH0gUUFp/erd/shJkXUj6FeUBq/pemzr8HBJj?= JnWsZ/9HLmPBXvVIYE3zqLORDrBEe5bSSxYT5i8liW+XCc4pD/QYakGWO2EcAo3a2qaFOgeC7A76VaVtCZje6UFLyDLYrF5WS6r9ETNhFpOYZ97B3wPlPd9DhOumIyXU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xyS1BloZJusanuC/hbjGM6t2aFN8BtaO/nicfdU262dkYVosjmPSvuV8kTwD7+BdQSj0keEopQMdOaKXr07jK4jH69mql7SVWStosiDrbqFCalUGsTHDF7jAizcoXvBbJN4wsnJhA2VHdWgE6gEhckkUZaZBo3YJsj0pTzY4+JPp0TBBmTM95jhgDcI0eUoe/4sWPLOKdOestG+v5l7GSSRN9iNh/04A1NjU2xYX61bvw9YkZA3; 24:5fGHtRCXWmHauqQsIaYeyXPoXOnW/8zhUu2vQuFqXSnk/MwhCviRfqYyPkOrDKBSFx+mHRDQvRwB4PTCetmqaQQk6xJjg7aAYyIA6TNi5kU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1760; 7:smFDJb71MEXcdaFc+AfuI1Zu7Mq+Af0yAxfdDp6tWdTk6wPCDik9+YOfkk0ciz0R7SYnd3+Nz0xkYnmZjy8urLmYgiyNFS06oNYe4gI4kbZiIXzrUr5q8VEbdBsKhNnGWxgdV9TBSev3xpMyDO/H3C9L92jFoEJBfsDVgXHsUgnJONQCd09qki4pdtvcBYZYVdry6djpHyXRbww+/UIh5NiUlP3SMykg8zsqOxk33ttYyZ9nMbXZwu1kfbjxuaLVIjk0TOkfLJf4UuA2OBiMjmxqBi7YTm5ULS37j6ubzaOAxesIHUiI0vv4tclO03i4GEQwbsEtgnDtlAAw6oBeQA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 14:09:26.2798 (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: VI1PR0701MB1760 Subject: [lng-odp] [API-NEXT PATCH v2 2/3] api: ipsec: change IPSEC result to packet 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" Input and output of IPSEC operations are packets. Parameter and result structures are cleaner when packet arrays are direct parameters to functions. Also API is more flexible for application and API pipelining when output is packets with additional metadata. Application or API pipeline stages which do not care about IPSEC results may work on basic packet metadata. IPSEC result event type changes from ODP_EVENT_IPSEC_RESULT to ODP_EVENT_PACKET. Event subtype (ODP_EVENT_PACKET_IPSEC) can be used to identify packets with IPSEC metadata. Signed-off-by: Petri Savolainen --- include/odp/api/spec/ipsec.h | 412 +++++++++++++++++++++---------------- platform/linux-generic/odp_ipsec.c | 67 ++++-- 2 files changed, 279 insertions(+), 200 deletions(-) -- 2.13.0 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 65f0b066..372ef462 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -552,16 +552,18 @@ typedef enum odp_ipsec_frag_mode_t { /** * Packet lookup mode + * + * Lookup mode controls how an SA participates in SA lookup offload. + * Inbound operations perform SA lookup if application does not provide a SA as + * a parameter. In inline mode, a lookup miss directs the packet back to normal + * packet input interface processing. SA lookup failure status (error.sa_lookup) + * is reported through odp_ipsec_packet_result_t. */ typedef enum odp_ipsec_lookup_mode_t { - /** Inbound SA lookup is disabled. */ + /** Inbound SA lookup is disabled for the SA. */ ODP_IPSEC_LOOKUP_DISABLED = 0, - /** Inbound SA lookup is enabled. Lookup matches only SPI value. - * In inline mode, a lookup miss directs the packet back to normal - * packet input interface processing. In other modes, the SA lookup - * failure status (error.sa_lookup) is reported through - * odp_ipsec_packet_result_t. */ + /** Inbound SA lookup is enabled. Lookup matches only SPI value. */ ODP_IPSEC_LOOKUP_SPI, /** Inbound SA lookup is enabled. Lookup matches both SPI value and @@ -572,13 +574,13 @@ typedef enum odp_ipsec_lookup_mode_t { } odp_ipsec_lookup_mode_t; /** - * Result event pipeline configuration + * IPSEC pipeline configuration */ typedef enum odp_ipsec_pipeline_t { - /** Do not pipeline */ + /** Do not pipeline. Send all resulting events to the application. */ ODP_IPSEC_PIPELINE_NONE = 0, - /** Send IPSEC result events to the classifier. + /** Send resulting packets to the classifier * * IPSEC capability 'pipeline_cls' determines if pipelined * classification is supported. */ @@ -659,9 +661,9 @@ typedef struct odp_ipsec_sa_param_t { */ uint32_t mtu; - /** Select pipelined destination for IPSEC result events + /** Select pipelined destination for resulting events * - * Asynchronous and inline modes generate result events. Select where + * Asynchronous and inline modes generate events. Select where * those events are sent. Inbound SAs may choose to use pipelined * classification. The default value is ODP_IPSEC_PIPELINE_NONE. */ @@ -670,18 +672,19 @@ typedef struct odp_ipsec_sa_param_t { /** Destination queue for IPSEC events * * Operations in asynchronous or inline mode enqueue resulting events - * into this queue. + * into this queue. The default queue ('default_queue') is used when + * SA is not known. */ odp_queue_t dest_queue; - /** Classifier destination CoS for IPSEC result events + /** Classifier destination CoS for resulting packets * - * Result events for successfully decapsulated packets are sent to - * classification through this CoS. Other result events are sent to - * 'dest_queue'. This field is considered only when 'pipeline' is + * Successfully decapsulated packets are sent to classification + * through this CoS. Other resulting events are sent to 'dest_queue'. + * This field is considered only when 'pipeline' is * ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared between any pktio * interface default CoS. The maximum number of different CoS supported - * is defined by IPsec capability max_cls_cos. + * is defined by IPSEC capability max_cls_cos. */ odp_cos_t dest_cos; @@ -850,17 +853,6 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa); */ uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa); -/** - * IPSEC operation level options - * - * These may be used to override some SA level options - */ -typedef struct odp_ipsec_op_opt_t { - /** Fragmentation mode */ - odp_ipsec_frag_mode_t mode; - -} odp_ipsec_op_opt_t; - /** IPSEC operation status has no errors */ #define ODP_IPSEC_OK 0 @@ -870,7 +862,8 @@ typedef struct odp_ipsec_op_status_t { union { /** Error flags */ struct { - /** Protocol error. Not a valid ESP or AH packet. */ + /** Protocol error. Not a valid ESP or AH packet, + * packet data length error, etc. */ uint32_t proto : 1; /** SA lookup failed */ @@ -934,41 +927,70 @@ typedef struct odp_ipsec_op_status_t { } odp_ipsec_op_status_t; /** - * IPSEC operation input parameters + * IPSEC outbound operation options + * + * These may be used to override some SA level options */ -typedef struct odp_ipsec_op_param_t { - /** Number of packets to be processed */ - int num_pkt; +typedef struct odp_ipsec_out_opt_t { + /** Fragmentation mode */ + odp_ipsec_frag_mode_t mode; + +} odp_ipsec_out_opt_t; +/** + * IPSEC outbound operation parameters + */ +typedef struct odp_ipsec_out_param_t { /** Number of SAs * + * Outbound IPSEC operation needs SA from application. Use either + * single SA for all packets, or a SA per packet. + * * Valid values are: - * * 0: No SAs (default) - * * 1: Single SA for all packets - * * num_pkt: SA per packet + * - 1: Single SA for all packets + * - N: A SA per packet. N must match the number of packets. */ int num_sa; - /** Number of operation options + /** Number of outbound operation options * * Valid values are: - * * 0: No options (default) - * * 1: Single option for all packets - * * num_pkt: An option per packet + * - 0: No options + * - 1: Single option for all packets + * - N: An option per packet. N must match the number of packets. */ int num_opt; - /** Pointer to an array of packets + /** Pointer to an array of IPSEC SAs */ + odp_ipsec_sa_t *sa; + + /** Pointer to an array of outbound operation options + * + * May be NULL when num_opt is zero. + */ + odp_ipsec_out_opt_t *opt; + +} odp_ipsec_out_param_t; + +/** + * IPSEC inbound operation parameters + */ +typedef struct odp_ipsec_in_param_t { + /** Number of SAs * - * Each packet must have a valid value for these metadata: - * * L3 offset: Offset to the first byte of the (outmost) IP header - * * L4 offset: For inbound direction, when udp_encap is enabled - - * offset to the first byte of the encapsulating UDP - * header + * Inbound IPSEC operation processes a packet using the SA provided by + * the application. If the application does not provide an SA, the + * operation searches for the SA by matching the input packet with all + * inbound SAs according to the lookup mode (odp_ipsec_lookup_mode_t) + * configured in each SA. When passing SAs, use either single SA for + * all packets, or a SA per packet. * - * @see odp_packet_l3_offset(), odp_packet_l4_offset() + * Valid values are: + * - 0: No SAs. SA lookup is done for all packets. + * - 1: Single SA for all packets + * - N: A SA per packet. N must match the number of packets. */ - odp_packet_t *pkt; + int num_sa; /** Pointer to an array of IPSEC SAs * @@ -976,18 +998,12 @@ typedef struct odp_ipsec_op_param_t { */ odp_ipsec_sa_t *sa; - /** Pointer to an array of operation options - * - * May be NULL when num_opt is zero. - */ - odp_ipsec_op_opt_t *opt; - -} odp_ipsec_op_param_t; +} odp_ipsec_in_param_t; /** * Outbound inline IPSEC operation parameters */ -typedef struct odp_ipsec_inline_op_param_t { +typedef struct odp_ipsec_out_inline_param_t { /** Packet output interface for inline output operation * * Outbound inline IPSEC operation uses this packet IO interface to @@ -1011,7 +1027,7 @@ typedef struct odp_ipsec_inline_op_param_t { uint32_t len; } outer_hdr; -} odp_ipsec_inline_op_param_t; +} odp_ipsec_out_inline_param_t; /** * IPSEC operation result for a packet @@ -1020,16 +1036,6 @@ typedef struct odp_ipsec_packet_result_t { /** IPSEC operation status */ odp_ipsec_op_status_t status; - /** Number of output packets created from the corresponding input packet - * - * Without fragmentation offload this is always one. However, if the - * input packet was fragmented during the operation this is larger than - * one for the first returned fragment and zero for the rest of the - * fragments. All the fragments (of the same source packet) are stored - * consecutively in the 'pkt' array. - */ - int num_out; - /** IPSEC SA that was used to create the packet * * Operation updates this SA handle value, when SA look up is performed @@ -1040,7 +1046,8 @@ typedef struct odp_ipsec_packet_result_t { odp_ipsec_sa_t sa; /** Packet outer header status before inbound inline processing. - * This is valid only when status.flag.inline_mode is set. + * This is valid only when outer headers are retained + * (see odp_ipsec_inbound_config_t) and status.flag.inline_mode is set. */ struct { /** Points to the first byte of retained outer headers. These @@ -1048,7 +1055,7 @@ typedef struct odp_ipsec_packet_result_t { * implementation specific memory space. Since the memory space * may overlap with e.g. packet head/tailroom, the content * becomes invalid if packet data storage is modified in - * anyway. The memory space may not be sharable to other + * any way. The memory space may not be shareable to other * threads. */ uint8_t *ptr; @@ -1059,51 +1066,6 @@ typedef struct odp_ipsec_packet_result_t { } odp_ipsec_packet_result_t; /** - * IPSEC operation results - */ -typedef struct odp_ipsec_op_result_t { - /** Number of packets - * - * Application sets this to the maximum number of packets the operation - * may output (number of elements in 'pkt' and 'res' arrays). - * The operation updates it with the actual number of packets - * outputted. - */ - int num_pkt; - - /** Pointer to an array of packets - * - * Operation outputs packets into this array. The array must have - * at least 'num_pkt' elements. - * - * Each successfully transformed packet has a valid value for these - * metadata regardless of the inner packet parse configuration. - * (odp_ipsec_inbound_config_t): - * * L3 offset: Offset to the first byte of the (outmost) IP header - * * pktio: For inbound inline IPSEC processed packets, original - * packet input interface - * - * Other metadata for parse results and error checks depend on - * configuration (selected parse and error check levels). - */ - odp_packet_t *pkt; - - /** Pointer to an array of per packet operation results - * - * Operation outputs results for each outputted packet into this array. - * The array must have at least 'num_pkt' elements. The results include - * operation status and packet form information for each outputted - * packet. - * - * For example, some packets may not have been transformed due to - * an error, but the original packet is returned with appropriate - * packet result information instead. - */ - odp_ipsec_packet_result_t *res; - -} odp_ipsec_op_result_t; - -/** * IPSEC status ID */ typedef enum odp_ipsec_status_id_t { @@ -1136,20 +1098,33 @@ typedef struct odp_ipsec_status_t { * * This operation does inbound IPSEC processing in synchronous mode * (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of - * packets consumed and outputs a new packet handle as well as an operation - * result for each outputted packet. The operation does not modify packets that - * it does not consume. It cannot consume all input packets if 'output.num_pkt' - * is smaller than 'input.num_pkt'. + * packets consumed and outputs a new packet handle for each outputted packet. + * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t), + * which should be checked for transformation errors, etc. Outputted packets + * with error status have not been transformed but the original packet is + * returned. The operation does not modify packets that it does not consume. + * It cannot consume all input packets if 'num_out' is smaller than 'num_in'. * * Packet context pointer and user area content are copied from input to output * packets. Output packets are allocated from the same pool(s) as input packets. * - * When 'input.num_sa' is zero, this operation performs SA look up for each + * When 'param.num_sa' is zero, this operation performs SA look up for each * packet. Otherwise, application must provide the SA(s) as part of operation - * input parameters (odp_ipsec_op_param_t). The operation outputs used SA(s) as - * part of per packet operation results (odp_ipsec_packet_result_t), or an error + * input parameters (odp_ipsec_in_param_t). The operation outputs used SA(s) as + * part of per packet results (odp_ipsec_packet_result_t), or an error * status if a SA was not found. * + * Each input packet must have a valid value for these metadata (other metadata + * is ignored): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - L4 offset: When udp_encap is enabled, offset to the first byte of the + * encapsulating UDP header + * + * Additionally, implementation checks input IP packet length (odp_packet_len() + * minus odp_packet_l3_offset()) against protocol headers and reports an error + * (status.error.proto) if packet data length is less than protocol headers + * indicate. + * * Packets are processed in the input order. Packet order is maintained from * input 'pkt' array to output 'pkt' array. Packet order is not guaranteed * between calling threads. @@ -1162,35 +1137,61 @@ typedef struct odp_ipsec_status_t { * restored. The amount and content of packet data before the IP header is * undefined. * - * @param input Operation input parameters - * @param[out] output Operation results - * - * @return Number of input packets consumed (0 ... input.num_pkt) + * Each successfully transformed packet has a valid value for these metadata + * regardless of the inner packet parse configuration + * (odp_ipsec_inbound_config_t): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - pktio: For inline IPSEC processed packets, original packet input + * interface + * + * Other metadata for parse results and error checks depend on configuration + * (selected parse and error check levels). + * + * @param pkt_in Packets to be processed + * @param num_in Number of packets to be processed + * @param[out] pkt_out Packet handle array for resulting packets + * @param[in, out] num_out Number of resulting packets. Application sets this + * to 'pkt_out' array size. A successful operation sets + * this to the number of outputted packets + * (1 ... num_out). + * @param param Inbound operation parameters + * + * @return Number of input packets consumed (0 ... num_in) * @retval <0 On failure * - * @see odp_packet_user_ptr(), odp_packet_user_area() + * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset(), + * odp_packet_l4_offset() */ -int odp_ipsec_in(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output); +int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_in_param_t *param); /** * Outbound synchronous IPSEC operation * * This operation does outbound IPSEC processing in synchronous mode * (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of - * packets consumed and outputs a new packet handle as well as an operation - * result for each outputted packet. The operation does not modify packets that - * it does not consume. It cannot consume all input packets if 'output.num_pkt' - * is smaller than 'input.num_pkt'. + * packets consumed and outputs a new packet handle for each outputted packet. + * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t), + * which should be checked for transformation errors, etc. Outputted packets + * with error status have not been transformed but the original packet is + * returned. The operation does not modify packets that it does not consume. + * It cannot consume all input packets if 'num_out' is smaller than 'num_in'. * * Packet context pointer and user area content are copied from input to output * packets. Output packets are allocated from the same pool(s) as input packets. * * When outbound IP fragmentation offload is enabled, the number of outputted - * packets (and corresponding per packet results) may be greater than - * the number of input packets. In that case, application may examine 'num_out' - * of each packet result (odp_ipsec_packet_result_t) to find out which - * fragments are originated from which input packet. + * packets may be greater than the number of input packets. + * + * Each input packet must have a valid value for these metadata (other metadata + * is ignored): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - L4 offset: Offset to the L4 header if L4 checksum offload is requested + * + * Additionally, input IP packet length (odp_packet_len() minus + * odp_packet_l3_offset()) must match values in protocol headers. Otherwise + * results are undefined. * * Packets are processed in the input order. Packet order is maintained from * input 'pkt' array to output 'pkt' array. Packet order is not guaranteed @@ -1201,31 +1202,40 @@ int odp_ipsec_in(const odp_ipsec_op_param_t *input, * with IPSEC, etc headers constructed according to the standards. The amount * and content of packet data before the IP header is undefined. * - * @param input Operation input parameters - * @param[out] output Operation results + * Each successfully transformed packet has a valid value for these metadata: + * - L3 offset: Offset to the first byte of the (outmost) IP header + * + * @param pkt_in Packets to be processed + * @param num_in Number of packets to be processed + * @param[out] pkt_out Packet handle array for resulting packets + * @param[in, out] num_out Number of resulting packets. Application sets this + * to 'pkt_out' array size. A successful operation sets + * this to the number of outputted packets + * (1 ... num_out). + * @param param Outbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num_in) * @retval <0 On failure * - * @see odp_packet_user_ptr(), odp_packet_user_area() + * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset() */ -int odp_ipsec_out(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output); +int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_out_param_t *param); /** * Inbound asynchronous IPSEC operation * * This operation does inbound IPSEC processing in asynchronous mode. It - * processes packets otherwise identically to odp_ipsec_in(), but outputs all - * results through one or more ODP_EVENT_IPSEC_RESULT events with the following - * ordering considerations. + * processes packets otherwise identically to odp_ipsec_in(), but outputs + * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC + * subtype). The following ordering considerations apply to the events. * * Asynchronous mode maintains packet order per SA when application calls the * operation within an ordered or atomic scheduler context of the same queue. - * Resulting events for the same SA are enqueued in order and packet handles - * (for the same SA) are stored in order within an event. Packet order per SA at - * a destination queue is the same as if application would have enqueued packets - * there with odp_queue_enq_multi(). + * Resulting events for the same SA are enqueued in order. Packet order per SA + * at a destination queue is the same as if application would have enqueued + * packets there with odp_queue_enq_multi(). * * Packet order is also maintained when application otherwise guarantees * (e.g. using locks) that the operation is not called simultaneously from @@ -1239,29 +1249,31 @@ int odp_ipsec_out(const odp_ipsec_op_param_t *input, * may be processed simultaneously in both modes (initiated by this function * and inline operation). * - * @param input Operation input parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Inbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_in(), odp_ipsec_result() */ -int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); +int odp_ipsec_in_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_in_param_t *param); /** * Outbound asynchronous IPSEC operation * * This operation does outbound IPSEC processing in asynchronous mode. It - * processes packets otherwise identically to odp_ipsec_out(), but outputs all - * results through one or more ODP_EVENT_IPSEC_RESULT events with the following - * ordering considerations. + * processes packets otherwise identically to odp_ipsec_out(), but outputs + * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC + * subtype). The following ordering considerations apply to the events. * * Asynchronous mode maintains packet order per SA when application calls the * operation within an ordered or atomic scheduler context of the same queue. - * Resulting events for the same SA are enqueued in order and packet handles - * (for the same SA) are stored in order within an event. Packet order per SA at - * a destination queue is the same as if application would have enqueued packets - * there with odp_queue_enq_multi(). + * Resulting events for the same SA are enqueued in order. Packet order per SA + * at a destination queue is the same as if application would have enqueued + * packets there with odp_queue_enq_multi(). * * Packet order is also maintained when application otherwise guarantees * (e.g. using locks) that the operation is not called simultaneously from @@ -1273,14 +1285,17 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); * The function may be used also in inline processing mode, e.g. for IPSEC * packets for which inline processing is not possible. * - * @param input Operation input parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Outbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_out(), odp_ipsec_result() */ -int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); +int odp_ipsec_out_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param); /** * Outbound inline IPSEC operation @@ -1288,42 +1303,75 @@ int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); * This operation does outbound inline IPSEC processing for the packets. It's * otherwise identical to odp_ipsec_out_enq(), but outputs all successfully * transformed packets to the specified output interface, instead of generating - * result events for those. + * events for those. * * Inline operation parameters are defined per packet. The array of parameters - * must have 'op_param.num_pkt' elements and is pointed to by 'inline_param'. + * must have 'num' elements and is pointed to by 'inline_param'. * - * @param op_param Operation parameters - * @param inline_param Outbound inline operation specific parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Outbound operation parameters + * @param inline_param Outbound inline operation specific parameters * - * @return Number of packets consumed (0 ... op_param.num_pkt) + * @return Number of packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_out_enq() */ -int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, - const odp_ipsec_inline_op_param_t *inline_param); +int odp_ipsec_out_inline(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param, + const odp_ipsec_out_inline_param_t *inline_param); + +/** + * Convert IPSEC processed packet event to packet handle + * + * Get packet handle to an IPSEC processed packet event. Event subtype must be + * ODP_EVENT_IPSEC_PACKET. IPSEC operation results can be examined with + * odp_ipsec_result(). + * + * @param ev Event handle + * + * @return Packet handle + * + * @see odp_event_subtype(), odp_ipsec_result() + */ +odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev); /** - * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event + * Convert IPSEC processed packet handle to event + * + * The packet handle must be an output of an IPSEC operation. * - * Copies IPSEC operation results from an event. The event must be of - * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes - * any resulting packet handles to other ODP calls. + * @param pkt Packet handle from IPSEC operation * - * @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 Event handle + */ +odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt); + +/** + * Get IPSEC operation results from an IPSEC processed packet * - * @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. + * Successful IPSEC operations of all types (SYNC, ASYNC and INLINE) produce + * packets which contain IPSEC result metadata. This function copies the + * operation results from an IPSEC processed packet. Event subtype of this kind + * of packet is ODP_EVENT_PACKET_IPSEC. Results are undefined if a non-IPSEC + * processed packet is passed as input. + * + * Some packet API operations output a new packet handle + * (e.g. odp_packet_concat()). IPSEC metadata remain valid as long as the packet + * handle is not changed from the original (output of e.g. odp_ipsec_in() or + * odp_ipsec_packet_from_event() call) IPSEC processed packet handle. + * + * @param[out] result Pointer to operation result for output + * @param packet An IPSEC processed packet (ODP_EVENT_PACKET_IPSEC) + * + * @retval 0 On success * @retval <0 On failure * - * @see odp_ipsec_in_enq(), odp_ipsec_out_enq() + * @see odp_ipsec_in(), odp_ipsec_in_enq(), odp_ipsec_out(), + * odp_ipsec_out_enq(), odp_ipsec_packet_from_event() */ -int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event); +int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet); /** * Get IPSEC status information from an ODP_EVENT_IPSEC_STATUS event diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index 10918dfb..c7eeb4ec 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -73,51 +73,68 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa) return -1; } -int odp_ipsec_in(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output) -{ - (void)input; - (void)output; +int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_in_param_t *param) +{ + (void)pkt_in; + (void)num_in; + (void)pkt_out; + (void)num_out; + (void)param; return -1; } -int odp_ipsec_out(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output) +int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_out_param_t *param) { - (void)input; - (void)output; + (void)pkt_in; + (void)num_in; + (void)pkt_out; + (void)num_out; + (void)param; return -1; } -int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input) +int odp_ipsec_in_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_in_param_t *param) { - (void)input; + (void)pkt; + (void)num; + (void)param; return -1; } -int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input) +int odp_ipsec_out_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param) { - (void)input; + (void)pkt; + (void)num; + (void)param; return -1; } -int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, - const odp_ipsec_inline_op_param_t *inline_param) +int odp_ipsec_out_inline(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param, + const odp_ipsec_out_inline_param_t *inline_param) { - (void)op_param; + (void)pkt; + (void)num; + (void)param; (void)inline_param; return -1; } -int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event) +int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet) { (void)result; - (void)event; + (void)packet; return -1; } @@ -145,6 +162,20 @@ void *odp_ipsec_sa_context(odp_ipsec_sa_t sa) return NULL; } +odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev) +{ + (void)ev; + + return ODP_PACKET_INVALID; +} + +odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt) +{ + (void)pkt; + + return ODP_EVENT_INVALID; +} + uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa) { return _odp_pri(sa); From patchwork Wed Jun 14 14:08:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 105523 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp312222qgd; Wed, 14 Jun 2017 07:09:17 -0700 (PDT) X-Received: by 10.237.41.162 with SMTP id o31mr365698qtd.82.1497449357097; Wed, 14 Jun 2017 07:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497449357; cv=none; d=google.com; s=arc-20160816; b=JRt1Tn2eTKPRxekget9XXrfAMsq34wl/okbVSz89YELhZSip4hf6+c5Jjr3dbqjyRa E3HsBtNtcPRkOVhOGC3LiJSJ8Y768YK+8JMUKQq/EBmpHou02lgPuZhAOtN/SH7A771G ln/O+UsARhV/S6iWFKe2bzQPlsNtzilKKk1uiwSE0zeVEkPnxgVibD7LdVORBiGA89N/ cJ6CZtgbckZpYXq3QRJNn+1nMQ8KE2wJ5f0EVnnby0h7/ox4sWXv619OFTqTDOKCQOkB c0j7SdhL0BMmA6bSxXWazDdD25g00dBFuZrZzrc7J6jmtxXRoLBQcGSvILEfsUOO1gLN xGyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=XH3VcuCkgTwQLlKmcFpTrqpYdD7cRMhpQ05zCnIAsLE=; b=kp2jv9FRwbK8RLlrTIEknSP9HRgB1uj7k0x8J5415N8CTRnCaid+6TDmR4snL4bGrd xytkvfFmhe9dswbT+zWDfDsTc4xK1r4FBY7bijG8KYk+NBgwFjo4D7Wz8MEyB0DJQSJO N1TplOy0aHjYASQFmUjA3ETf/zVjUAitElAHSddUd+RfsPIwdAz9Y6l1lpYLirdw/xmD Z98kNgPmLoqvXC8mqrzLmDVqFOuqmuLb7bjUcqH03P6NXqV9/M/qlLndQlIKjVdsYfcB XD8Iod1T8VDJGV60Kxx2/FMg5zlMtU2FSHFt44NR3/8i/aOoP7u9v3apB9EXoBHBrgv6 tMKQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k16si91225qtc.263.2017.06.14.07.09.16; Wed, 14 Jun 2017 07:09:17 -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 A858A60969; Wed, 14 Jun 2017 14:09:16 +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.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 2F0A560687; Wed, 14 Jun 2017 14:09:12 +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 E3F026091C; Wed, 14 Jun 2017 14:09:09 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30099.outbound.protection.outlook.com [40.107.3.99]) by lists.linaro.org (Postfix) with ESMTPS id AA5C660655 for ; Wed, 14 Jun 2017 14:09:08 +0000 (UTC) Received: from DB6PR07CA0142.eurprd07.prod.outlook.com (2603:10a6:6:16::35) by AM5PR0701MB1745.eurprd07.prod.outlook.com (2603:10a6:203:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10; Wed, 14 Jun 2017 14:09:07 +0000 Received: from DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by DB6PR07CA0142.outlook.office365.com (2603:10a6:6:16::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10 via Frontend Transport; Wed, 14 Jun 2017 14:09:07 +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 DB5EUR03FT057.mail.protection.outlook.com (10.152.20.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1157.12 via Frontend Transport; Wed, 14 Jun 2017 14:09:07 +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 v5EE8lrV019856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +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 v5EE8lS2019837 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 14 Jun 2017 17:08:47 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 14 Jun 2017 17:08:47 +0300 Message-ID: <20170614140847.30399-4-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170614140847.30399-1-petri.savolainen@linaro.org> References: <20170614140847.30399-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; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39860400002)(39400400002)(39850400002)(39450400003)(39410400002)(2980300002)(189002)(199003)(9170700003)(6916009)(53936002)(77096006)(5660300001)(356003)(498600001)(2950100002)(22756006)(48376002)(1076002)(50466002)(50226002)(86362001)(33646002)(47776003)(81166006)(189998001)(8676002)(105596002)(2351001)(50986999)(76176999)(106466001)(38730400002)(2906002)(5003940100001)(36756003)(110136004)(8936002)(305945005)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0701MB1745; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT057; 1:ryhqKDnMEwiSsB8OrYJCAT5l3wQ94s0jPfFE9BjoR+LjkTFK3i7Oj8jfrC7o6qOnlqqR1WqRVgCpINRgmLVui6p5kBrS0UexaAwVW/DgD5rmMyfKpBm/0LSSji+oxw6E96j2wzUn2M4FtlwSiYD6OfKCylBpQufolgkrx1sWuD/SSiRVOdid5+O+Hz2znxr/bn0V34KuS1Akehe4gkA/ae/v2NMAJ2HdTKKnJBGqWLsFzzuh+eF5awqJ3P/8PgmK2kGByqMP/vgxXjqZr2PqbkTxN4ZdfOxI60lZaVK4zfXGjdankOvY/Q0j1FoaGUBRcuaWzhKfRNSipdy9zxcTcYat+m/knDH+eesE4b9gKNUPyw3mXTIlYReuptxUy4SnsOHGZ/XiWE0F5+G0F2nN0SBXFLPDoansL/mQzP8jrhON61bu0lY1uErmLgBlxWxwLBNz1J4mmtdYdnltR+xPzxo2kXNpzgTQcL4YgztkEtKvhd22V9eg8JRDka+F72LoihV6qcpH4lO2Mb2NP4abPwwdt00Ezo+xS9CdjOEgIek= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e97fddd-c118-4309-f600-08d4b32eebe7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM5PR0701MB1745; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB1745; 3:uWIH0PN9/sNUUC8MhqVKorjOYvTFCSjMiU+nUEOVScIPCcaZ4rdKpiqfCnxG4WoQCnW2pLW1+s0W55aafHn6hYU0dORDo0A1q2KbtaFc8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y2B3DrMeDSupcHrpr9AuKr/k94tVmsxbbWCTC3WKLUMHi+AlxtzLcjbfXTUdZTB/d05/FeakPZheRihnDAQGts368WS6USq8NMU4pBCg/GvP659eTiF1Yc4oI+WO18HaI6msJOe8Rz7Iy2Zg== X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB1745; 20:ueTsCRLylC0zmRYiClONoKAQ4km6RQ6Vhg5slrOpB4v/Jsv/8lE+QrStRTzGBJAYh9O/lvdl2Wp6X+48fJKPXnaU2Ulev07Zx0mUEGPsS2EPCAbQW7ATlXYA5R7XL7eJ/T1jV+R7IJTuGEMMlUhEKfDZK+KP3QJcLL5DgzJ06GGxdlhhU6ifFQCKHDh8zmgVBnjlJhsfE3l0o7JWFIYngee3v8U16m71S/giTrp6PM9ZIVL8eaiCx7vy+w2uJMbWvHyJM77fAZDrTWx7ibeeeKkrx6IIsorIL9nzr/zH4ATitxh2+F1MJHFqxE01J5HvYPRhyydzjDcebE4kj5t9vzGLPFTkRkMnIl9buewWAJ74MUagiTpsfiKq9Xn0ctQj8vbtXcm+5008EMmiYHPQ7c4+LQKQeCR9du/50hk8ExLIcd1TcRjn+7eFthNQUUpDTzJTGXvhDXtqINwh03uCct8SZsIGVd/Cp6tBYFCULEy//Ja7iNvV3gdkT7g45SmNkn9C+DKHttgQQiJgQ+3qUkgs8s0IaP05rSSs4izSn2kkeOG0U4NfRb236xpfxOgRalUhPnBf4ofgeFG8BeRNZOMTGwUvLaYPQc3n1p8lcfE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13021025)(5005006)(8121501046)(13013025)(93006095)(93003095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123564025)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0701MB1745; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0701MB1745; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0701MB1745; 4:YDKOSct8eQQDNmg3mrhu8KX1wjPZtRUETGh4x/JX?= MLXLkpXprXna/myT96SNm0JMU7Gson9J9ftTyb2fGeJ/LSRFgsD+R7mfJtDobygccN9X82TpXl+xdXmG1rHJeRTPG2m9Mz93lltrhFe4eqJhcanHpOqDGsi8RAsxAL1+crgK5Xtd6zsscjZwZ/hC9YfeWbLHzwpCAqPWr7cvoTIBksoLViC4R87ZbweOeYFWACEXRe1Z/2nwLIjtuOFEdXQcPmxNIZ5/Ie1e/ZM5BF4tLPJdcBq5fT5ZjSZcqFIoDvH1hypeU1ZBKSBys4divBJ9AA4myiaIfzlfkpiAntG4V71rQWJjwIcbI5MUizbsXIp1YmCIKM5WxSeQSX/sQjlnvU5p/ji3Lsgq+sUxoOsDgHfFseKOs6gDdeZOeOAnNlWPeV4Jyp38YyXaI344zm3UhomKosFgX9CqWpK0b8CnzLi9LX3s+RVEnp0efXHMT8rM6nMZnu8axF7XStGyRoGpQkKdKm8DoE3FUFsRlW0LYBcAvHpyjW6+ZdiE8eeTgFWmuAnaygH5/d2HfHE9B9EjG2zRcXY0Q/iiKYPc0Mtps0tkIuz+JDbvpOk5YsH3NLCb6BJDuDoJ7Taah9LlcFj1G63U8J1oqbpLjW0WZ9KdtWz8ecZBrR2/NeMsw3zvgAfr75BKft1DbI680w3n4hnch5jDD4iIuOok+nvenisvAzil6D24J+D11vhd9FjtRmE/5RFgeychVBbnvwXytSlprSNOwhjLzlmZ3DdLlIEHeczoGDAoM7f7jQyubO5sNTiUNx0BRU0sOX9UxrcQ7xqgDrpFxLOB6BoO4svgJiIo5MM43HT6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OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 14:09:07.1766 (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: AM5PR0701MB1745 Subject: [lng-odp] [API-NEXT PATCH v2 3/3] api: ipsec: disable event is the last 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" Disable event is guaranteed to be the last event for the SA, so that application can use it for SA destroy synchronization. Signed-off-by: Petri Savolainen --- include/odp/api/spec/ipsec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.13.0 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 372ef462..e602e4b8 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -818,7 +818,10 @@ odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param); * * When in synchronous operation mode, the call will return when it's possible * to destroy the SA. In asynchronous mode, the same is indicated by an - * ODP_EVENT_IPSEC_STATUS event sent to the queue specified for the SA. + * ODP_EVENT_IPSEC_STATUS event sent to the queue specified for the SA. The + * status event is guaranteed to be the last event for the SA, i.e. all + * in-progress operations have completed and resulting events (including status + * events) have been enqueued before it. * * @param sa IPSEC SA to be disabled *