From patchwork Fri Jun 16 10:49: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: 105704 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1238564qgd; Fri, 16 Jun 2017 03:52:12 -0700 (PDT) X-Received: by 10.200.3.47 with SMTP id q47mr11687273qtg.3.1497610332470; Fri, 16 Jun 2017 03:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497610332; cv=none; d=google.com; s=arc-20160816; b=iJyjIXxc2X1sBcAD/2TrEc9ye/sRQYE/f1eANyZm7UXk/IJGMo6sHPiSwJH8RLw58/ G5ELQdObtffVWmJRiZCaPYxsg+7W+jXrbQes90q3BG44iU68pFf4KqeVIgjPreU82Q1k zvJ6QqdsYoyj6Cmaq7UQskAyeS5dw6jW5YIfTJPq1zdglUTHOLsv/anAlx/rorGTAT22 cfrb3Zj5Uyb9frk7NIYHVyIbIFtCE1V+N+RebMFg7JoEcGJJzmX1h0uQ64XZV2qU6bn/ OccnzwcRAbM67xR8tFGoNS0Yy05+8cQGbxiRTU2RtbK5ObcjY1aPY5fV99h2FLJ6JPSk ckRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=/kwVIDidEU0YszaRw/kIABv+fGOID2Qo1CmN4q+BiYE=; b=jru4v6jahKOF1oTpmymf1T96pczh1x3dqZI7zn0ZGMm/4PKkbXj/c3i1gEJ3bWpf0m 02c5rYuF6OchkfoIyaDqMZFKUkyqly0WaCDAW/RUFY+YYPN1S4fFWJdaLdNwEefm0wun Zi0V/H6O7CDPqKtvZw6INrUKXyN/6fycSWSMTTA/XDQTQHFVg88yUgSHa51bwlRTE992 mw0HYKBAFPqn+ymmov3jgE4gw3m+a5FN1pNUOQa3l90isBkuS2YAtwmmcLdc8tItz28S ccKcw5LOwyHbKZdYj/GNsIJSEx2IlTzFbStxiHhknYpLXJ9l/zs7fDlrQE9/uzzsXLfv i8JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t33si1710128qtt.217.2017.06.16.03.52.12; Fri, 16 Jun 2017 03:52:12 -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 1942960C25; Fri, 16 Jun 2017 10:52:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id ED3E360C3A; Fri, 16 Jun 2017 10:50:32 +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 B3A8760C32; Fri, 16 Jun 2017 10:50:19 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0124.outbound.protection.outlook.com [104.47.2.124]) by lists.linaro.org (Postfix) with ESMTPS id 98FA36081D for ; Fri, 16 Jun 2017 10:50:08 +0000 (UTC) Received: from DB6PR07CA0095.eurprd07.prod.outlook.com (2603:10a6:6:2b::33) by AM5PR0701MB1745.eurprd07.prod.outlook.com (2603:10a6:203:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.10; Fri, 16 Jun 2017 10:50:06 +0000 Received: from VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::205) by DB6PR07CA0095.outlook.office365.com (2603:10a6:6:2b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.6 via Frontend Transport; Fri, 16 Jun 2017 10:50:06 +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 VE1EUR03FT048.mail.protection.outlook.com (10.152.19.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1157.12 via Frontend Transport; Fri, 16 Jun 2017 10:50:06 +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 v5GAneOT018255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 16 Jun 2017 13:49:40 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v5GAnec0018212 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 16 Jun 2017 13:49:40 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 16 Jun 2017 13:49:39 +0300 Message-ID: <20170616104940.20166-3-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170616104940.20166-1-petri.savolainen@linaro.org> References: <20170616104940.20166-1-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:CAL; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39840400002)(39400400002)(39850400002)(39860400002)(2980300002)(189002)(199003)(9170700003)(77096006)(53946003)(38730400002)(110136004)(53936002)(48376002)(50466002)(5660300001)(189998001)(498600001)(22756006)(1076002)(2906002)(47776003)(33646002)(2351001)(105596002)(575784001)(305945005)(356003)(106466001)(2950100002)(6916009)(8676002)(81166006)(76176999)(5003940100001)(50986999)(50226002)(8936002)(86362001)(36756003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0701MB1745; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT048; 1:A103jBBGqvr4+dBwm+jdOxjXTbWG/cDpMFSxbi1y9TX+xuSY+Xms+1RshR8FudchzIW5WKuPLR2hY1Gd9dBymI3J3Hr9cjXdpdDcfpQbl+7x70VL8KLSPAhAZcPnzZhgZAwC4mjBfMmeHlTo3qAPLS0YnzxJnG02t7WG0zcY3wfszvxi9xGDQoPq7xDqIbzPLxJtNfYdkE31q5AfDxnQ8RftsRyi+Zph8aHyDL/kczBxRNpJx+Pt/UzixIDfb4R7PqApy552Jqly4T5hM9F6z884sgbV2Eap7W4f3WFoHtQWZiP1QzqChcn4QAG7AHdRDiyyZfoJOOVz2YJNdrDqVnrrlWD9JimhAUywA/S5pmeX5+vraYOt8hZKS8trAShS22Boy3MIieKe7MY8CilnViA/WY+md3ONw1N5KsPHdEolzzLAm2KHafGdb1rl1I6nTMx2z96b6EJIESrytR9953WIa5lEldLDzqfg1m1pCd+9po6bvpoJuvYtRMxp1DGcycgXYuP12yKI+e+C1iZ/Dm9r5IptZTW+iMtHabucOZM= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: cb4962a9-4df4-4187-ce3a-08d4b4a57394 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM5PR0701MB1745; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB1745; 3:z1qvUsL6uFwS6re0A7RwsFgTbViDbhqHZdEm0vEA3BW/fi1nOWVrL9PtxcZSciQGbClw7jJlvL5zNTbHp+zE+UbHVjdBDq+bYt1FTooKNZOwaiLzr+vbafQGsUF9Z0gKFKZwufAO56hQhrTisIVIXkaoo7DBOh9ogRvjbkgEzSRmi3oBGGZ+cvmxM7/9QrfHU28My4+p+12G2uJQTWIFhzUApCvIrf00tUTvC3aukgeexZL001Gieyy/6AmolBddHWbqVoGP2E39neFURX9FeLMzvJFEUf4ChxWXgP61FRP3JSd+OBQkhPgLsZS01KNVXfs26BEB2yLCNj/W/37huFEpISvyE9/hYD4NCoHA8HvIsd1Adoi3djOTY30IaGYYnZo00o8exG1IJxAMP398u/lOuwWHE4m9zsJeduskg8OSlsDm1oEGMVWbhi5oJPSEdQJmryBR7f1P5xH6Ww2tyw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR0701MB1745: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB1745; 25:ercZh6Viuvss8VLCkgJPJr2LvY+vmRQEkmBQixpzYCRm6i01JDqEEVoWcru3SPLbxN5Ou6L1dT899BwB6W9NxbwM+9a7QSbtnDpvlCDB9xgx6pLPJC1Oja6oo6FlezdHlbhDuEsYpktqdH3VqHL1E87eNook1xRhTFQfw+tVaRzXsbSSANBr6g+AJZ3DvBJdfCQnika6Ze2ZcrrL0az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7CfU8NuVhC/9pSmftXPbroH1pksw1fXwtakcfNFnB58gPTlzXsvV7Z1xJSE6dB7GqkSCl1g1sXQlPlqAWlhfuduNzA08JXLwVWPMkjHqieD9PtUBktb+HqJWSVjS4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13021025)(8121501046)(5005006)(13013025)(93006095)(93003095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0701MB1745; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0701MB1745; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0701MB1745; 4:AzLOykSIG6JzFQgaffY7TiJWao2b1J26hvYI3zuC?= C/W7XTBiFUI+J0azzdnGW8EG7gU7rLWVmw0hsn8eoOFbv7sUHzyKtKnulmswEGaorTcaueuP4LFkh24TVyWix9oyGEaLUepFkCRQiztfqh9ZKg5mBH4l6H3SKKVGwG7DJ4dHahUkK8b5XnSoVtstaUGgH+aBQmXLoxeWXyhhI6Yq2Z3ejOKIknCpoPPpqTC1RNSS1t0dBhw/FTZF6JhI5CEEiirtDSGDlK5X5B4kNIvxOab8nd4fs7pVZrEB31UoF+CG7KwV1bu5pXznRdBpldYWtl+K9IGEnA15fORnQoOgO0n+V2t/Hxf0NFK8YQjeRve3T0rvBB2Lqk/ajfKEDEFQAwjWsZN2mHK/WjfFCrAIPvkg0hBrrc+m6l0gLPN4DPbHJ1jNYueO3Ozk0dHettADYvKRX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1PJkZpBWF3TprU3MfcoR1CkZabZGv9CmhwkLkEefDaY4+UxGTanZZ8c70ftdMcSarsENNxmpMClktHQarAkWtw7Kr99M2iCizCPACb0WzqTklpcdxN7mtjcUwzYVA1bfb3x53pLqECJOxFjDvFKWFOzaoUlMyCS51LtX3HAsPRPQUjT4l0THs/EW0J+3fwbXsud6ZVTbbDHXim2/gwGxCpqxCv7ffFUAYO8BIcjKVVlIGU3gtl6ahRbyTb6aESkaLrZkG0AkQKCKkXrgvS9tHXnHVW7XYz37AdF4EyIRVbj1lOONFiD86x8J4Rpr/MZ7BnNdxx9jcgNTIteEjlsyg= X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 10:50:06.5943 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.241]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0701MB1745 Subject: [lng-odp] [API-NEXT PATCH v3 2/3] api: ipsec: change IPSEC result to packet X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Input and output of IPSEC operations are packets. Parameter and result structures are cleaner when packet arrays are direct parameters to functions. Also API is more flexible for application and API pipelining when output is packets with additional metadata. Application or API pipeline stages which do not care about IPSEC results may work on basic packet metadata. IPSEC result event type changes from ODP_EVENT_IPSEC_RESULT to ODP_EVENT_PACKET. Event subtype (ODP_EVENT_PACKET_IPSEC) can be used to identify packets with IPSEC metadata. Signed-off-by: Petri Savolainen --- include/odp/api/spec/ipsec.h | 412 +++++++++++++++++++++---------------- platform/linux-generic/odp_ipsec.c | 67 ++++-- 2 files changed, 279 insertions(+), 200 deletions(-) -- 2.13.0 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 65f0b066..372ef462 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -552,16 +552,18 @@ typedef enum odp_ipsec_frag_mode_t { /** * Packet lookup mode + * + * Lookup mode controls how an SA participates in SA lookup offload. + * Inbound operations perform SA lookup if application does not provide a SA as + * a parameter. In inline mode, a lookup miss directs the packet back to normal + * packet input interface processing. SA lookup failure status (error.sa_lookup) + * is reported through odp_ipsec_packet_result_t. */ typedef enum odp_ipsec_lookup_mode_t { - /** Inbound SA lookup is disabled. */ + /** Inbound SA lookup is disabled for the SA. */ ODP_IPSEC_LOOKUP_DISABLED = 0, - /** Inbound SA lookup is enabled. Lookup matches only SPI value. - * In inline mode, a lookup miss directs the packet back to normal - * packet input interface processing. In other modes, the SA lookup - * failure status (error.sa_lookup) is reported through - * odp_ipsec_packet_result_t. */ + /** Inbound SA lookup is enabled. Lookup matches only SPI value. */ ODP_IPSEC_LOOKUP_SPI, /** Inbound SA lookup is enabled. Lookup matches both SPI value and @@ -572,13 +574,13 @@ typedef enum odp_ipsec_lookup_mode_t { } odp_ipsec_lookup_mode_t; /** - * Result event pipeline configuration + * IPSEC pipeline configuration */ typedef enum odp_ipsec_pipeline_t { - /** Do not pipeline */ + /** Do not pipeline. Send all resulting events to the application. */ ODP_IPSEC_PIPELINE_NONE = 0, - /** Send IPSEC result events to the classifier. + /** Send resulting packets to the classifier * * IPSEC capability 'pipeline_cls' determines if pipelined * classification is supported. */ @@ -659,9 +661,9 @@ typedef struct odp_ipsec_sa_param_t { */ uint32_t mtu; - /** Select pipelined destination for IPSEC result events + /** Select pipelined destination for resulting events * - * Asynchronous and inline modes generate result events. Select where + * Asynchronous and inline modes generate events. Select where * those events are sent. Inbound SAs may choose to use pipelined * classification. The default value is ODP_IPSEC_PIPELINE_NONE. */ @@ -670,18 +672,19 @@ typedef struct odp_ipsec_sa_param_t { /** Destination queue for IPSEC events * * Operations in asynchronous or inline mode enqueue resulting events - * into this queue. + * into this queue. The default queue ('default_queue') is used when + * SA is not known. */ odp_queue_t dest_queue; - /** Classifier destination CoS for IPSEC result events + /** Classifier destination CoS for resulting packets * - * Result events for successfully decapsulated packets are sent to - * classification through this CoS. Other result events are sent to - * 'dest_queue'. This field is considered only when 'pipeline' is + * Successfully decapsulated packets are sent to classification + * through this CoS. Other resulting events are sent to 'dest_queue'. + * This field is considered only when 'pipeline' is * ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared between any pktio * interface default CoS. The maximum number of different CoS supported - * is defined by IPsec capability max_cls_cos. + * is defined by IPSEC capability max_cls_cos. */ odp_cos_t dest_cos; @@ -850,17 +853,6 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa); */ uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa); -/** - * IPSEC operation level options - * - * These may be used to override some SA level options - */ -typedef struct odp_ipsec_op_opt_t { - /** Fragmentation mode */ - odp_ipsec_frag_mode_t mode; - -} odp_ipsec_op_opt_t; - /** IPSEC operation status has no errors */ #define ODP_IPSEC_OK 0 @@ -870,7 +862,8 @@ typedef struct odp_ipsec_op_status_t { union { /** Error flags */ struct { - /** Protocol error. Not a valid ESP or AH packet. */ + /** Protocol error. Not a valid ESP or AH packet, + * packet data length error, etc. */ uint32_t proto : 1; /** SA lookup failed */ @@ -934,41 +927,70 @@ typedef struct odp_ipsec_op_status_t { } odp_ipsec_op_status_t; /** - * IPSEC operation input parameters + * IPSEC outbound operation options + * + * These may be used to override some SA level options */ -typedef struct odp_ipsec_op_param_t { - /** Number of packets to be processed */ - int num_pkt; +typedef struct odp_ipsec_out_opt_t { + /** Fragmentation mode */ + odp_ipsec_frag_mode_t mode; + +} odp_ipsec_out_opt_t; +/** + * IPSEC outbound operation parameters + */ +typedef struct odp_ipsec_out_param_t { /** Number of SAs * + * Outbound IPSEC operation needs SA from application. Use either + * single SA for all packets, or a SA per packet. + * * Valid values are: - * * 0: No SAs (default) - * * 1: Single SA for all packets - * * num_pkt: SA per packet + * - 1: Single SA for all packets + * - N: A SA per packet. N must match the number of packets. */ int num_sa; - /** Number of operation options + /** Number of outbound operation options * * Valid values are: - * * 0: No options (default) - * * 1: Single option for all packets - * * num_pkt: An option per packet + * - 0: No options + * - 1: Single option for all packets + * - N: An option per packet. N must match the number of packets. */ int num_opt; - /** Pointer to an array of packets + /** Pointer to an array of IPSEC SAs */ + odp_ipsec_sa_t *sa; + + /** Pointer to an array of outbound operation options + * + * May be NULL when num_opt is zero. + */ + odp_ipsec_out_opt_t *opt; + +} odp_ipsec_out_param_t; + +/** + * IPSEC inbound operation parameters + */ +typedef struct odp_ipsec_in_param_t { + /** Number of SAs * - * Each packet must have a valid value for these metadata: - * * L3 offset: Offset to the first byte of the (outmost) IP header - * * L4 offset: For inbound direction, when udp_encap is enabled - - * offset to the first byte of the encapsulating UDP - * header + * Inbound IPSEC operation processes a packet using the SA provided by + * the application. If the application does not provide an SA, the + * operation searches for the SA by matching the input packet with all + * inbound SAs according to the lookup mode (odp_ipsec_lookup_mode_t) + * configured in each SA. When passing SAs, use either single SA for + * all packets, or a SA per packet. * - * @see odp_packet_l3_offset(), odp_packet_l4_offset() + * Valid values are: + * - 0: No SAs. SA lookup is done for all packets. + * - 1: Single SA for all packets + * - N: A SA per packet. N must match the number of packets. */ - odp_packet_t *pkt; + int num_sa; /** Pointer to an array of IPSEC SAs * @@ -976,18 +998,12 @@ typedef struct odp_ipsec_op_param_t { */ odp_ipsec_sa_t *sa; - /** Pointer to an array of operation options - * - * May be NULL when num_opt is zero. - */ - odp_ipsec_op_opt_t *opt; - -} odp_ipsec_op_param_t; +} odp_ipsec_in_param_t; /** * Outbound inline IPSEC operation parameters */ -typedef struct odp_ipsec_inline_op_param_t { +typedef struct odp_ipsec_out_inline_param_t { /** Packet output interface for inline output operation * * Outbound inline IPSEC operation uses this packet IO interface to @@ -1011,7 +1027,7 @@ typedef struct odp_ipsec_inline_op_param_t { uint32_t len; } outer_hdr; -} odp_ipsec_inline_op_param_t; +} odp_ipsec_out_inline_param_t; /** * IPSEC operation result for a packet @@ -1020,16 +1036,6 @@ typedef struct odp_ipsec_packet_result_t { /** IPSEC operation status */ odp_ipsec_op_status_t status; - /** Number of output packets created from the corresponding input packet - * - * Without fragmentation offload this is always one. However, if the - * input packet was fragmented during the operation this is larger than - * one for the first returned fragment and zero for the rest of the - * fragments. All the fragments (of the same source packet) are stored - * consecutively in the 'pkt' array. - */ - int num_out; - /** IPSEC SA that was used to create the packet * * Operation updates this SA handle value, when SA look up is performed @@ -1040,7 +1046,8 @@ typedef struct odp_ipsec_packet_result_t { odp_ipsec_sa_t sa; /** Packet outer header status before inbound inline processing. - * This is valid only when status.flag.inline_mode is set. + * This is valid only when outer headers are retained + * (see odp_ipsec_inbound_config_t) and status.flag.inline_mode is set. */ struct { /** Points to the first byte of retained outer headers. These @@ -1048,7 +1055,7 @@ typedef struct odp_ipsec_packet_result_t { * implementation specific memory space. Since the memory space * may overlap with e.g. packet head/tailroom, the content * becomes invalid if packet data storage is modified in - * anyway. The memory space may not be sharable to other + * any way. The memory space may not be shareable to other * threads. */ uint8_t *ptr; @@ -1059,51 +1066,6 @@ typedef struct odp_ipsec_packet_result_t { } odp_ipsec_packet_result_t; /** - * IPSEC operation results - */ -typedef struct odp_ipsec_op_result_t { - /** Number of packets - * - * Application sets this to the maximum number of packets the operation - * may output (number of elements in 'pkt' and 'res' arrays). - * The operation updates it with the actual number of packets - * outputted. - */ - int num_pkt; - - /** Pointer to an array of packets - * - * Operation outputs packets into this array. The array must have - * at least 'num_pkt' elements. - * - * Each successfully transformed packet has a valid value for these - * metadata regardless of the inner packet parse configuration. - * (odp_ipsec_inbound_config_t): - * * L3 offset: Offset to the first byte of the (outmost) IP header - * * pktio: For inbound inline IPSEC processed packets, original - * packet input interface - * - * Other metadata for parse results and error checks depend on - * configuration (selected parse and error check levels). - */ - odp_packet_t *pkt; - - /** Pointer to an array of per packet operation results - * - * Operation outputs results for each outputted packet into this array. - * The array must have at least 'num_pkt' elements. The results include - * operation status and packet form information for each outputted - * packet. - * - * For example, some packets may not have been transformed due to - * an error, but the original packet is returned with appropriate - * packet result information instead. - */ - odp_ipsec_packet_result_t *res; - -} odp_ipsec_op_result_t; - -/** * IPSEC status ID */ typedef enum odp_ipsec_status_id_t { @@ -1136,20 +1098,33 @@ typedef struct odp_ipsec_status_t { * * This operation does inbound IPSEC processing in synchronous mode * (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of - * packets consumed and outputs a new packet handle as well as an operation - * result for each outputted packet. The operation does not modify packets that - * it does not consume. It cannot consume all input packets if 'output.num_pkt' - * is smaller than 'input.num_pkt'. + * packets consumed and outputs a new packet handle for each outputted packet. + * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t), + * which should be checked for transformation errors, etc. Outputted packets + * with error status have not been transformed but the original packet is + * returned. The operation does not modify packets that it does not consume. + * It cannot consume all input packets if 'num_out' is smaller than 'num_in'. * * Packet context pointer and user area content are copied from input to output * packets. Output packets are allocated from the same pool(s) as input packets. * - * When 'input.num_sa' is zero, this operation performs SA look up for each + * When 'param.num_sa' is zero, this operation performs SA look up for each * packet. Otherwise, application must provide the SA(s) as part of operation - * input parameters (odp_ipsec_op_param_t). The operation outputs used SA(s) as - * part of per packet operation results (odp_ipsec_packet_result_t), or an error + * input parameters (odp_ipsec_in_param_t). The operation outputs used SA(s) as + * part of per packet results (odp_ipsec_packet_result_t), or an error * status if a SA was not found. * + * Each input packet must have a valid value for these metadata (other metadata + * is ignored): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - L4 offset: When udp_encap is enabled, offset to the first byte of the + * encapsulating UDP header + * + * Additionally, implementation checks input IP packet length (odp_packet_len() + * minus odp_packet_l3_offset()) against protocol headers and reports an error + * (status.error.proto) if packet data length is less than protocol headers + * indicate. + * * Packets are processed in the input order. Packet order is maintained from * input 'pkt' array to output 'pkt' array. Packet order is not guaranteed * between calling threads. @@ -1162,35 +1137,61 @@ typedef struct odp_ipsec_status_t { * restored. The amount and content of packet data before the IP header is * undefined. * - * @param input Operation input parameters - * @param[out] output Operation results - * - * @return Number of input packets consumed (0 ... input.num_pkt) + * Each successfully transformed packet has a valid value for these metadata + * regardless of the inner packet parse configuration + * (odp_ipsec_inbound_config_t): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - pktio: For inline IPSEC processed packets, original packet input + * interface + * + * Other metadata for parse results and error checks depend on configuration + * (selected parse and error check levels). + * + * @param pkt_in Packets to be processed + * @param num_in Number of packets to be processed + * @param[out] pkt_out Packet handle array for resulting packets + * @param[in, out] num_out Number of resulting packets. Application sets this + * to 'pkt_out' array size. A successful operation sets + * this to the number of outputted packets + * (1 ... num_out). + * @param param Inbound operation parameters + * + * @return Number of input packets consumed (0 ... num_in) * @retval <0 On failure * - * @see odp_packet_user_ptr(), odp_packet_user_area() + * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset(), + * odp_packet_l4_offset() */ -int odp_ipsec_in(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output); +int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_in_param_t *param); /** * Outbound synchronous IPSEC operation * * This operation does outbound IPSEC processing in synchronous mode * (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of - * packets consumed and outputs a new packet handle as well as an operation - * result for each outputted packet. The operation does not modify packets that - * it does not consume. It cannot consume all input packets if 'output.num_pkt' - * is smaller than 'input.num_pkt'. + * packets consumed and outputs a new packet handle for each outputted packet. + * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t), + * which should be checked for transformation errors, etc. Outputted packets + * with error status have not been transformed but the original packet is + * returned. The operation does not modify packets that it does not consume. + * It cannot consume all input packets if 'num_out' is smaller than 'num_in'. * * Packet context pointer and user area content are copied from input to output * packets. Output packets are allocated from the same pool(s) as input packets. * * When outbound IP fragmentation offload is enabled, the number of outputted - * packets (and corresponding per packet results) may be greater than - * the number of input packets. In that case, application may examine 'num_out' - * of each packet result (odp_ipsec_packet_result_t) to find out which - * fragments are originated from which input packet. + * packets may be greater than the number of input packets. + * + * Each input packet must have a valid value for these metadata (other metadata + * is ignored): + * - L3 offset: Offset to the first byte of the (outmost) IP header + * - L4 offset: Offset to the L4 header if L4 checksum offload is requested + * + * Additionally, input IP packet length (odp_packet_len() minus + * odp_packet_l3_offset()) must match values in protocol headers. Otherwise + * results are undefined. * * Packets are processed in the input order. Packet order is maintained from * input 'pkt' array to output 'pkt' array. Packet order is not guaranteed @@ -1201,31 +1202,40 @@ int odp_ipsec_in(const odp_ipsec_op_param_t *input, * with IPSEC, etc headers constructed according to the standards. The amount * and content of packet data before the IP header is undefined. * - * @param input Operation input parameters - * @param[out] output Operation results + * Each successfully transformed packet has a valid value for these metadata: + * - L3 offset: Offset to the first byte of the (outmost) IP header + * + * @param pkt_in Packets to be processed + * @param num_in Number of packets to be processed + * @param[out] pkt_out Packet handle array for resulting packets + * @param[in, out] num_out Number of resulting packets. Application sets this + * to 'pkt_out' array size. A successful operation sets + * this to the number of outputted packets + * (1 ... num_out). + * @param param Outbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num_in) * @retval <0 On failure * - * @see odp_packet_user_ptr(), odp_packet_user_area() + * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset() */ -int odp_ipsec_out(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output); +int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_out_param_t *param); /** * Inbound asynchronous IPSEC operation * * This operation does inbound IPSEC processing in asynchronous mode. It - * processes packets otherwise identically to odp_ipsec_in(), but outputs all - * results through one or more ODP_EVENT_IPSEC_RESULT events with the following - * ordering considerations. + * processes packets otherwise identically to odp_ipsec_in(), but outputs + * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC + * subtype). The following ordering considerations apply to the events. * * Asynchronous mode maintains packet order per SA when application calls the * operation within an ordered or atomic scheduler context of the same queue. - * Resulting events for the same SA are enqueued in order and packet handles - * (for the same SA) are stored in order within an event. Packet order per SA at - * a destination queue is the same as if application would have enqueued packets - * there with odp_queue_enq_multi(). + * Resulting events for the same SA are enqueued in order. Packet order per SA + * at a destination queue is the same as if application would have enqueued + * packets there with odp_queue_enq_multi(). * * Packet order is also maintained when application otherwise guarantees * (e.g. using locks) that the operation is not called simultaneously from @@ -1239,29 +1249,31 @@ int odp_ipsec_out(const odp_ipsec_op_param_t *input, * may be processed simultaneously in both modes (initiated by this function * and inline operation). * - * @param input Operation input parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Inbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_in(), odp_ipsec_result() */ -int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); +int odp_ipsec_in_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_in_param_t *param); /** * Outbound asynchronous IPSEC operation * * This operation does outbound IPSEC processing in asynchronous mode. It - * processes packets otherwise identically to odp_ipsec_out(), but outputs all - * results through one or more ODP_EVENT_IPSEC_RESULT events with the following - * ordering considerations. + * processes packets otherwise identically to odp_ipsec_out(), but outputs + * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC + * subtype). The following ordering considerations apply to the events. * * Asynchronous mode maintains packet order per SA when application calls the * operation within an ordered or atomic scheduler context of the same queue. - * Resulting events for the same SA are enqueued in order and packet handles - * (for the same SA) are stored in order within an event. Packet order per SA at - * a destination queue is the same as if application would have enqueued packets - * there with odp_queue_enq_multi(). + * Resulting events for the same SA are enqueued in order. Packet order per SA + * at a destination queue is the same as if application would have enqueued + * packets there with odp_queue_enq_multi(). * * Packet order is also maintained when application otherwise guarantees * (e.g. using locks) that the operation is not called simultaneously from @@ -1273,14 +1285,17 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input); * The function may be used also in inline processing mode, e.g. for IPSEC * packets for which inline processing is not possible. * - * @param input Operation input parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Outbound operation parameters * - * @return Number of input packets consumed (0 ... input.num_pkt) + * @return Number of input packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_out(), odp_ipsec_result() */ -int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); +int odp_ipsec_out_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param); /** * Outbound inline IPSEC operation @@ -1288,42 +1303,75 @@ int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input); * This operation does outbound inline IPSEC processing for the packets. It's * otherwise identical to odp_ipsec_out_enq(), but outputs all successfully * transformed packets to the specified output interface, instead of generating - * result events for those. + * events for those. * * Inline operation parameters are defined per packet. The array of parameters - * must have 'op_param.num_pkt' elements and is pointed to by 'inline_param'. + * must have 'num' elements and is pointed to by 'inline_param'. * - * @param op_param Operation parameters - * @param inline_param Outbound inline operation specific parameters + * @param pkt Packets to be processed + * @param num Number of packets to be processed + * @param param Outbound operation parameters + * @param inline_param Outbound inline operation specific parameters * - * @return Number of packets consumed (0 ... op_param.num_pkt) + * @return Number of packets consumed (0 ... num) * @retval <0 On failure * * @see odp_ipsec_out_enq() */ -int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, - const odp_ipsec_inline_op_param_t *inline_param); +int odp_ipsec_out_inline(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param, + const odp_ipsec_out_inline_param_t *inline_param); + +/** + * Convert IPSEC processed packet event to packet handle + * + * Get packet handle to an IPSEC processed packet event. Event subtype must be + * ODP_EVENT_IPSEC_PACKET. IPSEC operation results can be examined with + * odp_ipsec_result(). + * + * @param ev Event handle + * + * @return Packet handle + * + * @see odp_event_subtype(), odp_ipsec_result() + */ +odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev); /** - * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event + * Convert IPSEC processed packet handle to event + * + * The packet handle must be an output of an IPSEC operation. * - * Copies IPSEC operation results from an event. The event must be of - * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes - * any resulting packet handles to other ODP calls. + * @param pkt Packet handle from IPSEC operation * - * @param[out] result Pointer to operation result for output. Maybe NULL, if - * application is interested only on the number of - * packets. - * @param event An ODP_EVENT_IPSEC_RESULT event + * @return Event handle + */ +odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt); + +/** + * Get IPSEC operation results from an IPSEC processed packet * - * @return Number of packets in the event. If this is larger than - * 'result.num_pkt', all packets did not fit into result struct and - * application must call the function again with a larger result struct. + * Successful IPSEC operations of all types (SYNC, ASYNC and INLINE) produce + * packets which contain IPSEC result metadata. This function copies the + * operation results from an IPSEC processed packet. Event subtype of this kind + * of packet is ODP_EVENT_PACKET_IPSEC. Results are undefined if a non-IPSEC + * processed packet is passed as input. + * + * Some packet API operations output a new packet handle + * (e.g. odp_packet_concat()). IPSEC metadata remain valid as long as the packet + * handle is not changed from the original (output of e.g. odp_ipsec_in() or + * odp_ipsec_packet_from_event() call) IPSEC processed packet handle. + * + * @param[out] result Pointer to operation result for output + * @param packet An IPSEC processed packet (ODP_EVENT_PACKET_IPSEC) + * + * @retval 0 On success * @retval <0 On failure * - * @see odp_ipsec_in_enq(), odp_ipsec_out_enq() + * @see odp_ipsec_in(), odp_ipsec_in_enq(), odp_ipsec_out(), + * odp_ipsec_out_enq(), odp_ipsec_packet_from_event() */ -int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event); +int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet); /** * Get IPSEC status information from an ODP_EVENT_IPSEC_STATUS event diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index 10918dfb..c7eeb4ec 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -73,51 +73,68 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa) return -1; } -int odp_ipsec_in(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output) -{ - (void)input; - (void)output; +int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_in_param_t *param) +{ + (void)pkt_in; + (void)num_in; + (void)pkt_out; + (void)num_out; + (void)param; return -1; } -int odp_ipsec_out(const odp_ipsec_op_param_t *input, - odp_ipsec_op_result_t *output) +int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, + odp_packet_t pkt_out[], int *num_out, + const odp_ipsec_out_param_t *param) { - (void)input; - (void)output; + (void)pkt_in; + (void)num_in; + (void)pkt_out; + (void)num_out; + (void)param; return -1; } -int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input) +int odp_ipsec_in_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_in_param_t *param) { - (void)input; + (void)pkt; + (void)num; + (void)param; return -1; } -int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input) +int odp_ipsec_out_enq(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param) { - (void)input; + (void)pkt; + (void)num; + (void)param; return -1; } -int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, - const odp_ipsec_inline_op_param_t *inline_param) +int odp_ipsec_out_inline(const odp_packet_t pkt[], int num, + const odp_ipsec_out_param_t *param, + const odp_ipsec_out_inline_param_t *inline_param) { - (void)op_param; + (void)pkt; + (void)num; + (void)param; (void)inline_param; return -1; } -int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event) +int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet) { (void)result; - (void)event; + (void)packet; return -1; } @@ -145,6 +162,20 @@ void *odp_ipsec_sa_context(odp_ipsec_sa_t sa) return NULL; } +odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev) +{ + (void)ev; + + return ODP_PACKET_INVALID; +} + +odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt) +{ + (void)pkt; + + return ODP_EVENT_INVALID; +} + uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa) { return _odp_pri(sa);