From patchwork Fri Mar 24 15:04:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 95958 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp88370qgd; Fri, 24 Mar 2017 08:05:58 -0700 (PDT) X-Received: by 10.200.58.101 with SMTP id w92mr9083138qte.292.1490367958331; Fri, 24 Mar 2017 08:05:58 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h26si2114380qkh.256.2017.03.24.08.05.58; Fri, 24 Mar 2017 08:05:58 -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 BE340642E7; Fri, 24 Mar 2017 15:05:48 +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_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 EBE0560F59; Fri, 24 Mar 2017 15:05:11 +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 1BFC360F26; Fri, 24 Mar 2017 15:05:07 +0000 (UTC) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40123.outbound.protection.outlook.com [40.107.4.123]) by lists.linaro.org (Postfix) with ESMTPS id 4BEF560D39 for ; Fri, 24 Mar 2017 15:05:00 +0000 (UTC) Received: from AM5PR0701CA0061.eurprd07.prod.outlook.com (10.169.145.151) by VI1PR07MB1005.eurprd07.prod.outlook.com (10.161.110.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.947.2; Fri, 24 Mar 2017 15:04:58 +0000 Received: from VE1EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by AM5PR0701CA0061.outlook.office365.com (2603:10a6:203:2::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2 via Frontend Transport; Fri, 24 Mar 2017 15:04:57 +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 VE1EUR03FT025.mail.protection.outlook.com (10.152.18.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 15:04:57 +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 v2OF4fd2018370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 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 v2OF4fE4018344 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 24 Mar 2017 17:04:38 +0200 Message-ID: <1490367881-16266-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 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)(39850400002)(39450400003)(39410400002)(39860400002)(39840400002)(2980300002)(189002)(199003)(9170700003)(33646002)(50466002)(5003940100001)(50226002)(6916009)(81166006)(575784001)(47776003)(305945005)(8676002)(77096006)(38730400002)(106466001)(8936002)(2351001)(105596002)(110136004)(48376002)(6666003)(2906002)(53936002)(50986999)(86362001)(22756006)(189998001)(36756003)(356003)(5660300001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB1005; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT025; 1:fTpzN3qWsQ4AIQhIQ/36VbpvkurrqZ26KMDGxl9+VDQ4k05aSBWCQNM+yklHn4ZIrPGeXgFapvqJgiSenhp9dXRATJDAXPNSJ+tsGaKLKQ18/qkcTNyiU02Q2I9VKpjWU2KgoW25wJA3IEAOew8sDR+8ItqvsRrT0pNxsgJrzeVXFURB2EDiO0t35raA4Lw6ing+up1VO8sDfDbLttnbsEPLAcOysLyhQAO5OJIkRSAdi/Zzc8uPasuWeil4QTSm57vbocBexDKoEHWctsaSI5i92rsDMp5bX0PMpx2K9AaQ+7nRVJquw8GZADcG2ZyLJFrsqFn2LNd+zqR+BNizQFl0YPmldq76RtfaqL6fPfeiU4YXMiYoCmLF2yGR9yGbAlniBbq54Hbuah3FBdOK1/xErlfA+lM4MkY6N51FTERNIzcuuRl/Ar5PVa7cblqcJIFtrxTdekADX/gcDKOucT47uxR7zp0cZou7ipbrPuU5fnJXQEJhtMOzMZ+Q4GY8 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 25c578f4-6aa9-4d5d-6325-08d472c72318 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075); SRVR:VI1PR07MB1005; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 3:3xUfRAuJJnBlysov2ZnzejRYqtRWH41cSIiB8dTi5xSWSyTFVNRtiRqUpz3R4Ygj3Xk10v+OBsZIWPHf/+88GOKPLLJoKrHrgoZ1zapBQIviGQOT57V9qhjn8BsowTphGyT9xHnD+9i6Jwes4E+3ZxsagmTrkSnPUDI0k12wFVJupOqzur8ub8nSp5sXOUz3+n68QcT8fxTJZjm2q26Hiq36c16N9sOyvEhXnpHWiCjOXhVn2oy3yokfII6L7XiBWGUPUS3VM6BUmhdOF0EJ3APKTjANtpGopCce0pl6rferialQmdJ4V/eh2i2w+nEjegKTH6dnFMRkBqFsYDOA02tHXV7ygf0eSf7Y7rY2dRIz1NxA+n80+cYcyxK10QfTSuu+jbgBTX78BJjMWKUD7g==; 25:Zn8AhRJQYtXm1kjdrcGZsJFJEuT6xjmvCBg7qzJloQ42fxG7OCgLSnhfgiBUJUae8Fti0083dJMRjUZR1VTEGdEvP+tRjilox0t+Kl+rC4KfNwJjLomM4o4ASVo7goLoc/Kw4hMwCHi3E2n8QsGyDDknB65R0VHImTmNt5bYXSWP47ONn+d9Mnwn2P0dTkJ4IgSRWCf7uqcJUyxFVN6HaaOp8m9d/TFqDuXtRvZNB98to6ffD5aSKJynY8LkwuzkR1m4YcwNBFlundo6hBeFFNCEUYZ0yZ8W9mPSL2YZFQpt+iboiMaom3Uk1lGW3rnljhRvYW8NZiZJiszDJOXpPoGah55rzSEQqFKF7PwTVIx4gCwI1hU2z9+tmVGTjn3iDiaW0pwrs1eVi03M8jsCIYUSd1F47JRc1pmq++yWqBHHAEUMr3mZ0+mmtIQ90w0Wl/tTPmO7XjfLQ+lZ/hbdLA== X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 31:3i9vEdJ2qTID5fAIor8HQjSch6iAzBh5BI9BjMD7zJDXwFp7lFz8K4EDO3Pvwcny2PQJEnIgSmoQ6MFU7ZzYFZh3yreg7o1L4MzfNYbQraMT00uyfR02/woOdDGRbuJofjL/uqXh65JnJYW1ElMBN7/kB2IcpXX4YaZwAo4/S6arlAcKOGQAkNTkd9NlU7P+/2U4rEu5Ig6RrkQIHEHtuKKFWPTgwidh5UawClor6fM7xkkzrOfYpLeDBUh6Lmpl; 20:tDu3eOgk/E94g4cSmxonGPKr57ikMU9DSz9G/NEZXQrNl7+uBYahk1aNlro9m0gOdbH/Aup6G9Kga0jjZpQZ40YvTmi7HVYYRgI9O6eiu6W7sBMT7ehM+TK3DL44s2N09hVYuvlmIn95E5aUHeDQDOWLfAxoRMn6qogV6fvlgCiNPG86TX2/FE3FD4LPIdKLHT1MEB0eNyFrIvWA+TXX3wD3Zifd6WFRdoSeN/BeP6Haqer1JGgNGEVCKtbOoAt12XsxXs6sNckKFth7zyoC5cr+QDY2QlNKJlN65pTbxpk4LB2PfJCq1c05dmss8HEiQwqcV1MVstrgz5PvFeDnCqDfAKwajTsz9LTCXCsGPsrMOki8xrZWpNgXXGnL3wscSL7mnp/qDGAoFDJKLNR0beY2D12l1RUCWBOfcAVxfGwQVM0PVhxubmT+x/Il8gmeBEFxkx4M5gvtjbXR0hYRv687+XdekP9/SRcaZ/naiKvM5UP+q+uUByrvTgZADul/A4v+MzusBYLMAzLaB7f3vW/BYOqK9dSYPry0XNWwoJdNHP1Glf3Z4u/oF036BxWRcrF6pMCJRA6bUKgsjVFVmRLcKGjRJMOSIL8rpQ+/ET4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(13023025)(13021025)(13013025)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558025)(20161123555025)(20161123564025)(6072148); SRVR:VI1PR07MB1005; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB1005; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 4:cuWDJJaxizK2/+4UjweBt0LiJHC56lDtZKpToJkCI07x+w2BmbXQ7TgwClImlkh6RCSADyBtd8LyfmgpFyd5lKapZYTv9Fey6JjFphpmzdLlEFT8bMXvj+AgpgTDWuWpQglp2s+D2o67/HQ2CxhA4mricoI/5mcT9EnrHy5V79PwitfkFH43C1RgxhRyzTukeBLceRnoHLy6F3vGA0Nih98QsXWGp+QBl+L1fk8FynsjFPVMda5SU4D6qynB5kg9oSrXr50iF6d4URnErhgGiIqZgzojpKonRb2grWIMfvpsxZkMukitwdKVFSWf6mhND3VgTYwJ5AJWUQdqWlcQ9dFrNlPClpbIWVyJ5HlrlvvCxl54YqLRuFs8i9nTeMG6RWpMxAVLKB2p0Hc/FyFQ5bdAh8uXCmPea3NnyKjZ6Z6QvQnFdCXkMuiq8thgrqkjHCcln45fN468QB6ulBzRs4iTn4fY/D1ZsHB5Al9GmWTuEbTgkZV90cktyHgBNpmGA2qFrvwZY1wz5kO9QC6njnwh4Ne5xwVPufYdml0ZDMaR4b+m7jiiqLpIuiyscZPlmsW/EGruYeWygWFjnu0XezP3xZ3kk+x1Kaq6+yeDy9JgA+0EsdEHNyEkMWJOgXBzRFGyz2VfUaaxP0DflgjG7UcXx+xcABqDQuKVzaanXfPQenX9sTvzh1S8zjLEhHAB X-Forefront-PRVS: 0256C18696 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR07MB1005; 23:3M9wvplwboLheMI21enenCU/cVLFiViy+wXHehuxs?= /T5JQfJGdQFHnUYjacaMoghoKwraA/snUuydGBKfRRF/kYvVJNUSIRRCZulN/+Ce4ZYoMo+lffNuOVmxrjhm0/xo00j7OJ5h7fhhg5T0U4lFMhkAz5wF0fzjgDQxDZH30vIArBUf4BhYNb+1wqj1JK9vHqeLuwcYtKFkZnj8qBTHmb9r/Ivh7VI1rO4ZvrMh8CbWdN+s3xh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/is17lhW080uQTYXVISLQjc8yElo1q74JJG2shgXwXUGNNjC9M7l6QFVlH3NLuoEWDsjut8mUUrgBG88bioDj/gXzNAY9go0WNtMYE5iYdKqiYlOKDRUiGi5vsRcixd98Y+OY4uwXnv0zqDdTIkCKqhUgUY8=; 5:GaOs1yRoJV6rYIVb7JWTXTqWkzfxV+j/fQ03ier6RQXoQX5mAmidh8noqvkbAJT6+DBWXVeheBHbwCHgA9ON5n85DrrFnMB54XS1+isbzlir+9FIsMKgXcnQc+AukfkzlQDzCe+c81INPkE00/cCvQ==; 24:mcC0xydMZx4onTJY+OFyxgPwR8Mkj5AsJAxjv8WzyF7tYes+xSFjVCfNqUfMyEiImvR59lDGJBkokqxF2At5EwI4qGv54Y7lNFH7ZRLfcOo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 7:l9FBYcIxR57sj/PGy1CJ2RKpoLbycNKyi4uDFreEkYilRDbl5H8PyAPMSjMd6UEcXekG+LSPJbtIBTlqaRNsW5C1O44esEw3w1SlvvLdM+ivTENG8grWnym5srzV06EwbIYk91K66hjvUKg1nGsRjiqPYeIqGZVemwuOlzP712tRjGLpFbgNb9fGjfIYwYmF8XJoDocsmKECrovEXzBZTWJodC6HQdY9izXQhEtGvVwUpQqeUizXs0YuL4BiT6Iy/BZdIfvku19uP/tR/1lWMK2fDQUnqaVD5bFkyRmhFLyGNLLUT74whCmurP13yNR65dquq65ppE3pFo9FReGaHA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 15:04:57.6910 (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: VI1PR07MB1005 Subject: [lng-odp] [API-NEXT PATCH v3 1/4] api: ipsec: extend lookaside API 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 configuration option for inbound SPI range (for lookups). Removed unique SPI requirement and added config option for overlap. Added default queue for lookup misses. Added SA disable function and status event for the response from it. The same event may be used for e.g. IPSEC statistics, etc queries. Improved outbound fragmentation documentation. Signed-off-by: Petri Savolainen --- include/odp/api/spec/event.h | 2 +- include/odp/api/spec/ipsec.h | 191 +++++++++++++++++++++++++++++++++---------- 2 files changed, 151 insertions(+), 42 deletions(-) -- 2.8.1 diff --git a/include/odp/api/spec/event.h b/include/odp/api/spec/event.h index 75c0bbc..f22efce 100644 --- a/include/odp/api/spec/event.h +++ b/include/odp/api/spec/event.h @@ -39,7 +39,7 @@ 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_CRYPTO_COMPL, ODP_EVENT_IPSEC_RESULT, ODP_EVENT_IPSEC_STATUS */ /** diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 66222d8..d3e51bc 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -56,6 +56,34 @@ typedef enum odp_ipsec_op_mode_t { } odp_ipsec_op_mode_t; /** + * Configuration options for IPSEC inbound processing + */ +typedef struct odp_ipsec_inbound_config_t { + /** Default destination queue for IPSEC events + * + * When inbound SA lookup fails in asynchronous or inline modes, + * resulting IPSEC events are enqueued into this queue. + */ + odp_queue_t default_queue; + + /** Constraints for SPI values of inbound SAs for which lookup is + * enabled. Minimal range size and unique SPI values may improve + * performance. */ + struct { + /** Minimum inbound SPI value. Default value is 0. */ + uint32_t min; + + /** Maximum inbound SPI value. Default value is UINT32_MAX. */ + uint32_t max; + + /** Inbound SPI values may overlap. Default value is 0. */ + odp_bool_t overlap; + + } spi_lookup; + +} odp_ipsec_inbound_config_t; + +/** * IPSEC capability */ typedef struct odp_ipsec_capability_t { @@ -111,6 +139,13 @@ typedef struct odp_ipsec_config_t { */ odp_ipsec_op_mode_t op_mode; + /** Maximum number of IPSEC SAs that application will use + * simultaneously */ + uint32_t max_num_sa; + + /** IPSEC inbound processing configuration */ + odp_ipsec_inbound_config_t inbound; + } odp_ipsec_config_t; /** @@ -349,8 +384,10 @@ typedef enum odp_ipsec_lookup_mode_t { /** Inbound SA lookup is disabled. */ ODP_IPSEC_LOOKUP_DISABLED = 0, - /** Inbound SA lookup is enabled. Used SPI values must be unique. */ - ODP_IPSEC_LOOKUP_IN_UNIQUE_SA + /** Inbound SA lookup is enabled. Lookup matches only SPI value. + * SA lookup failure status (error.sa_lookup) is reported through + * odp_ipsec_packet_result_t. */ + ODP_IPSEC_LOOKUP_SPI } odp_ipsec_lookup_mode_t; @@ -529,6 +566,29 @@ void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param); odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param); /** + * Disable IPSEC SA + * + * Application must use this call to disable a SA before destroying it. The call + * marks the SA disabled, so that IPSEC implementation stops using it. For + * example, inbound SPI lookups will not match any more. Application must + * stop providing the SA as parameter to new IPSEC input/output operations + * before calling disable. Packets in progress during the call may still match + * the SA and be processed successfully. + * + * 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. + * + * @param sa IPSEC SA to be disabled + * + * @retval 0 On success + * @retval <0 On failure + * + * @see odp_ipsec_sa_destroy() + */ +int odp_ipsec_sa_disable(odp_ipsec_sa_t sa); + +/** * Destroy IPSEC SA * * Destroy an unused IPSEC SA. Result is undefined if the SA is being used @@ -567,55 +627,59 @@ typedef struct odp_ipsec_op_opt_t { #define ODP_IPSEC_OK 0 /** IPSEC operation status */ -typedef union odp_ipsec_status_t { - /** Error flags */ - struct { - /** Protocol error. Not a valid ESP or AH packet. */ - uint32_t proto : 1; +typedef struct odp_ipsec_op_status_t { + union { + /** Error flags */ + struct { + /** Protocol error. Not a valid ESP or AH packet. */ + uint32_t proto : 1; - /** SA lookup failed */ - uint32_t sa_lookup : 1; + /** SA lookup failed */ + uint32_t sa_lookup : 1; - /** Authentication failed */ - uint32_t auth : 1; + /** Authentication failed */ + uint32_t auth : 1; - /** Anti-replay check failed */ - uint32_t antireplay : 1; + /** Anti-replay check failed */ + uint32_t antireplay : 1; - /** Other algorithm error */ - uint32_t alg : 1; + /** Other algorithm error */ + uint32_t alg : 1; - /** Packet does not fit into the given MTU size */ - uint32_t mtu : 1; + /** Packet does not fit into the given MTU size */ + uint32_t mtu : 1; - /** Soft lifetime expired: seconds */ - uint32_t soft_exp_sec : 1; + /** Soft lifetime expired: seconds */ + uint32_t soft_exp_sec : 1; - /** Soft lifetime expired: bytes */ - uint32_t soft_exp_bytes : 1; + /** Soft lifetime expired: bytes */ + uint32_t soft_exp_bytes : 1; - /** Soft lifetime expired: packets */ - uint32_t soft_exp_packets : 1; + /** Soft lifetime expired: packets */ + uint32_t soft_exp_packets : 1; - /** Hard lifetime expired: seconds */ - uint32_t hard_exp_sec : 1; + /** Hard lifetime expired: seconds */ + uint32_t hard_exp_sec : 1; - /** Hard lifetime expired: bytes */ - uint32_t hard_exp_bytes : 1; + /** Hard lifetime expired: bytes */ + uint32_t hard_exp_bytes : 1; - /** Hard lifetime expired: packets */ - uint32_t hard_exp_packets : 1; - } error; + /** Hard lifetime expired: packets */ + uint32_t hard_exp_packets : 1; - /** All bits of the bit field structure - * - * This field can be used to set, clear or compare multiple flags. - * For example, 'status.all != ODP_IPSEC_OK' checks if there are any - * errors. - */ - uint32_t all; + } error; -} odp_ipsec_status_t; + /** All error bits + * + * This field can be used to set, clear or compare multiple + * flags. For example, 'status.all_error != ODP_IPSEC_OK' + * checks if there are + * any errors. + */ + uint32_t all_error; + }; + +} odp_ipsec_op_status_t; /** * IPSEC operation input parameters @@ -673,14 +737,15 @@ typedef struct odp_ipsec_op_param_t { */ typedef struct odp_ipsec_packet_result_t { /** IPSEC operation status */ - odp_ipsec_status_t 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 fragment and zero for the rest of the fragments - * (following the first one in the 'pkt' array). + * 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; @@ -745,6 +810,34 @@ typedef struct odp_ipsec_op_result_t { } odp_ipsec_op_result_t; /** + * IPSEC status ID + */ +typedef enum odp_ipsec_status_id_t { + /** Response to SA disable command */ + ODP_IPSEC_STATUS_SA_DISABLE = 0 + +} odp_ipsec_status_id_t; + +/** + * IPSEC status content + */ +typedef struct odp_ipsec_status_t { + /** IPSEC status ID */ + odp_ipsec_status_id_t id; + + /** Return value from the operation + * + * 0: Success + * <0: Failure + */ + int ret; + + /** IPSEC SA that was target of the operation */ + odp_ipsec_sa_t sa; + +} odp_ipsec_status_t; + +/** * Inbound synchronous IPSEC operation * * This operation does inbound IPSEC processing in synchronous mode @@ -897,6 +990,22 @@ int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event); /** + * Get IPSEC status information from an ODP_EVENT_IPSEC_STATUS event + * + * Copies IPSEC status information from an event. The event must be of + * type ODP_EVENT_IPSEC_STATUS. + * + * @param[out] status Pointer to status information structure for output. + * @param event An ODP_EVENT_IPSEC_STATUS event + * + * @retval 0 On success + * @retval <0 On failure + * + * @see odp_ipsec_sa_disable() + */ +int odp_ipsec_status(odp_ipsec_status_t *status, odp_event_t event); + +/** * Update MTU for outbound IP fragmentation * * When IP fragmentation offload is enabled, the SA is created with an MTU. From patchwork Fri Mar 24 15:04:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 95960 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp89065qgd; Fri, 24 Mar 2017 08:07:17 -0700 (PDT) X-Received: by 10.200.34.113 with SMTP id p46mr7856843qtp.38.1490368037466; Fri, 24 Mar 2017 08:07:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 3si2146105qtz.30.2017.03.24.08.07.16; Fri, 24 Mar 2017 08:07: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 AE63663E23; Fri, 24 Mar 2017 15:07: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 C9E7B642D2; Fri, 24 Mar 2017 15:05:20 +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 2308C62E09; Fri, 24 Mar 2017 15:05:11 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0116.outbound.protection.outlook.com [104.47.2.116]) by lists.linaro.org (Postfix) with ESMTPS id B0A9E60F1D for ; Fri, 24 Mar 2017 15:05:04 +0000 (UTC) Received: from AM5PR0701CA0061.eurprd07.prod.outlook.com (10.169.145.151) by HE1PR07MB1004.eurprd07.prod.outlook.com (10.162.27.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.4; Fri, 24 Mar 2017 15:05:00 +0000 Received: from VE1EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by AM5PR0701CA0061.outlook.office365.com (2603:10a6:203:2::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2 via Frontend Transport; Fri, 24 Mar 2017 15:04:59 +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 VE1EUR03FT025.mail.protection.outlook.com (10.152.18.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 15:04:59 +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 v2OF4fC4018373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 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 v2OF4fE5018344 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 24 Mar 2017 17:04:39 +0200 Message-ID: <1490367881-16266-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490367881-16266-1-git-send-email-petri.savolainen@linaro.org> References: <1490367881-16266-1-git-send-email-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)(39850400002)(39840400002)(39860400002)(39450400003)(2980300002)(199003)(189002)(9170700003)(189998001)(106466001)(105596002)(36756003)(8936002)(86362001)(33646002)(2351001)(47776003)(5660300001)(110136004)(38730400002)(50986999)(76176999)(77096006)(53936002)(6916009)(305945005)(2950100002)(356003)(8676002)(22756006)(5003940100001)(2906002)(50226002)(81166006)(48376002)(50466002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB1004; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT025; 1:YcW/0BLUONMhHpsU+pGdBz8NPratFmW4fuPGSrNbfZNFS0+xMc31yNgdBs7inekOvSHnXLHTNbBumJATnDzGDSmaxeW3tH8PI3o2nepbVXtdzRJfEf8J2zm5cl7v86xDoJY9pbQj07DQX4wzW9yod2KYaEAIpp0zk0pzGB93Xj+IQgtM4zZXawJzw+ga4fjnHHpONThZG7a9czgD2amENyTT1i6+JrhuLT9o39+2y6yxDQjueVtHvaK6rxrpNpT1nOcEUXjDOfWRGjPIsS+I74mKsvf9GFWDEXVYLWsEolPQLi3Xns6vQ0flnMRykG4+wn8FaTd3iQ+VNNEp+gt7vvGpTgYb+Ew7CaDkRMutwngjVvGO1ijlyLxVmxPy+NhRbftKpXfzeCNCcejcPCYklT7z1Hld/Roa+3bLu2IREeGiRO6xvZK0dRmsboB/QKbD72+7ymBFqGZqID0C4L27N3EscsWGipaoSuP/AMWGuTdrAJ19THgT/UKMA+rN680+ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 42170787-7e3b-442c-f4f3-08d472c7242c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075); SRVR:HE1PR07MB1004; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1004; 3:4v00ETh3WAb5U2FRvOWF9AXoxeqJq1zCM9VM2x+SklqToTCqYbOFo3vlxgvydq2+dFZllYzhBGOvRpvVoS1kXHYJ/UW3uMf7yrlroSxxLfCiI/yhGLaNc+AOzWQ2Fht7ORSCmUtF6jEZpzrya7OzotwQL2vt4v/U577I59zc9ijLkii1VMlD/EB/ww2liv74F6I02D3uS6rFSisRIcO5O1s8eOF/puOahtVX9S8nOnjgJvpZTq606d0BxgjQwsAkRcfpQbv4MqF0z/B0JF3RiAk43ogWSCTd5Z/Y3K+BlbOYNfS1O5zfhwXpZSDpjk4wc1n/abV6sQe4PGdU2PfTncPGyAKE6iRk5C4Ap7Mp3QUOeucBGVPhSc5GxnPN/UEoiM8NkhdrVPv8pcwq8HOYTg==; 25:akxjfZtnCpoL2Q13H5iD933d8otyILOK9KwYXit+D91uXtS+D1ZhaaBJmWdXQFzwict9NzBsP5u+03MaizUfpwps3b7hIfJasV80ExIw/n6vy18k88bXi6zaDDIWH/41opB0gyU3N0/B7Wfk5sYvFkuGIXoitcRLkYx9aoQUgZARITGL7Pt8u/z43QhcvF3e7UF/T8zgVgyNsAvSfwDbyftJ3vwQvvWMPd2pNZ6+wW592ccxOO/GKHwJ2Klt+IneMoVBTZezPgfpC/Kwo/Cs9Dt3qcu3P+YVICsK+cIjFxt5VGY+e/0zmUtOuPxEsRIs3Gvph7HWQHOZAn77z34C93f/IieCbe2uBBLio9EeqaTouJEvPFiB2l2JawsueKJSd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X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(13021025)(13023025)(13013025)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:HE1PR07MB1004; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB1004; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1004; 4:SqEMpPWRpmbU1reVcaMx94NTmjSiSMudDQ+2UZplXL/9UmcQul662hBOSzFWvuYv35stHo5Pl+HuDWGWjfNpZWRiSyspmwKGpb8cYwWwz/PFo8wKBJ0A9Q/mS0A5zY8X69GZxzBVcrTZ76RhBSylGIIgSAWy5IDJvufXmA+wEc0ufCgsaJthJAXjPJWN1Ezc27cw670DpCJrDoHfGTzpr/YNLdpD8T12sE/kgv212xrp/NbNPUgIYD7WkqX9Sme8QDsyvC48bWVmfKhlxPLAguuJUod1gXPJi/Mz1CrMPvmlmNHbqpxR/eFn+QqGOcd5GPxe8o2CXZwr4hukVrw9e05W7aZQKtWX3AX2y2m0NHCwhAyXo/eGWWfKoHU8q13Jzl2o+choXmHkMGn7MbTCrcyOE62/K/NLTjDwrnNAs5JbRT3QM4+4UU9u61oe8pBn3TQEfDOTiVc94BTdY8jIdJWu8JNblvbPLwnOuKDQX2L1np4A86Qq0iCNzUmOdFgRogS6V4bGlAywpFo9fjcTsNX6fAgb+fcWVX/Imib7rrgQDyB6FqThwVVzzhADUr2DkT3Ia9eXp6finyFrSX58WBmbbfnqRbyf2/jgBLD5fQPOnqjf+hacPFShnOj8IN2wi4+cYekIRaeHhyHggHD/wfAGnIWUQW8VxSeqveJruEBQeCWYjkBPTIqnw9DiPQBk2FxogAQRz4Sp6Xf2eMF6FfOInRCbXFsqaf3Gb0VP94S450N0VYgnqCtF7pIfmuZt X-Forefront-PRVS: 0256C18696 X-Microsoft-Exchange-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PsbeIakDEDK9t4g/0E2IbuWFE5T0cjARGTLWashCopKMa03p1LroyypWpjC2HbOsQ== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 15:04:59.5191 (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: HE1PR07MB1004 Subject: [lng-odp] [API-NEXT PATCH v3 2/4] api: ipsec: add inline IPSEC 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" Added support for inline IPSEC processing on packet input and output. Inline mode IPSEC and traffic manager cannot be enabled (currently) on the same pktio interface. Signed-off-by: Petri Savolainen --- include/odp/api/spec/ipsec.h | 355 ++++++++++++++++++++++++++++++++++++--- include/odp/api/spec/packet_io.h | 32 ++++ 2 files changed, 360 insertions(+), 27 deletions(-) -- 2.8.1 Signed-off-by: Petri Savolainen diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index d3e51bc..2e7e1e4 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -19,6 +19,8 @@ extern "C" { #endif #include +#include +#include /** @defgroup odp_ipsec ODP IPSEC * Operations of IPSEC API. @@ -51,11 +53,43 @@ typedef enum odp_ipsec_op_mode_t { * Application uses asynchronous IPSEC operations, * which return results via events. */ - ODP_IPSEC_OP_MODE_ASYNC + ODP_IPSEC_OP_MODE_ASYNC, + + /** Inline IPSEC operation + * + * Packet input/output is connected directly to IPSEC inbound/outbound + * processing. Application uses asynchronous or inline IPSEC + * operations. + */ + ODP_IPSEC_OP_MODE_INLINE, + + /** IPSEC is disabled in inbound / outbound direction */ + ODP_IPSEC_OP_MODE_DISABLED } odp_ipsec_op_mode_t; /** + * Protocol layers in IPSEC configuration + */ +typedef enum odp_ipsec_proto_layer_t { + /** No layers */ + ODP_IPSEC_LAYER_NONE = 0, + + /** Layer L2 protocols (Ethernet, VLAN, etc) */ + ODP_IPSEC_LAYER_L2, + + /** Layer L3 protocols (IPv4, IPv6, ICMP, IPSEC, etc) */ + ODP_IPSEC_LAYER_L3, + + /** Layer L4 protocols (UDP, TCP, SCTP) */ + ODP_IPSEC_LAYER_L4, + + /** All layers */ + ODP_IPSEC_LAYER_ALL + +} odp_ipsec_proto_layer_t; + +/** * Configuration options for IPSEC inbound processing */ typedef struct odp_ipsec_inbound_config_t { @@ -81,9 +115,110 @@ typedef struct odp_ipsec_inbound_config_t { } spi_lookup; + /** Retain outer headers + * + * Select up to which protocol layer (at least) outer headers are + * retained in inbound inline processing. Default value is + * ODP_IPSEC_LAYER_NONE. + * + * ODP_IPSEC_LAYER_NONE: Application does not require any outer + * headers to be retained. + * + * ODP_IPSEC_LAYER_L2: Retain headers up to layer 2. + * + * ODP_IPSEC_LAYER_L3: Retain headers up to layer 3, otherwise the + * same as ODP_IPSEC_LAYER_ALL. + * + * ODP_IPSEC_LAYER_L4: Retain headers up to layer 4, otherwise the + * same as ODP_IPSEC_LAYER_ALL. + * + * ODP_IPSEC_LAYER_ALL: In tunnel mode, all headers before IPSEC are + * retained. In transport mode, all headers + * before IP (carrying IPSEC) are retained. + * + */ + odp_ipsec_proto_layer_t retain_outer; + + /** Parse packet headers after IPSEC transformation + * + * Select header parsing level after inbound processing. Headers of the + * resulting packet must be parsed (at least) up to this level. Parsing + * starts from IP (layer 3). Each successfully transformed packet has + * a valid value for L3 offset regardless of the parse configuration. + * Default value is ODP_IPSEC_LAYER_NONE. + */ + odp_ipsec_proto_layer_t parse; + + /** Flags to control IPSEC payload data checks up to the selected parse + * level. */ + union { + struct { + /** Check IPv4 header checksum in IPSEC payload. + * Default value is 0. */ + uint32_t ipv4_chksum : 1; + + /** Check UDP checksum in IPSEC payload. + * Default value is 0. */ + uint32_t udp_chksum : 1; + + /** Check TCP checksum in IPSEC payload. + * Default value is 0. */ + uint32_t tcp_chksum : 1; + + /** Check SCTP checksum in IPSEC payload. + * Default value is 0. */ + uint32_t sctp_chksum : 1; + } check; + + /** All bits of the bit field structure + * + * This field can be used to set/clear all flags, or bitwise + * operations over the entire structure. */ + uint32_t all_check; + }; + } odp_ipsec_inbound_config_t; /** + * Configuration options for IPSEC outbound processing + */ +typedef struct odp_ipsec_outbound_config_t { + /** Flags to control L3/L4 checksum insertion as part of outbound + * packet processing. Packet must have set with valid L3/L4 offsets. + * Checksum configuration is ignored for packets that checksum cannot + * be computed for (e.g. IPv4 fragments). Application may use a packet + * metadata flag to disable checksum insertion per packet bases. + */ + union { + struct { + /** Insert IPv4 header checksum on the payload packet + * before IPSEC transformation. Default value is 0. */ + uint32_t inner_ipv4 : 1; + + /** Insert UDP header checksum on the payload packet + * before IPSEC transformation. Default value is 0. */ + uint32_t inner_udp : 1; + + /** Insert TCP header checksum on the payload packet + * before IPSEC transformation. Default value is 0. */ + uint32_t inner_tcp : 1; + + /** Insert SCTP header checksum on the payload packet + * before IPSEC transformation. Default value is 0. */ + uint32_t inner_sctp : 1; + + } chksum; + + /** All bits of the bit field structure + * + * This field can be used to set/clear all flags, or bitwise + * operations over the entire structure. */ + uint32_t all_chksum; + }; + +} odp_ipsec_outbound_config_t; + +/** * IPSEC capability */ typedef struct odp_ipsec_capability_t { @@ -106,6 +241,23 @@ typedef struct odp_ipsec_capability_t { */ uint8_t op_mode_async; + /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support + * + * 0: Inline IPSEC operation is not supported + * 1: Inline IPSEC operation is supported + * 2: Inline IPSEC operation is supported and preferred + */ + uint8_t op_mode_inline; + + /** Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of + * resulting inbound packets. + * + * 0: Classification of resulting packets is not supported + * 1: Classification of resulting packets is supported + * 2: Classification of resulting packets is supported and preferred + */ + uint8_t pipeline_cls; + /** Soft expiry limit in seconds support * * 0: Limit is not supported @@ -132,12 +284,19 @@ typedef struct odp_ipsec_capability_t { * IPSEC configuration options */ typedef struct odp_ipsec_config_t { - /** IPSEC operation mode. Application selects which mode (sync or async) - * will be used for IPSEC operations. + /** Inbound IPSEC operation mode. Application selects which mode + * will be used for inbound IPSEC operations. * * @see odp_ipsec_in(), odp_ipsec_in_enq() */ - odp_ipsec_op_mode_t op_mode; + odp_ipsec_op_mode_t inbound_mode; + + /** Outbound IPSEC operation mode. Application selects which mode + * will be used for outbound IPSEC operations. + * + * @see odp_ipsec_out(), odp_ipsec_out_enq(), odp_ipsec_out_inline() + */ + odp_ipsec_op_mode_t outbound_mode; /** Maximum number of IPSEC SAs that application will use * simultaneously */ @@ -146,6 +305,9 @@ typedef struct odp_ipsec_config_t { /** IPSEC inbound processing configuration */ odp_ipsec_inbound_config_t inbound; + /** IPSEC outbound processing configuration */ + odp_ipsec_outbound_config_t outbound; + } odp_ipsec_config_t; /** @@ -385,13 +547,35 @@ typedef enum odp_ipsec_lookup_mode_t { ODP_IPSEC_LOOKUP_DISABLED = 0, /** Inbound SA lookup is enabled. Lookup matches only SPI value. - * SA lookup failure status (error.sa_lookup) is reported through + * 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. */ - ODP_IPSEC_LOOKUP_SPI + ODP_IPSEC_LOOKUP_SPI, + + /** Inbound SA lookup is enabled. Lookup matches both SPI value and + * destination IP address. Functionality is otherwise identical to + * ODP_IPSEC_LOOKUP_SPI. */ + ODP_IPSEC_LOOKUP_DSTADDR_SPI } odp_ipsec_lookup_mode_t; /** + * Result event pipeline configuration + */ +typedef enum odp_ipsec_pipeline_t { + /** Do not pipeline */ + ODP_IPSEC_PIPELINE_NONE = 0, + + /** Send IPSEC result events to the classifier. + * + * IPSEC capability 'pipeline_cls' determines if pipelined + * classification is supported. */ + ODP_IPSEC_PIPELINE_CLS + +} odp_ipsec_pipeline_t; + +/** * IPSEC Security Association (SA) parameters */ typedef struct odp_ipsec_sa_param_t { @@ -432,6 +616,21 @@ typedef struct odp_ipsec_sa_param_t { /** SPI value */ uint32_t spi; + /** Additional inbound SA lookup parameters. Values are considered + * only in ODP_IPSEC_LOOKUP_DSTADDR_SPI lookup mode. */ + struct { + /** Select IP version + * + * 4: IPv4 + * 6: IPv6 + */ + uint8_t ip_version; + + /** IP destination address (NETWORK ENDIAN) */ + void *dst_addr; + + } lookup_param; + /** MTU for outbound IP fragmentation offload * * This is the maximum length of IP packets that outbound IPSEC @@ -440,13 +639,31 @@ typedef struct odp_ipsec_sa_param_t { */ uint32_t mtu; + /** Select pipelined destination for IPSEC result events + * + * Asynchronous and inline modes generate result events. Select where + * those events are sent. Inbound SAs may choose to use pipelined + * classification. The default value is ODP_IPSEC_PIPELINE_NONE. + */ + odp_ipsec_pipeline_t pipeline; + /** Destination queue for IPSEC events * - * Operations in asynchronous mode enqueue resulting events into - * this queue. + * Operations in asynchronous or inline mode enqueue resulting events + * into this queue. */ odp_queue_t dest_queue; + /** Classifier destination CoS for IPSEC result events + * + * 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 + * ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared between any pktio + * interface default CoS. + */ + odp_cos_t dest_cos; + /** User defined SA context pointer * * User defined context pointer associated with the SA. @@ -679,6 +896,18 @@ typedef struct odp_ipsec_op_status_t { uint32_t all_error; }; + union { + /** Status flags */ + struct { + /** Packet was processed in inline mode */ + uint32_t inline_mode : 1; + + } flag; + + /** All flag bits */ + uint32_t all_flag; + }; + } odp_ipsec_op_status_t; /** @@ -708,7 +937,7 @@ typedef struct odp_ipsec_op_param_t { /** Pointer to an array of packets * - * Each packet must have a valid value for these meta-data: + * 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 @@ -733,6 +962,35 @@ typedef struct odp_ipsec_op_param_t { } odp_ipsec_op_param_t; /** + * Outbound inline IPSEC operation parameters + */ +typedef struct odp_ipsec_inline_op_param_t { + /** Packet output interface for inline output operation + * + * Outbound inline IPSEC operation uses this packet IO interface to + * output the packet after a successful IPSEC transformation. The pktio + * must have been configured to operate in inline IPSEC mode. + */ + odp_pktio_t pktio; + + /** Outer headers for inline output operation + * + * Outbound inline IPSEC operation uses this information to prepend + * outer headers to the IPSEC packet before sending it out. + */ + struct { + /** Points to first byte of outer headers to be copied in + * front of the outgoing IPSEC packet. Implementation copies + * the headers during odp_ipsec_out_inline() call. */ + uint8_t *ptr; + + /** Outer header length in bytes */ + uint32_t len; + } outer_hdr; + +} odp_ipsec_inline_op_param_t; + +/** * IPSEC operation result for a packet */ typedef struct odp_ipsec_packet_result_t { @@ -758,6 +1016,23 @@ 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. + */ + struct { + /** Points to the first byte of retained outer headers. These + * headers are stored in a contiquous, per packet, + * 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 + * threads. */ + uint8_t *ptr; + + /** Outer header length in bytes */ + uint32_t len; + } outer_hdr; + } odp_ipsec_packet_result_t; /** @@ -779,18 +1054,14 @@ typedef struct odp_ipsec_op_result_t { * at least 'num_pkt' elements. * * Each successfully transformed packet has a valid value for these - * meta-data: + * 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 - * * L4 offset: Offset to the first byte of the valid and known L4 - * header (immediately following the IP header). - * * Various flags about L3 and L4 layers: - * has_l3, has_l4, has_ipv4, has_ipv6, has_ipfrag, - * has_ipsec, has_udp, has_tcp, etc depending on - * the resulted packet format + * * pktio: For inbound inline IPSEC processed packets, original + * packet input interface * - * @see odp_packet_l3_offset(), odp_packet_l4_offset(), - * odp_packet_has_ipv4(), odp_packet_has_ipv6(), - * odp_packet_has_ipfrag(), odp_packet_has_ipsec() + * Other metadata for parse results and error checks depend on + * configuration (selected parse and error check levels). */ odp_packet_t *pkt; @@ -921,10 +1192,10 @@ int odp_ipsec_out(const odp_ipsec_op_param_t *input, /** * Inbound asynchronous IPSEC operation * - * This operation does inbound IPSEC processing in asynchronous mode - * (ODP_IPSEC_OP_MODE_ASYNC). 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. + * 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. * * Asynchronous mode maintains (operation input) packet order per SA when * application calls the operation within an ordered or atomic scheduler context @@ -934,6 +1205,11 @@ int odp_ipsec_out(const odp_ipsec_op_param_t *input, * events for the same SA are enqueued in order, and packet handles (for the * same SA) are stored in order within an event. * + * The function may be used also in inline processing mode, e.g. for IPSEC + * packets for which inline processing is not possible. Packets for the same SA + * may be processed simultaneously in both modes (initiated by this function + * and inline operation). + * * @param input Operation input parameters * * @return Number of input packets consumed (0 ... input.num_pkt) @@ -946,10 +1222,10 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); /** * Outbound asynchronous IPSEC operation * - * This operation does outbound IPSEC processing in asynchronous mode - * (ODP_IPSEC_OP_MODE_ASYNC). 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. + * 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. * * Asynchronous mode maintains (operation input) packet order per SA when * application calls the operation within an ordered or atomic scheduler context @@ -959,6 +1235,9 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); * events for the same SA are enqueued in order, and packet handles (for the * same SA) are stored in order within an event. * + * 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 * * @return Number of input packets consumed (0 ... input.num_pkt) @@ -969,6 +1248,28 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); /** + * Outbound inline IPSEC operation + * + * 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. + * + * 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'. + * + * @param op_param Operation parameters + * @param inline_param Outbound inline operation specific parameters + * + * @return Number of packets consumed (0 ... op_param.num_pkt) + * @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); + +/** * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event * * Copies IPSEC operation results from an event. The event must be of diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index cec1f22..8802089 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -407,6 +407,38 @@ typedef struct odp_pktio_config_t { * interface capability before enabling the same. */ odp_bool_t enable_loop; + /** Inbound IPSEC inlined with packet input + * + * Enable/disable inline inbound IPSEC operation. When enabled packet + * input directs all IPSEC packets automatically to IPSEC inbound + * processing. IPSEC configuration is done through the IPSEC API. + * Packets that are not (recognized as) IPSEC are processed + * according to the packet input configuration. + * + * 0: Disable inbound IPSEC inline operation (default) + * 1: Enable inbound IPSEC inline operation + * + * @see odp_ipsec_config(), odp_ipsec_sa_create() + */ + odp_bool_t inbound_ipsec; + + /** Outbound IPSEC inlined with packet output + * + * Enable/disable inline outbound IPSEC operation. When enabled IPSEC + * outbound processing can send outgoing IPSEC packets directly + * to the pktio interface for output. IPSEC configuration is done + * through the IPSEC API. + * + * Outbound IPSEC inline operation cannot be combined with traffic + * manager (ODP_PKTOUT_MODE_TM). + * + * 0: Disable outbound IPSEC inline operation (default) + * 1: Enable outbound IPSEC inline operation + * + * @see odp_ipsec_config(), odp_ipsec_sa_create() + */ + odp_bool_t outbound_ipsec; + } odp_pktio_config_t; /** From patchwork Fri Mar 24 15:04:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 95959 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp88721qgd; Fri, 24 Mar 2017 08:06:36 -0700 (PDT) X-Received: by 10.55.90.68 with SMTP id o65mr8294662qkb.89.1490367996229; Fri, 24 Mar 2017 08:06:36 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 6si2126808qke.169.2017.03.24.08.06.35; Fri, 24 Mar 2017 08:06:36 -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 B40C4642D1; Fri, 24 Mar 2017 15:06:35 +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_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 61505642D0; Fri, 24 Mar 2017 15:05: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 F106660D39; Fri, 24 Mar 2017 15:05:07 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20114.outbound.protection.outlook.com [40.107.2.114]) by lists.linaro.org (Postfix) with ESMTPS id DF08A60D50 for ; Fri, 24 Mar 2017 15:05:00 +0000 (UTC) Received: from AM5PR0701CA0052.eurprd07.prod.outlook.com (10.169.145.142) by DB4PR07MB265.eurprd07.prod.outlook.com (10.242.230.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Fri, 24 Mar 2017 15:04:57 +0000 Received: from VE1EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by AM5PR0701CA0052.outlook.office365.com (2603:10a6:203:2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2 via Frontend Transport; Fri, 24 Mar 2017 15:04:56 +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 VE1EUR03FT025.mail.protection.outlook.com (10.152.18.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 15:04:56 +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 v2OF4fcd018376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 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 v2OF4fE6018344 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 24 Mar 2017 17:04:40 +0200 Message-ID: <1490367881-16266-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490367881-16266-1-git-send-email-petri.savolainen@linaro.org> References: <1490367881-16266-1-git-send-email-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)(39450400003)(39410400002)(39850400002)(39840400002)(39860400002)(2980300002)(189002)(199003)(9170700003)(33646002)(5003940100001)(77096006)(5660300001)(8936002)(50466002)(2351001)(36756003)(50226002)(81166006)(2950100002)(105596002)(48376002)(189998001)(76176999)(50986999)(6916009)(22756006)(356003)(2906002)(86362001)(47776003)(8676002)(38730400002)(110136004)(106466001)(53936002)(305945005)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB4PR07MB265; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT025; 1:Ih4x6QPd+UalazIwibINJAwV1qP5lvauj03lV0bAq1cIjMV9pv+wB27MgeVrEsDummneq8LCGN0bZrdvyHVCMNR1d0tIDkCca3Q1MttM/uJhxAsmk664LJtLoQQ+WUfk8noHwT9qgAh4gzW1tjGHacudsJOKGGxf1ZQWcOgdX70LLy0WNpvES9CXo1EuHTkhMvzHcmzAawG+zp1Nvot2ysBPhT/aALp63jdgPzW6cIYG5F3QQF/iqC6/X2VzxMKb1ErsSwnBVEKA78dUiml2ToIrpeaq7qY4j/H+excAOeR6oDPuE+XBo/6u/xAsM53u9+OECxA1F0scCgeoFB0M4m0GfNOIll2T2AjQkVfBCGpJPhaNt1Icd26cnwLuN27OQhVEUwlTeZWPuuuy0N6Tz1OksTs4A0nPxP3rC8FQCLaNOocUIDwsriqqPyLjynexMRuiFHu9Xw6UCBRWOkYtxbwS1iXlnugJH49phqz0507HAZ+p86s3PX6oxJckvAj3 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 205dc459-3641-4d14-f5ce-08d472c72248 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075); SRVR:DB4PR07MB265; X-Microsoft-Exchange-Diagnostics: 1; DB4PR07MB265; 3:jzfPIxxfO4yYZ+hD5hA9WTiGzYHz5EMukIR5r5p1/jQL49/1mPmacP18JVOCBMysg5Day4gR85UffiLAvgVaNPmMQGmydhzlp3HtNfNQWyJi9fpCOqiyW9S9HjCON8UprYb1c5w3WLR6q5BhmmiOfHhYaBsIWsaqyQuujCpJcHfo40IeVeI+6F+5pIf+kifoTb141QzFhDXwsX8gRL/71GFJxs5wIKkskYz0ToT0PDeZyeuUPdI7FSKAl4HSYpKD31JViKOC51y9p1+IbfS3FqiRIRoA9Oj8CHQXOrBNSv8BoxCV0yylxjkAWdgygX4l4V9Xem5Nau80aOJNPABkjlVdR3aLURaMtw43jL3tuTJ74eqOmgiUVogHbM/JBAQ+3OZ92L9SKpaRzQb4VVPDwA==; 25:ya0R7X5P1P30XQI13cculZHDE8CCfYU3ruR+4w3IIZtWZ/sxKjmSI+M0FZTRQtR+eA93FO1dTDrNFpRc1Rdm+qUeoVxL42WfkXEXfthdbkK3gFBkpSnYIGCtuEm6iqa9DcYalbmZNNHe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qVup4larEiOwkdcPmQ6I7EvGsnurwujcji8ZHTFxo5v61tmERKh6R2smADe3xi9/WDj/tJwWx5zwwaEA0xgW6vhO18Qr0TiVpGQyb1+G4IV6uLfFEzg77+3dnSRCesho8H+PeXR3cYNPDG7MzlLd5fCCJyiAqPbpZsoMawnLMGp59ehu9GFHHf1Ojz+c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13013025)(13023025)(5005006)(13021025)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123558025)(20161123555025)(6072148); SRVR:DB4PR07MB265; BCL:0; PCL:0; RULEID:; SRVR:DB4PR07MB265; X-Microsoft-Exchange-Diagnostics: 1; DB4PR07MB265; 4:OYD0++O223R/yQ+NYgXz8T7yZVHEWIN/lS5BlRd1mRMRvTakM5De5xALLlKbbM1CmFx+8DDtWwg++o0DFyWVYYDvSLrHUh+r8QI1fgsDf2zst2UaxVuLWbYbgZ+rwL4KDXoCrVmyXck9yru7YIoFVhaOnNx3pLCp15Yn0jryagJCh64+Z3MJYJh1JHtzHeXK2ZsncE/f/iGh1zr2pbr9hmepRDDGhemwg0sRTJ7LqUEDe+YnGr69HWcb3c6WEQ/+D8T5ycfx87eBBPClX+re1vM1Tzzh0+nJiOTvwyJ/YpL1OgeTgzJXYDWIOyZCNxo1jQtmAxQWbb00z+9qq8TgFJA1/iUEFYRHpVER/Nxs/WD2EcVhrXuW+CUrTobxw3OE+VxVXmkVrKhnysFpM3C2CumcJCrxaJh+rKnIoXEWWrkjY0tX6ax0B0s/8rf4ntyaBP53rUC5/jpvsAEjzDNIlvEqJlFTH+R6ydbMOwV4sBfZ+5u/YGjSqGn015B3Ra8FBH9v/tOKn3oQgy+UguYNWVnUDKoOmluZndkqKk8+X+BounMpEYIQxS8nZ8WCv8owhYUiUb5J64vI9P14MbmWdmag2058j2N6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cOJwYF+3XYr02cNqa3OdjT2XCi8c1vzFnoeRSh1/1PHZ5428wVEuiOH1p69l0SjkSLe1wqrq7U+GAjYy8Nk63EGbCpFlKVJFTfTvBL7da1WDVhBXrfH28+FvF7uQXhjtVhHjO X-Microsoft-Exchange-Diagnostics: 1; DB4PR07MB265; 6:+/A8TdmN/XLhgdW8xraMC/fDhpTn3LP6jpuyhm1WgbeAEvSPE/Z1TVDMeXvFQKoy4v1o6gMw1z9yCROOWgblssHbqQz85PmV8BM/Ry/aiFuZrBwRI4kseu+6Ad+7V+OJU8Oe1PmiJl6eyuwFFi2DajEUaFYIUczPbyOIalVJIljbblPNs0RtuuRbTX9qbrSBaRgt1e/9myjtNEsN+8OhYeDsRmnW2azBnpUcHryiHvCnjyfvEIFfRAAOm1qrahjFW0Nov0SSzYl0f+CWsQgqWgYgypkFW42V6su5ywQmyOEDMNQ7r7fw7k1fGWCYkDwQ0+36YzKKbZHwvMwNQG7g+ykva1Grj0/+313sJTRuwZoQ2YQcNwWgs9YciMGZl7WzR/F77ITTe4QtK5EPfQUj7GuX730Fz1tdynsYdss2+Fs=; 5:9tEvEoFplDotoKVL7a+lnIWCSUwBeUFRftaLYe9cQ3+2oo7XRVWf+1zg/PAtwP79WHcQpP2QalI6DrEa8452PCXRI2/25wGK7ex11TiTJKyJrGCl+Xlihzb8I53Z0mld2T7QwoAwY17ku6NHtCKqJg==; 24:WxXXD53pPMgCKpgnXdGOzJvqxURXucEupRZR6uA/fOCv+QjqkJZgVYdbKAQhxCMIshC1lXVhDLhyx/JSRHO5zFsBUZsyY4L4iMTBM+XI97I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR07MB265; 7:/TR+tRn9aSbFYrM/IBNDnE9FSdI/msxfbWdM2aXVHF5TP8KwZi3/ZqNilbOz7dTkX2gl0nSR+hkapXT/SfD5JRwWmk+RKdWWZnw1kp6YCxw925xbmukgKDYiPbZPeIvpzZt2YDO2aVbyDaYSNgfVeTLhhntki7LiWJ490YsYMJH+wWDZp2xeMEtrRfJfPC0emmxwHvhWq88bnLTP+pqCqm/pSb38WxtxIEW65rDYRrhQ4A5tYlPcHnyY58g2L4Ea0/g9JrUljRIqyc9wZVX8Il8iji5CGggNpVsR4z07X+QpW4+RyxQ/5Nqc+h/cOtA0VA2t0JXXp1NTnKB6dtaL2g== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 15:04:56.1285 (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: DB4PR07MB265 Subject: [lng-odp] [API-NEXT PATCH v3 3/4] linux-gen: ipsec: add stubs for new functions 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" Enable application build with IPSEC. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_ipsec.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.8.1 diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index 588d8d8..5eb1be3 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -59,6 +59,13 @@ odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param) return ODP_IPSEC_SA_INVALID; } +int odp_ipsec_sa_disable(odp_ipsec_sa_t sa) +{ + (void)sa; + + return -1; +} + int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa) { (void)sa; @@ -98,6 +105,15 @@ int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input) return -1; } +int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, + const odp_ipsec_inline_op_param_t *inline_param) +{ + (void)op_param; + (void)inline_param; + + return -1; +} + int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event) { (void)result; @@ -106,6 +122,14 @@ int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event) return -1; } +int odp_ipsec_status(odp_ipsec_status_t *status, odp_event_t event) +{ + (void)status; + (void)event; + + return -1; +} + int odp_ipsec_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu) { (void)sa; From patchwork Fri Mar 24 15:04:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 95957 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp87984qgd; Fri, 24 Mar 2017 08:05:16 -0700 (PDT) X-Received: by 10.55.157.75 with SMTP id g72mr1183586qke.177.1490367916130; Fri, 24 Mar 2017 08:05:16 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l2si2113575qkc.235.2017.03.24.08.05.15; Fri, 24 Mar 2017 08:05:16 -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 53E28642CF; Fri, 24 Mar 2017 15:05:15 +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_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 8BEBA60D39; Fri, 24 Mar 2017 15:05:09 +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 2A2A960F59; Fri, 24 Mar 2017 15:05:06 +0000 (UTC) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40123.outbound.protection.outlook.com [40.107.4.123]) by lists.linaro.org (Postfix) with ESMTPS id CF76B60D27 for ; Fri, 24 Mar 2017 15:04:59 +0000 (UTC) Received: from DB6PR07CA0018.eurprd07.prod.outlook.com (10.175.239.28) by VI1PR07MB1005.eurprd07.prod.outlook.com (10.161.110.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Fri, 24 Mar 2017 15:04:58 +0000 Received: from DB5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by DB6PR07CA0018.outlook.office365.com (2603:10a6:6:2d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Fri, 24 Mar 2017 15:04:57 +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 DB5EUR03FT042.mail.protection.outlook.com (10.152.21.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.7 via Frontend Transport; Fri, 24 Mar 2017 15:04:57 +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 v2OF4fag018379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 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 v2OF4fE7018344 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 24 Mar 2017 17:04:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 24 Mar 2017 17:04:41 +0200 Message-ID: <1490367881-16266-4-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490367881-16266-1-git-send-email-petri.savolainen@linaro.org> References: <1490367881-16266-1-git-send-email-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)(39850400002)(39450400003)(39410400002)(39860400002)(39840400002)(2980300002)(189002)(199003)(9170700003)(33646002)(50466002)(5003940100001)(50226002)(6916009)(81166006)(47776003)(305945005)(8676002)(77096006)(38730400002)(106466001)(8936002)(2351001)(105596002)(110136004)(48376002)(2906002)(53936002)(50986999)(86362001)(76176999)(22756006)(189998001)(36756003)(2950100002)(356003)(5660300001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB1005; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT042; 1:ssSVncWIXLqX7ZjKnyKyVFukODcHyDU9T6pH2Q5Yo4qTecKLGlpXLaTL5ICW3MS/tpCz31lq7LoT1C3YsPNjJ1eY9N+LkzOWc+bk3bvAUygEVTKmtKNLYoUhbimSOZqUAhTrlZczc2oWXolXO+0tw9ehfe5fio6tagj0ZeLEoX+WcWYZt8AALHPTgTHfJRk2cqQgz/10xutwAY6PMBxO7Kis/Eb9x4sBw3Bh0Hiq0UqXarU4iZEfnUFV3MyvaYWMhy4DEMUpNP5JWiwIqIcOPj/8VGIdH1y4rtlsuXrNqbIy5Gq/zQcJ1zwZcUYWLI0GVtP9Zw3TFKXaRfaoBkiBjXZtLVRbheNH80GaXDSue4fgvi9CZEolb9cszrId+zIhgdqoQLjQV1bN91yWI4GOR4MnjnOswjPypNcqnZrxxOsKGo/KzDnuNRvZEhot4Z+sTKALLJqJjHg6g8tXpg2Z6npqZ64LORSr0UOX/s40yN+yd2r7wnL6aZ8TJa2MdcBB MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e7ec8322-2a4f-4698-df2b-08d472c7230f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075); SRVR:VI1PR07MB1005; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 3:G8XTCs6ZtOnG8Kl1lZ8PEg7TPPecG9TvKsBuZtmgB1rbsMDSLeWTXTsmj4wpMpoFKHk48yUbQr6HwpP9Qm+JaOa1TzK6/bKRcg09GCA1XB5eCb7C47pExs3PCA0lPPiURuE3OIGWK89QIo41HoPdWWqZFcMVYIS0+u0eDAAklF8v9vMVWr0QfqJV/NMfvUBo11TX71sNTsx6CuPTyH96Ni8faBN4ggWOu2lazuTwZ3B7j9C4BL0bEHoOdHc+KKNfdjBwLG8WEX8jlCLGdotaVfDHAUNBqqe7P3Ui2GbW00Ye9dq0BM9pVywr0XEb7uXimgqTPRlvo9LK3SuRL8sONDM77LaYtOkDqo3Gs1pgVxR6x2tqM9R+8ToZiQ1OWavaz4LlT1kN5q+m6mTlkjwLQA==; 25:MK5DPpjLU8q1++fM1QFKXxpQsxTI+PrvHVDGpDaorz8xIO6swrMQ1cWj3S4GHLIe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OHexhdDLt67k9kNj8g2Q4w6tnFW85FBMI6QT0myoLN2tn1Hu0Kt7qlfqXt6//BkBmdBdP7YLEora8MjweU+vTbTcFivlc5CpMNCabC23Yp3U5Jn60/jwXzf2nqLH9mG33Z4YpGY3QFblA86ag7YzdCPqhgeN9R4P5PHGP8DagFQdTESJ13ik5XB3+hH2apFYXmJTpKCfQBJB6ydb6h51joW17mEwomUlyHnBXizMoeLMlOyL4aDm2P3iV3RuOruUAX1vDq5kLJ727fRBOUtbn2cONmIEkiTmCETtjio= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(13023025)(13021025)(13013025)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558025)(20161123555025)(20161123564025)(6072148); SRVR:VI1PR07MB1005; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB1005; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 4:3+R7qnBvTFUKDP4akpIDbhpqTHDarctZEfNX142EqR43ylrenUzjfeLqfOdIR87KlmWe2yYU/rsVOjr62UIIjv184obNbfVkoX9NSoir9J14HSkE9sQLatqEH5niln9j1gabbukMzbq+tZezkNYYWFVwi75L5kAro9Yc8LcTZvfX7jN8swKnjNY/iTYYUBcl6mgopSZqVhiwtVwGidwTdnUgBGg9S4rRRKzEnmdCGivU8L7pubbWu0Pt4SDkymKl/lnBJtC/s5jvzKVz5Strs5/WOSg/A4swD0fY4Ywvn0+CmAOQYeTxKYML9yM/7mgeUqGF7kYJKmcPKNikrDi+xRhCDoSCTkqgnx2VMA833pjB/peu89VKZJUJJAtsZcutkkcUzBDpkQD46bcvm9mA0tcGNogaDRXlwoCSHcWLJAWu220fA5UBnJh0SWI4L8Za0+r8cFSCdlIb5LtyutBTCMk8dm8UdWRENF+ZqhvRmS13jcWCKwIoblKlaASMTITMGxB3eGkZaebtF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KKctI3Y01tHsBXqoMZ71iLyIuraYR8WMUK9wmbAJ5OyaI2ra3o/0YqYKLp0McQUbkHtxOydsSFXg7UNu9h3EPonB+WB2fZs8i+7qZN1LlyOL6f2kODeTupFoN/VfKkXAx31nWXtniq09G55B58E0rLE9hwqkAPjop7l2b53mPn5a8W7JOFqHo X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 6:BlHMBXCbXUze2Vd1usf8SUVC3nwsXIlFpyDZUs98HSAnxDaDRzmhH7kZUpoBa2rREEQ0ZZf0vc04L+u57AbbZUuEzVKao2X8LNAS7E9ph8cQPwJmlxwL2S0srsZLlNaxICVvS6UuDTVroABi7Cr+pBGXFnVFrfJWdNxSysAo+jm0wCztjOxgS6UmxrHAn2YeuVxuXAgyZ31SsAlFpDyUr4USKu0cm0kn5+89uHnGUHGVA9M4WEuQQNQHXPhUWBzo0ZcCWGuyvSQXw0zU+Pgye4cnuLOqbvQ1GawNXXv/CdyM161v50hvgvZKZikO0+HRzJnVK+j8W6pYUHbNFMsvGqpPMmyBNKwmClL2wU29popP0aVBp0O2y+j9BAdOqOXhu7QxHMp7NZsi5VvystQmEYYPQ7c/dSHgdUULe3nEvIc=; 5:IlQ/jts3kRbC2V9Bvl330jff8F2InPi23ny9WMMFhnyvtb1FdagP5IcLkX159qh1Jgsc/1sDevP43t2JeGGHlOFdHrX2BMGwZnlaeuAqpGvm7oaT4R+ROelNL8cPsTb5Zs0JHCI7RqIl5HEhTYYAEQ==; 24:S9eGG6N97IHs9ACznOnAkh/lIoffkTLyShuJOJzmDGHI0NFru8Wfr8gkwLALskyg00e1kW/juJLayM+PmsC1o8W56eE2kIF8QPMbYa7mCEQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1005; 7:ml65d5QQM8cBmBRV4G6bg3A9pEA7ePb1ZxbAfg/jBFwCEq5+OF6u3fWF35Zvg14Kpxq2zPLLKGUcRFQBbvHu5A4mhaV0RFb4EpBrnbKllK1aST0bMY5+WoymwSC19ziWQrMw/VJ4DWFFDuLHoYD9I6c4EWGT14kYQ30ztjb7yPObx76foXenc/Y4uWP1nZkyIXSRb0Lgy9AVqkbE6YjXCz0DXm68hg3mihpa2d70mhgwMg460n9L0y4NQQVESwAgQgOuOCTsPqRjJBfVJIL706ChQOzH+AyYPY/w9plP7KLztsPWNZ6R7ZuYWXJjGmAA1LXf0f13XEu5FbFYfY71Sw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 15:04:57.6508 (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: VI1PR07MB1005 Subject: [lng-odp] [API-NEXT PATCH v3 4/4] api: packet: add per packet checksum control 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" Checksum insertion has pktio interface level configuration options. Per packet override is needed for example when L4 checksumming is enabled and application forwards packets. Forwarded packets need to maintain original, end-to-end checksum value. Signed-off-by: Petri Savolainen --- include/odp/api/spec/packet.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- 2.8.1 diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 92c35ae..42ef51f 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1366,6 +1366,25 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt); int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); /** + * Force checksum insertion + * + * Override checksum insertion configuration per packet. + * + * @param pkt Packet handle + * @param l3 0: do not insert L3 checksum + * 1: insert L3 checksum + * -1: use default L3 checksum configuration + * + * @param l4 0: do not insert L4 checksum + * 1: insert L4 checksum + * -1: use default L4 checksum configuration + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_packet_chksum_force(odp_packet_t pkt, int l3, int l4); + +/** * Packet flow hash value * * Returns the hash generated from the packet header. Use