From patchwork Thu Mar 30 10:29:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96264 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp1171405obc; Thu, 30 Mar 2017 03:31:40 -0700 (PDT) X-Received: by 10.237.48.228 with SMTP id 91mr5937880qtf.292.1490869900913; Thu, 30 Mar 2017 03:31:40 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e63si1451392qkd.321.2017.03.30.03.31.40; Thu, 30 Mar 2017 03:31:40 -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 765B663533; Thu, 30 Mar 2017 10:31:40 +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 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 7049260925; Thu, 30 Mar 2017 10:31:31 +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 A5BA860A24; Thu, 30 Mar 2017 10:31:19 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20111.outbound.protection.outlook.com [40.107.2.111]) by lists.linaro.org (Postfix) with ESMTPS id 135766071F for ; Thu, 30 Mar 2017 10:30:47 +0000 (UTC) Received: from VI1PR0701CA0033.eurprd07.prod.outlook.com (10.173.77.19) by VI1PR07MB0816.eurprd07.prod.outlook.com (10.161.107.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 10:30:45 +0000 Received: from AM5EUR03FT046.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::202) by VI1PR0701CA0033.outlook.office365.com (2603:10a6:800:90::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 10:30:44 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by AM5EUR03FT046.mail.protection.outlook.com (10.152.16.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 10:30:44 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATjB3020052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATjor020044 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 13:29:43 +0300 Message-ID: <1490869785-16657-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.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39850400002)(39410400002)(39400400002)(39840400002)(39860400002)(2980300002)(189002)(199003)(9170700003)(8936002)(53936002)(33646002)(105596002)(81166006)(106466001)(8676002)(5003940100001)(38730400002)(77096006)(2351001)(110136004)(5660300001)(50226002)(47776003)(36756003)(50986999)(575784001)(6916009)(86362001)(48376002)(22756006)(189998001)(356003)(50466002)(305945005)(2906002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB0816; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT046; 1:Ft6YbqaXs+cjCnBBEEifxj7+2RI8RnIBJ6uKOrBrfOv7Q+5GVmRimfYZRebTuZUKTube5iEYhsoneLQJwG7qgBZirM8igywjNv4HmH2agGmZqbAbrSaYZlWhx64PbU3EXvlfWwxlQGoYCkgMzT4RSmEqOFizCNAk9uJe03omTftioPl+drxN2nz7C9E9EvxGkjvUFHpZrELnhSFJakk7z1U8fTNAEv/zKHu9bZ8qtBQbnHqUNJd3bEPQxt/2rRGdV6nZjw56AnotgXs7JFiGBqd3f6WKhLOK3N8oghQikzoacWjk+EIL53M1uz6WN2pCXq+3QhsUIKnTk8lzgUCx7WoFkT7dloWmwuvujpQJ+enqJYHtWPoY2VKJwrVMAZgv5wJnALDjpP4a/lVfbHFdgM3GWgfMfGmYtvonrDHOzW3OomWMPcKCLHyvaTdqLpYr6z5axPtbQsDZaC7fxFFMJIuFqRx0Ub9zxPuhGLISApW0bssn3jMChTzed30DlioJK7b1xZ6w655tR3MFtOD0Jg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: c58f0785-0ef6-4426-c50c-08d47757d2b2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:VI1PR07MB0816; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0816; 3:1e0UuVPTm09EORF/Q51i2rPwS2HCCZIy8C2LU7WhjUOj6L9dpMCTG/ncWDPbGnIKFRy5t1wVjQ0ozxyFMUbK485yJxmYkRNlzfKgcTk1tHZ+NjS5R/NXfa4jbuLZXoPkDL7UD8DvhHvpei5HYOHiUZHzx/l67q/5e6J7e2rekJTlqQdfeZLT3+Mg40bKfK63S/Alo7uK5tORz23divkdcuJPqcmarW6T4pUWWWeynLYkQwnZO7pA6EramSP+C4TjGOAMJHjRLgZiEASvVrF402d3zE/kb5GoKwt0h8tTYjUnFdh2R6UpnLJu366mLKU3BsWjz2DHqkgsYRFh2/vZFbi4AGskXxqMvfOfU0uqci1AqLmNTwqIkTm1f3VdR02sXOnzFxRFfrhf5m1Kk2IttoCfIHF4ZrWozolSCgFZ8SmOz7mcJlMK1WZ7ioO36J2hmhzqszNxwJw9wrY0E83sBR1dTgvfi3xJfOwh3rYeNtt5WBIE711uSwPMFMdVQvyE X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0816; 25:jqDnpAyHC4eqmlXqSGvUpeivdevBFv9bwfUhqD1Jhk/gGEV6XSHOf90ksU6i3ybBat0InsY8vbHU+ISZV7XSW3wS/kzZY4aoWBSTQHSJN/24b7F3jMQ6i3pD2MwvaXjiSphSn479b+ML5Yay04ItJqFuu3S5cPNfFPPKDv0fNQ3Xtk6vE+ckgHleXwRO7C2+T65qb0oFbWTfPCfsKcpDf2al5vxooFk3bm6TvJmey9DNxefQRijjbJfem9/9K233itVlSZ/W+hKOqp3g7SM5gXnpFA1UUo7K8YbLu+tsPs2dw1l430YdITxgVD80R5ljxiLp/u3o7HSRzOM2M/sz14DRdojG13skXO+M0oX75IFl+qtf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ange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(13021025)(5005006)(8121501046)(13013025)(3002001)(93006067)(93003067)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:VI1PR07MB0816; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB0816; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0816; 4:UM4wA3Xk4Xg8DaCow2zm2Bl7+vzfUgFXTIhiLGUjJuEXVXrVrd6kZgzxQK24KglXZafxovVHfPoGt10cnK5VB1bEMNjcDSv3uDznwwVevaL1MAHlRsyL4/TDwz4g5fBus4e3MBIDPX/LJTUlxWgu4uHLH1MQtU7v5xRLnAwgT6OsS4eV7bwnmrrXA/e/3t56YLG/m5k33xsrGZ916wUUstuuDIqXKlmSxn8h5+AtJnt1vlDqfgFo3EqpixQwna0ZgqcNpXoIvntu4y80oZiLPJ5v4T08hRDF2HE22fZb2N3mDzGunyvR5Qf3BY0Qj5lPMrXkwvDqQcWmxEbikVJPYB8bFxUib2UN4kW//UFgRaiSLw88C8ycK/QeDgJzrdp/Z+JfJL5wALcosb8Clj94/Qs3Zcd+cFXjyn52Wk0iBagUOYa9SwrhLL618hFAEYkBc359bO9iko0WxQjQBp+afdnEVykWXt94Z2ySBw5zkvhYtCTwnINsGxwNRnNb6gjRKqlblHBf+xJQXuskXzq1Ho0du6l5U05WeNVbU3QQxdeoC9Yn54gI03L+PT3VjXUXCtTjPDAcx5zVUAf1MX7R6CzVY/YpIpg4m9RdLxP76jdd1O3uASQhwdlQ09fmK25zeYaJq2PZvXwT4xiioOyTMb+qc51uJMWyLt0KCAQLe6Iv66opqHf67nHWjDSP/VVlnAMntPUt3xDBCrEFmgVjRiWTwSjQBN7OnGedFtsKiEN34TjFo5a6g02EDWEZcxdNy6zXA2wgIKmk3M4FZz13U1iQaId1mwF/tFsMJJXEvyw= X-Forefront-PR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cUsd X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0816; 6:ih33BwwdDXB2VLgfwj7h1BW17pL9iaNEWmeEpcgBCpl7s9A8HsZhemf3M4JD6JQ8nFxIDffBVpbRB6wrQ3XCSobf7v02dAf7IsChv8FgwKooil3EHwUVT78M9FKhfFvO+Uo98g15bZEIYwyr2d9PWRoFgRlj4gunlenmSUL4dxyvgoB5TFMaKftTSwUA7bU9QyGdJuY+0HVtInWkCAduNTWcwGhyM4WvIet0mHGtrLZqJlhRYjy4QHkr7/YZJ0Dk9qsA1/khQDgpLDxJgzQ/doHmWackhNKfgq9VAybiiC7Xfds17GAZOwF3HkYe9/3UwoOcAdGGeh104JynT41W+MbDr/Vs5INwLjHRYtSNamYEtr+BlIHWAFAgaKEAW0e/dVmxRFTX1CE0Q+Di3WJaokgxUS6f0Kh5FwutRLiLxlM=; 5:tb2QupAMs15NHw2Apult9+BxDsjulJXkaahMULlj72Dn9LePYZJNN4c0GfMSB4uzTi+kjjuZGDLoU9uA04mnpbNABly37gaTRdyiIHBkS+kk1vkqe0KLI/jTFY/81M8ueUr0ehxX2WZ+01uKHjwkVA==; 24:PNdNlCq6lcUdbnRguVmStf+wUKbWjHtlbi5I3r9oyfFEmbts58e8hOa8v3lEPxNBekTQ6kc7mOIqtw5rQIgRkbDSldN6OfCFr1klCyI7GhM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0816; 7:F8OzQ4WEtFwlBsMEtlDrX8NKcsfW1s46lsj/9lOnGgYNEdJi+6ts+IBZ9Mq1rK/lc9auJC1UeXa1/4+A4nvT3Mg4BxW3yqD9Se4RnQXt/pnJs3yL8Om5QVm97ww9DKJoqmBtnuUYLtH6eez/3qeFlGDzuzqcwPd6VS6O0laojg1HxlRipEWJSnIHIY5aHwhM88aw1KUGiEEejX2kvI6eSKC7PnBpockDPQs65dS4X5q2lZrLnb+/4Swdxx0KrkuHImyxumZcmTaY1Q74fpTL2Q25teqec6Uswb3ToMJqqobLFkOTaALBmjS99QXami/Jue5ZQibIBU7MxhMJpvq5Hw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 10:30:44.5311 (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.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB0816 Subject: [lng-odp] [API-NEXT PATCH v4 1/3] 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 | 198 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 158 insertions(+), 42 deletions(-) -- 2.8.1 Reviewed-by: Bill Fischofer Reviewed-by: Balasubramanian Manoharan 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..118363e 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -56,6 +56,41 @@ 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 the asynchronous mode, + * resulting IPSEC events are enqueued into this queue. + */ + odp_queue_t default_queue; + + /** Constraints for SPI values used with inbound SA lookup. Minimal + * SPI range and unique values may improve performance. */ + struct { + /** Minimum SPI value for SA lookup. Default value is 0. */ + uint32_t min_spi; + + /** Maximum SPI value for SA lookup. Default value is + * UINT32_MAX. */ + uint32_t max_spi; + + /** Select if SPI values for SA lookup are unique or may contain + * the same value multiple times. This configuration is not + * relevant in ODP_IPSEC_LOOKUP_SPI mode. The default value + * is 0. + * + * 0: All SAs in SA lookup have unique SPI value + * 1: The same SPI value may be used for multiple SAs + */ + odp_bool_t spi_overlap; + + } lookup; + +} odp_ipsec_inbound_config_t; + +/** * IPSEC capability */ typedef struct odp_ipsec_capability_t { @@ -111,6 +146,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 +391,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 +573,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 +634,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 +744,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 +817,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 +997,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 Thu Mar 30 10:29:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96265 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp1171764obc; Thu, 30 Mar 2017 03:32:31 -0700 (PDT) X-Received: by 10.237.55.134 with SMTP id j6mr5572454qtb.191.1490869951312; Thu, 30 Mar 2017 03:32:31 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o20si1488368qkl.21.2017.03.30.03.32.30; Thu, 30 Mar 2017 03:32:31 -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 0BB4D63533; Thu, 30 Mar 2017 10:32:30 +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 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 0288560A36; Thu, 30 Mar 2017 10:31:35 +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 58CCA609FD; Thu, 30 Mar 2017 10:31:24 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0115.outbound.protection.outlook.com [104.47.1.115]) by lists.linaro.org (Postfix) with ESMTPS id B16F160A36 for ; Thu, 30 Mar 2017 10:30:48 +0000 (UTC) Received: from DB6PR07CA0073.eurprd07.prod.outlook.com (10.175.238.11) by VI1PR0701MB2720.eurprd07.prod.outlook.com (10.173.80.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 10:30:46 +0000 Received: from VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by DB6PR07CA0073.outlook.office365.com (2603:10a6:6:2b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 10:30:46 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by VE1EUR03FT020.mail.protection.outlook.com (10.152.18.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 10:30:45 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATj4I020074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATjos020044 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 13:29:44 +0300 Message-ID: <1490869785-16657-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490869785-16657-1-git-send-email-petri.savolainen@linaro.org> References: <1490869785-16657-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.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39400400002)(39410400002)(39860400002)(39850400002)(39840400002)(2980300002)(199003)(189002)(9170700003)(356003)(48376002)(305945005)(76176999)(8676002)(50986999)(81166006)(53936002)(36756003)(110136004)(38730400002)(50466002)(2950100002)(77096006)(86362001)(47776003)(6916009)(22756006)(5660300001)(575784001)(50226002)(2906002)(2351001)(105596002)(33646002)(106466001)(5003940100001)(8936002)(189998001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2720; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT020; 1:JhmkzpebiDBbBh874tUiKVRvCgMdeUWgrELNhzyQWq2vqnJdFD+jkUF5Lv1rBeiE5lrFOsOMU0cIWTEOAR8mO9gLdPc3lOtvaHNirp1xIAAx5vPrrwV6ZrfkwpYR/hDP11sx+D9ntUuwskvKEFeDieFblsOGE+Un1lswEjZIP1XSYHoc4VYQ5VeRbG7O2hyB747YsPT0oUdfwkzNUPVMW6iimBZXOghJLn7MAnEAyB8Q3Tt9SGWtNVmEx+nJkkNIWMR2pdSeADydnuToZBarUNmIAKVdmFvMcIJ64uU8QBSGtbsWj6javCwV877x16mApRLv45VddVniwOlKq1EzcjYGnm+3Ia/55sEYpIwtvr+UWr8TbRGzVPmp9wG1/NFK4C8R4gP3CHNGMXaHXok7KhK5D7GYK+jVckL2JMXpUOn24tZPZfCkGiq/JuvK/X0j4lmc5jEp3cmu9SIN+1ymphau+CyirVOo9WJJk0R42sQKdM/K0MVaPi2QQmKu4FKBnxTJCQjUpIQpYSI++uIS/g== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 1f1516fc-084c-4a0f-4dba-08d47757d376 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:VI1PR0701MB2720; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2720; 3:3crWhqXWSSv8w/0DmfIrVhQvlzD2u0EI18a410oMhQLyTc9WNerE8KXjhp+4cP6Ae/zaug8MFW0on1aJ53bOI/q5YjzLHfgPZCxko6YrCNzF2Fz/ZoLS7r/lqSpS0zaAxxCCx7Z8qnm5Qq8AwJqXHfIf5WGZ8dFOtbX9GZ1SBlV6yR3zozXV4Q1JtZfqYaH7srtuXt8G7SR+oLb67IRt1CJrnF2V7lT20aWIcIf0h6ZnjSG1/YTo9DAk35S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qx0CVCo= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2720; 20:5KMSaOK1LJpE6hVPUBqKikVeMisXKs8JbjHDymAcylzwidQo2zhpV/Lw40jW6KsjsFq35aK6BL8rEi/K9Yf5mNll/uUm79nAx6StrkwuSvibvKytzedrd3dFczTMtqLhSMMjvC+Bc5oWpepa0AMSNthWPk9eHM+9YMnylLtuLcdweCepgN4X5lpz/JvH6n6V2JX8m5QWJAIBfVlGl6fT4ikUqPyb38Opp8pzZ4E8ongB1S1CUC5xITdtNb6JXSQRimKYlC/QiZdq5bBDvmKCaPgaT12eq7F3pVI8ToCqPNPNnj1yHc0hx1jS+B9wGUaRxpiin52gMjhAE0czIdHUeE3kgsdHJIyHN2v1SH1uj2lxP3FuGb9DKra3TZp9WPWoci1LQanzmGi5H5OI/K6EJwtKymJ5nZr8MN5J4FaOanxCs/Km7r+va/GZvmUHeeLQyH+OvTNR2RqfrrbIRukoqs4KDu69PIozgK44sqFG2Vh+0GgvOCkv4XAa4vknQVDhzC1frQy4FdaBf5LBJs0hJDkYJexvo2QAG9/9MHPHEd6p2ic3QRNSGfBqpU5Z3SeBOIA81OxOO4/IF1b2NmcROBjyx2WvmYE/gEGiv3D5RJc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(13021025)(13013025)(8121501046)(5005006)(3002001)(93006067)(93003067)(10201501046)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123560025)(20161123564025)(6072148); SRVR:VI1PR0701MB2720; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2720; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2720; 4:lCeKjsAuVUmU1K4b+afA1XmQWnvQR/MD/K7hNnLshDt79U6BGueAGLlXRpqhIra9rpLmiccnHCxOofw3Xzau5om6vwic9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yccUvii5iQ4HNhXlgCsM73UA30dzpuKcMMgfNX56b/OF8lTjJafOHRGRUOFzSQ2kcd90p+Yorwv8zt+Oul0IWhKUgprkf8bM7Lilcblr1XPFkmHg4D+RrJRukdJlFI5ybBmjHHC2AXTMvB+XvMKox3Ax56v5ZvyYWp0vNBkg0oTC0HhYACc5SSI7GGubFDWIi0Rw/h6tNuBjA3dm+6UdxITRm7/lCnE47a7EKak4=; 5:kqhBwsjyIraZwmo0ikmc6JsK29HCa1sSRMBkQGInAZ0teJaV1usm27vxEzjZQAFuNmM46BSX2hnshlvkEKpn6NottRzffNWU5KSju0jAdlCd0okqBGmBNgUrQk+WkgOkzeAVGyte3Kv/SLWJzd8nwA==; 24:6Eg/11eE7CcwePuVFnWneZXztsPaGBWbXHWF7Oci3Rll86Q7hxj0TmJN3wbgEW58aH5sqPRysXxkTYBhNS0Vtr76sHeB3TLr05DtSltfej4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2720; 7:vi3mSXm41NLTFaXqzWNAUHQ4PrID0c6eLEUQweimex2dIJj9U4UpwGTRdH16ygbcFs8Vo0+d3sjOypMW/v717/1L732dEYBWZ+3znZ7gXgMDF7HbUKlE9CIhrBfkAKIdET80g+r1ouuRi0lWBTtCFt/TjtJfqsBacS4J5601kB4J5NogPAHWqdlQiGbr8JQouzsyMQOJtIwSt0onOP1OA6AmQEXVjYSTBcMa4QJdYPu2Ne8y4TS0Hbvwsp26DGyIxoTMZqUo25LAnfsWIYcmGlJFrGZ72BVnqXnhxlDWcXuABuGjOqjvk9Zn3kFVUkJkn62GYf9DUxteayaoUuljWg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 10:30:45.7657 (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.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2720 Subject: [lng-odp] [API-NEXT PATCH v4 2/3] 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 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 118363e..b3dc0ca 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 { @@ -88,9 +122,110 @@ typedef struct odp_ipsec_inbound_config_t { } 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 { @@ -113,6 +248,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 @@ -139,12 +291,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 */ @@ -153,6 +312,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; /** @@ -392,13 +554,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 { @@ -439,6 +623,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 @@ -447,13 +646,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. @@ -686,6 +903,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; /** @@ -715,7 +944,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 @@ -740,6 +969,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 { @@ -765,6 +1023,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; /** @@ -786,18 +1061,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; @@ -928,10 +1199,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 @@ -941,6 +1212,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) @@ -953,10 +1229,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 @@ -966,6 +1242,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) @@ -976,6 +1255,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 Thu Mar 30 10:29: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: 96263 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp1170841obc; Thu, 30 Mar 2017 03:30:31 -0700 (PDT) X-Received: by 10.55.153.199 with SMTP id b190mr4873723qke.305.1490869831052; Thu, 30 Mar 2017 03:30:31 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k188si1476843qkd.87.2017.03.30.03.30.30; Thu, 30 Mar 2017 03:30:31 -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 3F7F363530; Thu, 30 Mar 2017 10:30:30 +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 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 EBF6662D36; Thu, 30 Mar 2017 10:30:25 +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 98F6E62B8D; Thu, 30 Mar 2017 10:30:23 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00111.outbound.protection.outlook.com [40.107.0.111]) by lists.linaro.org (Postfix) with ESMTPS id 8FA3D62B8D for ; Thu, 30 Mar 2017 10:30:17 +0000 (UTC) Received: from DB6PR07CA0090.eurprd07.prod.outlook.com (10.175.238.28) by VI1PR07MB0815.eurprd07.prod.outlook.com (10.161.107.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 10:30:15 +0000 Received: from VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by DB6PR07CA0090.outlook.office365.com (2603:10a6:6:2b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 10:30:15 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by VE1EUR03FT020.mail.protection.outlook.com (10.152.18.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 10:30:15 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATjMn020084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2UATjot020044 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 13:29:45 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 13:29:45 +0300 Message-ID: <1490869785-16657-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490869785-16657-1-git-send-email-petri.savolainen@linaro.org> References: <1490869785-16657-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.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39860400002)(39840400002)(39400400002)(39450400003)(39850400002)(2980300002)(199003)(189002)(9170700003)(189998001)(2906002)(22756006)(86362001)(50226002)(81166006)(5003940100001)(8676002)(356003)(47776003)(6916009)(2950100002)(305945005)(8936002)(77096006)(53936002)(76176999)(50986999)(36756003)(5660300001)(105596002)(33646002)(48376002)(2351001)(106466001)(110136004)(38730400002)(50466002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB0815; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT020; 1:sP/3At/k9xkqPup1MdVxwlDWvVJ+6YU7czX52D5mhUDqooBeRxJ3pHpxD9ELKNuYT8OOB7woFQByIkkM5hu8MkSnk1pxwb5Y3Er8AK2NviKlAgR3ltx32iRzdnVSWLLs8Doy0HVcEVYtDoBmbAdcHu1nWhzyxMVlX4CMoa3ccsgSxdx0RVYN4ReHI5jNd66I9kj01KtEyi9xpaXb7kcYzJQSS/4yLfCuFJisllqEkb5C9zn5JwlXQ0VskArbCClfpKxjsDvQR79z+ZmIUCYx05XGQzUmF9V/S/pPoFJh9L/qSpn6DSpoj8hfWKxwEnI6qx3GuYPGMOLu3PiB+783KIeiRzEoPhlDqGUkaYcjwtLMbAmgF3cJHCjox4AX/Wqgv+XIaQSRDsowgabkJw4tgFSyKMD9VUi+poLYDazKNPTSOIGBbU2MoxYttLNPLRejIoGr0/QIpGWCGhIBOfiMhwfpKGl6No0GJwNiMI9yy9Coby6WUO7XyymkNDfdiNoAhfT50JZ8KHmqftYUm4M+Sg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5079da63-1a84-4c5e-504b-08d47757c14c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:VI1PR07MB0815; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0815; 3:vKQMvXE3q9Y7jMrYsLYlc2jH7yWlizoyMaX73LJp73XEBhsmZqS8JluctOdz+fLUOofktgordnQkkZBx1t2Sbh/hohr+yRbS8aobLeWpM6S8JaCVcNVeqLl5yiFADamiArMeXTH/RLNqIvYhhrmknD2xFAYdRA2IBZQJbzQaijdhUwD38TiVD8x46HBOS9FOtmkQ163PGiVRbbYwtNwZJVjrVblLJSI7FIC3KNNqw8+1NYGAU9okh9gmgAttogiNAx6H8aiVSzWWbIokYN7smegSwYmjgvuPKfp2GSW9Zh8lX+LFfnDLEsPoxQ0qhHtnucsdk1cibd1qHlKSdcwWVFFAPhjt/8j2VtNVDeN95df/UhQ9yBU2H8SZ8dTYUDgjfoSwJeRoxcWI3W8cloxm7YGFjSXFuvdy0CleIAvM2TgHNtAefEAL7NG3ChJg6FVLoHHZNxiRfBLuYVlTdSjJP1SorjagMB27P5AZCpXW45yBTl61U65ccqNB8q0xcqBK X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0815; 25:hHicxNbRsSiHRYAyQgHR6BTxZSfQ4bWxiJhrd2Q6rOWPk8yvWMqAxz1vPyb5kyUdBLp2s94jpdN4r/bKoc8rFdz2itF7VR6pSvvN26Wodbq4aqMktosgc6uOYTI/kO9K91Hve6FllrdeVUxkyE41RRZn6vnugorV4saPM9aRYDhz/sS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Kij50j0HCk/LY/hweQare8T0ip7WhOahG5BhfTZkUoSESsG+OCd6y5Cn7YvlHjWRZIPjt0ECoAIqCVW99OaAei9QAclZHUGCsa+MV+FHvAPJiCIcma3oIaPgcgCkS+X8i3uYuKDuKpey+fwCEuC3mI28mw/rEAM6XZB9r21e9KPNGJt2O9rtlcB0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(13021025)(13023025)(13013025)(3002001)(10201501046)(93006067)(93003067)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:VI1PR07MB0815; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB0815; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0815; 4:zk4fwrtW75LeuoS3CP1q2mOM8ObhJiXsz3tM5fXVAE4+O+iNPrFjN6tCYyMAoe21bhJx+/xeHbfqcT6hYuIlRmwei1serWLCM1Q6XYgsZ8A80T7EvbWgjG0EWJs0XS5Gc3Z9LT3Lh3FBBkEkL2XlQb5OuF3ZxzCG7BdpVj4bMqUuRdp3rmmiTAExX/SAdhI8DMQqZSSc1cCztX+LEWMR1CIExLD7zbNR6UJ9fqi3bIpZ/SQ1t6cQt8RTtHfRdJYH3svK24sf2dO629hDXsPvJ8cqF9ajOLXs2WWvsQRvWvjMPL/1qhCIG0iN/JsLam7gRX7FdjryjH+VuySS5If6viqUzHrL5Ns/O6/Er495CL8W9Ucy7jZZq/klcSJP9LouWnIosC7HAu4yCbolta6bVpmb7m4fFG+yPe8mvtZ0rg/PQAwnRNJYVdGsG4M8OjrgJ8UnR5XUO16ThEI1zp3+jz41b6+WtHOGbjdOxBPZfRv1MjNX0+sLA/GsuAqEYTfKsPeaPq1D/7sI4IG1s0rm9vU+HAAz9qtKVTO/7pl/BNeOA4jB6Gd/yftc71xiA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uMTB3lDaPQu0V/f8sKvOE/WE2+kg/lCrvYO+uErw2/jDM3J67C9yZ3rzc/94/sXvJZuhoFFJE8e8bboY0HeZXkCfKFv2i8ZWlAWQPkFRHjBOMZQCVXJ1dVvxl14a2L2x6Em8sCMTlAIU8aH+tueA26vMFGGbda/9u94pUT25FVKcczvXd0bjdnz2qcmh3actwdxp+pWeE07XlPziTH9pUpSrAj4RbLyFpjiWoa3PhyvhJ1r7HAGNHc583Z+26ZgafVYClb2WksQ0Q6smK9QAreAeRnQ== X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0815; 6:cpRE2tB897UBggHLNJssRzG1BPoUUCdXZQG/Jyxcd1zrSkIirJR5rmLUGkdmI6FqzqtDgEDACGBTZaOglPYpcFLrHkThVgXPQmGH1cxoNhxd9bKirtKR3R+mZkcmYAwN3fH+fJUvUKilslxR4xX5XJvcXi79SK86hQlZSsczFL5WTMk26RSuRb62dPhV5OVZRm8AkcA0vY1CooFImiUFBggPONRv2OJXbervG+MxR8iEVias9SlSOyA7ThAn7XqukZPmy9EMoCvBs5N9teNnG2Nw37G2BynzBsMmDcLo/g7Az4EV2fuzVeMs6P4PkwY0kq2UGQ+dg5275U8N46jv/obKAIpIiVBa6IbLAHHO+McSPgAlPzCWG2HmCld5em8bAPVKY2eevqcbNLttTFR9GOeskaPhXG8IHsOAZRjVWGc=; 5:D3knL5W8AclM+KPmZj/DcE7hQru0jj6JcB32sww2/QH58HZ2n114kvr0lHbv6/E9qqQVEGbfFsHTf1vXx8E5x660WM/lSLhYHwNg+YS9zG7UC9z2Gw2OCNZxVSCFpThpckdLWmeGgZG+L/VoFskKrg==; 24:vyHTbLle4ZFV5YSVE+iHreS8Qsq1KfqtmqKEOOp8TNvIgBCwYaYzL5WElnS8FWrOcbLVEtb4f3MmXjv8TfahV05q682NtyWHjmxDWqBVYfg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB0815; 7:4ym+wYG0Er6xUgYTz1ggUYea6/bbh9+RS675eP6tTNN6bIxiohfAw/HDPetgl1en4t/imO+TIFyW8mntVjK6bwgSyNNvam7+gtRTjt6szxdbJZLtVIXJEUpwa4yE8Haj9wy05MFiRkPo4cFAOmeXnEYCQOen31/1j1Yq2UFC1Nci1UQlWpCUlICvRPCE0gE43hgLngv/0qkyxBf1Z2J0hUAMLse4X2Go2o+1zRQQ7aoAdeibL9+wd2elp0hKceJ2vXUemos6g2RdlDC3xn3zvFHHo6Tv0KmDXLMFB5KveAS7WElXHjdg4+UfmETnZDIgmSSrqLMxBpCsHwyN+PkT6w== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 10:30:15.2915 (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.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB0815 Subject: [lng-odp] [API-NEXT PATCH v4 3/3] 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;