From patchwork Tue Nov 28 16:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 119888 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1892153qgn; Tue, 28 Nov 2017 08:02:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMaqFF3KoTg+n1yxjiqqyWrpQdZnyxquAsioY/FPOWqgX5D+5YnIXQJ/eAzHLWp7uApBoNEl X-Received: by 10.237.63.33 with SMTP id p30mr66273570qtf.321.1511884942394; Tue, 28 Nov 2017 08:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511884942; cv=none; d=google.com; s=arc-20160816; b=UWNLthYZiQjlFpnvbGaSfvm1+L57h0ppJ1YHnZGdQWeOSZVuR04bM7I7Vd9WP+OZDm IaKDd6h+dLuN0G2Kddsi3re95mdztVK0ztTgzaCBhxu7E+kugP3OC9x8cpx7irCV0So0 b9lbdsC7zuUnj3ZFC3HAA3ET14kX70A1IOGwu1QJRynX167wGSuhmjvQN2KDwGlPsEU3 6vobr0kZ71swB53DsPr2HcfVNj8ih+pHP9GSs2+h8YBWVJRl2cdSO6M1Iab3hujE+Jty qJEgzgYVww5pfv5MuJ070zRIqBtZdkqqiQdBoaa9qwAe6iWN61ZwUCiPpDOQEIQR5Hpc EoPg== 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:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=/9xK0UKAWd2dMfYNLGUXoSV4nkhvlSBU5VGvoICeGoE=; b=EhoQkoRoB3q/TZrLGgo+wfBFKjzvjKDNAApAf/wK1ovdpp4CKNI3FsEz7kxZ2xeE6y OOj0hYMd1npmx0F1sAgzPBJ+ahsO+V4n1qbfnmnN5dSMsllvZdey6JBg/lg/V+45CFyv w6FM8zxcKFJV+ovqj/ExGz9OEVb0m/GwyCO0icBM+oUWwnf6pSaZBzfUpuhain/QoTXP 6gdz093PX7IFf9Dseck1tb/bxV+0uEpofR2qHd8KibHooBbQ5tI8Sy3gPP1Wa4LmHBTU wj5pT9KNpJmBIDaYWAQwyF9UfF6rf/G02L3rIs/PEfA+gAnzLwa9MWKOxpOrPHeeGoe/ QrkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 144si11231864qki.207.2017.11.28.08.02.21; Tue, 28 Nov 2017 08:02:22 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A9D79608FD; Tue, 28 Nov 2017 16:02:21 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 9CF5D60902; Tue, 28 Nov 2017 16:00:43 +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 22EBB608E0; Tue, 28 Nov 2017 16:00:21 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 96BE0608D9 for ; Tue, 28 Nov 2017 16:00:10 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward105o.mail.yandex.net (Yandex) with ESMTP id D05344445E9D for ; Tue, 28 Nov 2017 19:00:08 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id D4VPAiksfn-08QeqaIc; Tue, 28 Nov 2017 19:00:08 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AgEzSO8coM-08eGlgOe; Tue, 28 Nov 2017 19:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 28 Nov 2017 19:00:05 +0300 Message-Id: <1511884806-10328-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511884806-10328-1-git-send-email-odpbot@yandex.ru> References: <1511884806-10328-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 311 Subject: [lng-odp] [PATCH API-NEXT v2 1/2] api: ipsec: add capabilities for fragmentation 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" From: Dmitry Eremin-Solenikov It is expected that implementation can support any combination of fragmentatation (after, before, both or none). Add capabilities to report such support to application. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 311 (lumag:ipsec-caps) ** https://github.com/Linaro/odp/pull/311 ** Patch: https://github.com/Linaro/odp/pull/311.patch ** Base sha: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 63ff9ce47f9c9abab3f9e75acfffb4737cfca756 **/ include/odp/api/spec/ipsec.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 4a33af8ea..0be9664eb 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -260,6 +260,12 @@ typedef struct odp_ipsec_capability_t { /** IP Authenticated Header (ODP_IPSEC_AH) support */ odp_support_t proto_ah; + /** Fragment after IPsec support */ + odp_support_t frag_after; + + /** Fragment before IPsec support */ + odp_support_t frag_before; + /** * Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of * resulting inbound packets From patchwork Tue Nov 28 16:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 119887 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1890922qgn; Tue, 28 Nov 2017 08:01:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMYzwE4LGdkeB920dHb1DYLxBF+J22+krexYS5/Smj12tVmO4+x4auUPGktHubwwfXWa07OK X-Received: by 10.55.53.84 with SMTP id c81mr65128220qka.185.1511884890108; Tue, 28 Nov 2017 08:01:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511884890; cv=none; d=google.com; s=arc-20160816; b=gSURC3q4fbInk/KHGPya5X7C6FsCdg0u+F8qhKuyY0fvwyXaK7D2VlZq74J6ej/RsF WT8y7GHL0BXuh5qTudaYu0ZoH5amnLR+EdZbMAFMOMsgrG84lM5SqlNv7kRBQr/Z0Ali UuFFwEW09Kalf9gymu11ciGXcLiYXtceg3rWdLpGkqWl+4OG5Jc36rmpRlH2OV5NRS9O jy0tJ/UVaLDuuNGIvAMJ+IBqsTO59wF/okO1YfkOGiYBYiOgSb3LgTB506kZ+tmtUJp0 M7IQngIEhpbHK9APY5lqcIACGgyvgxngPvIEQsjWWNb0idoooPOuK5Z6s3IXkuLM4SRf fG5w== 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:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=NFNRNVCiwp0JuTL3PLdzTHYti2KejzbJ5Uho8I0g1+c=; b=MbCHMhGMPPLtuuIMZ7IWDN3sHfRZ6psJnPjpQ5p5AgxBUl7R2QWoPYNuqS79fuU6M6 JCUY3HjMGxH2VknAA0owElmyxsl7vSCHqIuA2OmV4ZgGnW1etOAcU8cqvNFgvLfjv7Ke 3M5nzLlZ6EVHY1uNgPIq9FpLGtiGMnU0iPp6tNhVfCc43yo9p67XrqekxKHYpukt+TpE T4BZ2xiY53aHayMfM1HUxewj4IBsFPikEf8Q9v12I1rZTmr+6ZWOveA22orR/8F7g/FM L+sscc7OH6Nu4U0nUBCzz5uI8mYP26AjmobUTF2V665NWIWJQybAVvCvbYLBT9LEbZXP y+Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id z64si4483777qtc.296.2017.11.28.08.01.29; Tue, 28 Nov 2017 08:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A49CE608DF; Tue, 28 Nov 2017 16:01:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 11D6F60655; Tue, 28 Nov 2017 16:00:34 +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 46627608DD; Tue, 28 Nov 2017 16:00:15 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id F1B41607C3 for ; Tue, 28 Nov 2017 16:00:10 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 8429040826BB for ; Tue, 28 Nov 2017 19:00:09 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5nWyfodqIY-09nWtQkY; Tue, 28 Nov 2017 19:00:09 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AgEzSO8coM-08eCaoTp; Tue, 28 Nov 2017 19:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 28 Nov 2017 19:00:06 +0300 Message-Id: <1511884806-10328-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511884806-10328-1-git-send-email-odpbot@yandex.ru> References: <1511884806-10328-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 311 Subject: [lng-odp] [PATCH API-NEXT v2 2/2] api, linux-gen: ipsec: constify in/out params 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" From: Dmitry Eremin-Solenikov Mark all input and out params as constants Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 311 (lumag:ipsec-caps) ** https://github.com/Linaro/odp/pull/311 ** Patch: https://github.com/Linaro/odp/pull/311.patch ** Base sha: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 63ff9ce47f9c9abab3f9e75acfffb4737cfca756 **/ include/odp/api/spec/ipsec.h | 6 +++--- platform/linux-generic/odp_ipsec.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 0be9664eb..d57815ed2 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1027,13 +1027,13 @@ typedef struct odp_ipsec_out_param_t { int num_opt; /** Pointer to an array of IPSEC SAs */ - odp_ipsec_sa_t *sa; + const 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; + const odp_ipsec_out_opt_t *opt; } odp_ipsec_out_param_t; @@ -1061,7 +1061,7 @@ typedef struct odp_ipsec_in_param_t { * * May be NULL when num_sa is zero. */ - odp_ipsec_sa_t *sa; + const odp_ipsec_sa_t *sa; } odp_ipsec_in_param_t; diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index b17e4cd7b..18ae8ece4 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -582,7 +582,7 @@ uint32_t ipsec_seq_no(ipsec_sa_t *ipsec_sa) static ipsec_sa_t *ipsec_out_single(odp_packet_t pkt, odp_ipsec_sa_t sa, odp_packet_t *pkt_out, - odp_ipsec_out_opt_t *opt ODP_UNUSED, + const odp_ipsec_out_opt_t *opt ODP_UNUSED, odp_ipsec_op_status_t *status) { ipsec_sa_t *ipsec_sa = NULL; @@ -998,7 +998,7 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, return in_pkt; } -static odp_ipsec_out_opt_t default_opt = { +static const odp_ipsec_out_opt_t default_opt = { .mode = ODP_IPSEC_FRAG_DISABLED, }; @@ -1022,7 +1022,7 @@ int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt; memset(&status, 0, sizeof(status)); @@ -1130,7 +1130,7 @@ int odp_ipsec_out_enq(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt; odp_queue_t queue; memset(&status, 0, sizeof(status)); @@ -1222,7 +1222,7 @@ int odp_ipsec_out_inline(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt; uint32_t hdr_len, offset; const void *ptr;