From patchwork Tue May 9 00: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: 98856 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1572187qge; Mon, 8 May 2017 17:03:14 -0700 (PDT) X-Received: by 10.107.136.17 with SMTP id k17mr6092009iod.89.1494288194773; Mon, 08 May 2017 17:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494288194; cv=none; d=google.com; s=arc-20160816; b=BpA9OYqFJI2m2KvmZYPwTf1TTrAI1cX4YhfTmvuGeAasoAhUVhHGLxKDGeAoBnzTOA x/n85XIKe1XvkArpfLjzpK+icRg49xrxLsuZI2K/zCji6fRAoj/xziyot+6qhMrqIffF tho835m37xWIwTumdhtMJwPtskwatQRirKr8Q4wn4gm+ak2dXMrdhu8BV8FdBq0fipuA DquqU74cOZ3AQcFSd0rF/jzgj4dYc06/msZYiV0cR+PXWNuHTdaRhFDzY7YT0p5xeB4Y twIOzD2zeyedeedtosOimisDTHhAAVdCPNxtlq0tb9UJHY+IoGK+H1iOLU9/Ttv7pyYE zl1Q== 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=F9M3dP769waUKBL4WmzAowLLMyD8KDUnc+459sVqKmQ=; b=oOFBkohsnJvYcUfIIlECmaXXfYuMOnXazk4C2KsrWrQkVSjO2hlbVLRz7ACtnEz6se 2GM5K+QtkOmg5EgiOR5Z53q179vJ4gFkjGAqd6XStqBmmg87AY/tdco53s2NSKvfAd9X Yslth75s5kqsClzl53tAmJiE/rqn1Hgl5SiXDXCDKwMeU1ZvX+N6LLPUSc8x1tK5jT9l eOHDoVwRUE16XJewrRru91k4QiY44FxuMg+VZCdunKH+6KGYbvhYyCTXqle7xrmrM4/g IkvUHN2lewGWlNSGUcCxB+vkB5F+vwCNORxXnIrXlf6hxGp0BFarF6V5GEkCTuSShVKH UEDg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j5si14456734itc.56.2017.05.08.17.03.14; Mon, 08 May 2017 17:03:14 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 47AF76069C; Tue, 9 May 2017 00:03:14 +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,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 B80DD60B06; Tue, 9 May 2017 00:01:00 +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 2A0FB6067D; Tue, 9 May 2017 00:00:48 +0000 (UTC) Received: from forward1o.cmail.yandex.net (forward1o.cmail.yandex.net [37.9.109.84]) by lists.linaro.org (Postfix) with ESMTPS id 27C2F6067D for ; Tue, 9 May 2017 00:00:46 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:6]) by forward1o.cmail.yandex.net (Yandex) with ESMTP id 13480210CF for ; Tue, 9 May 2017 03:00:45 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id DFA0E1780ACA for ; Tue, 9 May 2017 03:00:44 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jXeh2d2q7z-0ihCGWQn; Tue, 09 May 2017 03:00:44 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 9 May 2017 03:00:06 +0300 Message-Id: <1494288006-2185-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> References: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 22 Subject: [lng-odp] [PATCH API-NEXT v2 1/5] api: ipsec: move soft limits expiration to flags, rather than errors 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 Soft limit expiration isn't an error per se. It does not mean, that we received invalid or unprocessed packet. They look more like flags, noting that soft limit on this SA was expired. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 22 (lumag:ipsec-limits) ** https://github.com/Linaro/odp/pull/22 ** Patch: https://github.com/Linaro/odp/pull/22.patch ** Base sha: 3ea9c1dac34e0fb4785b0d643056c731daa55e85 ** Merge commit sha: 85b927011c941f816b853da7284c0c3a939c5efb **/ include/odp/api/spec/ipsec.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index c16fcf1..34775aa 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -868,15 +868,6 @@ typedef union odp_ipsec_op_status_t { */ uint32_t mtu : 1; - /** Soft lifetime expired: seconds */ - uint32_t soft_exp_sec : 1; - - /** Soft lifetime expired: bytes */ - uint32_t soft_exp_bytes : 1; - - /** Soft lifetime expired: packets */ - uint32_t soft_exp_packets : 1; - /** Hard lifetime expired: seconds */ uint32_t hard_exp_sec : 1; @@ -907,6 +898,15 @@ typedef union odp_ipsec_op_status_t { */ uint32_t non_inline_mode : 1; + /** Soft lifetime expired: seconds */ + uint32_t soft_exp_sec : 1; + + /** Soft lifetime expired: bytes */ + uint32_t soft_exp_bytes : 1; + + /** Soft lifetime expired: packets */ + uint32_t soft_exp_packets : 1; + } flag; /** All flag bits */ From patchwork Tue May 9 00:00:03 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: 98852 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1571440qge; Mon, 8 May 2017 17:01:20 -0700 (PDT) X-Received: by 10.200.44.186 with SMTP id 55mr13970006qtw.173.1494288079949; Mon, 08 May 2017 17:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494288079; cv=none; d=google.com; s=arc-20160816; b=c/KfhFfqcK28gxUZsl9sx8EMJm0KJk50+YHf07WBdH1YDOL4rbuwUb+5P2pFkLRClW THbYs6nPr0cd0U6EMDnqLPL59A//r2jbbwqY5Qle4tXL4WWGEsU1mz9D6AbznvbW/b9E 6tI6bZQo+CcnTqUFsKtuRMfqGGanjLy8t9eQQ3gMl3m1bSNp4Vat9oBkpk8iOcV5QxrN mQHcyEXghB3jVA0ctm5TuXHx9Fk6WNVsgec8Colbx85PASeyMSN5BzuGMK3YOnYbRocL bHcVNcWrnl7A7pHyfUrdjEf+jGK5rvXZ2pd2IASbsGCP6WF2Ub7AvEnWOl2kgd5KBzD/ QsoA== 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=j0UX2Ih4w1mt1yIvij3tmBV8OsETPK8hvgL82X8nTs0=; b=zbmmPGX1qMi0ld+8+UN6exxK3UnSBfxT2VJqofclf/b5jJ6VVjVd7ZB9p4qUxtufkE 5GCOnEkY4q26O+UW+nlyE9GL7JpcybWMF4xvwCLhfgqTSaUxgmR+LJPRsD5XaK3aiv/N COdtBzEnXPFldwvFaVGIXJw5Lyc3/5QBjscy2LCM3JpNHefJ1Fzag8V0Wt8oupTHvSf7 EUbvyt4Ueb/aOiwvPOxnJt18BFxMLkPm/B0dLe4nt7ZsixxWljfQJC+lftFwn4izAy+m AvFhXcjqPkVzEaGWAmhsrowqKHjrp0fb0qkefBGhOfg+vvtNJnU3wj6G0lbgKEcmcy7x 4s6w== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x125si12067732qkc.149.2017.05.08.17.01.19; Mon, 08 May 2017 17:01:19 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 6611760ACD; Tue, 9 May 2017 00:01:19 +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,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 710A2607F1; Tue, 9 May 2017 00:00:49 +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 1E9ED607D6; Tue, 9 May 2017 00:00:45 +0000 (UTC) Received: from forward1o.cmail.yandex.net (forward1o.cmail.yandex.net [37.9.109.84]) by lists.linaro.org (Postfix) with ESMTPS id 718BE6067D for ; Tue, 9 May 2017 00:00:43 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [77.88.29.84]) by forward1o.cmail.yandex.net (Yandex) with ESMTP id 069E420EB1 for ; Tue, 9 May 2017 03:00:42 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id D0287178072C for ; Tue, 9 May 2017 03:00:41 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jXeh2d2q7z-0fhirm3W; Tue, 09 May 2017 03:00:41 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 9 May 2017 03:00:03 +0300 Message-Id: <1494288006-2185-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> References: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 22 Subject: [lng-odp] [PATCH API-NEXT v2 2/5] api: ipsec: note that soft_exp bits are set only once 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 Add an explicit note telling that soft_exp bits are set only once, for the packet actually crossing the boundary. They will not be set for further packets. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 22 (lumag:ipsec-limits) ** https://github.com/Linaro/odp/pull/22 ** Patch: https://github.com/Linaro/odp/pull/22.patch ** Base sha: 3ea9c1dac34e0fb4785b0d643056c731daa55e85 ** Merge commit sha: 85b927011c941f816b853da7284c0c3a939c5efb **/ include/odp/api/spec/ipsec.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index c4fe6cb..26b3389 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -481,8 +481,10 @@ typedef struct odp_ipsec_sa_opt_t { * * These limits are used for setting up SA lifetime. IPSEC operations check * against the limits and output a status code (e.g. soft_exp_bytes) when - * a limit is crossed. Any number of limits may be used simultaneously. - * Use zero when there is no limit. + * a limit is crossed. The soft_exp_* bits will be set only for the first + * packet crossing the boundary. Any further packets will not have those bits + * set. Any number of limits may be used simultaneously. Use zero when there + * is no limit. */ typedef struct odp_ipsec_lifetime_t { /** Soft expiry limits for the session */ From patchwork Tue May 9 00:00:02 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: 98853 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1571617qge; Mon, 8 May 2017 17:01:45 -0700 (PDT) X-Received: by 10.55.155.16 with SMTP id d16mr29019224qke.174.1494288105015; Mon, 08 May 2017 17:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494288105; cv=none; d=google.com; s=arc-20160816; b=jedKPZbTxLOox2SiXfPqy06h+wWKCOUAkLRjoKbdnBoeh6af0zpSAQmzHudCUBke+d YmDLzv4Jbc/vJt/ZkK5L4J10WnKOFZOVfCYG2j2tKEe3+S3nbkAcPDCFRUp4i6gf8TRS fFDPQ0Q1btN/rPThcA4mAEZfFeBE4KUK4xhIxoAuBm06eXJ7oIRZbWPzKPIxrTAOQR/0 NMVthHiKkSodqClLbEJh49M+A1d+rJC+bKS3JwXwsIwp4TCQ56zsEhSEv3I+J+E9L1nO j1JY2bNNrmbQQR0oZIJ2Es3YwugDFCksHe6UR9yrKA1DZ1mAqWHeAdmEdceh2iexFglV C1sQ== 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=roSs4YeKVL4OKidX0KP0K39byOSuKE+2w3Zt/7tJZkw=; b=gtTgu7Fyy0FuIBSSn2tca80Djn2LPQuwprpJt7YM78s8f3Ryc6i8HAmzKKnKfZu7nn 0EUOeGgsbV8a1coNahG3KJgRoNJMw7Jj2JdWL22WCbB+Juohv5IsUgyk2BkiKoIIozOu 2x05n37EsAGXL6Hk+m4W2L3LHaVCWhUwszUA0JX/d0OrhuvRj3E1/IehqMdBNAq27Vbi LItuUIGePUAIQiVKArSji+XkyjGCxHnqs00W5DDzRSQh7n6ogo3e7CoQ8MCJLzV3//gB gqJVMdBnXgxWjVVWrKBbVvtAkVLf7JRBkswY5OBJC1mfqIReVN+wygbHU30DfCfxrhos dCpQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u30si6481659qtd.94.2017.05.08.17.01.44; Mon, 08 May 2017 17:01:45 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id B567660AF8; Tue, 9 May 2017 00:01:44 +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 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 DBF9260AD0; Tue, 9 May 2017 00:00:51 +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 55294606A4; Tue, 9 May 2017 00:00:45 +0000 (UTC) Received: from forward1p.cmail.yandex.net (forward1p.cmail.yandex.net [77.88.31.16]) by lists.linaro.org (Postfix) with ESMTPS id 0E49960661 for ; Tue, 9 May 2017 00:00:44 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:6]) by forward1p.cmail.yandex.net (Yandex) with ESMTP id 2CE4520F90 for ; Tue, 9 May 2017 03:00:41 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id 02E15178072C for ; Tue, 9 May 2017 03:00:40 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jXeh2d2q7z-0dhOpq57; Tue, 09 May 2017 03:00:39 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 9 May 2017 03:00:02 +0300 Message-Id: <1494288006-2185-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> References: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 22 Subject: [lng-odp] [PATCH API-NEXT v2 3/5] api: ipsec: add soft limit expiration event X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov If outbound packet was processed in inline mode, soft limit expiration event is not reported, as packet goes to the interface. Instead report this as an ODP_IPSEC_STATUS_SA_SOFT_EXPIRED. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 22 (lumag:ipsec-limits) ** https://github.com/Linaro/odp/pull/22 ** Patch: https://github.com/Linaro/odp/pull/22.patch ** Base sha: 3ea9c1dac34e0fb4785b0d643056c731daa55e85 ** Merge commit sha: 85b927011c941f816b853da7284c0c3a939c5efb **/ include/odp/api/spec/ipsec.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index e83494d..c4fe6cb 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1080,7 +1080,14 @@ typedef struct odp_ipsec_op_result_t { */ typedef enum odp_ipsec_status_id_t { /** Response to SA disable command */ - ODP_IPSEC_STATUS_SA_DISABLE = 0 + ODP_IPSEC_STATUS_SA_DISABLE = 0, + + /** + * Soft limit expired on this SA + * + * This event is sent only if SA was configured in OUT INLINE mode. + */ + ODP_IPSEC_STATUS_SA_SOFT_EXPIRED } odp_ipsec_status_id_t; From patchwork Tue May 9 00:00:04 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: 98854 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1571791qge; Mon, 8 May 2017 17:02:13 -0700 (PDT) X-Received: by 10.200.35.240 with SMTP id r45mr17155065qtr.233.1494288133317; Mon, 08 May 2017 17:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494288133; cv=none; d=google.com; s=arc-20160816; b=ux1cn89U/Eir9+9+KAPaU7lRXPyj6e5G9cjncQ79QWLDQW9V0FRO0wPVDUgj5algd1 V+cgbZhFGib2h+Kbfv239YR04ocYg5Oo95XwGHdoG7T4cxmOVVJw/2dBP+m3ilNVZU0q bsu+XJop18YY5mzIzd02Dsb/WBIRTNXO73Bgc7iUnfqwpXOKlK04Rm3teZYxQyuJREY9 49WTI4YSf7MUqGDKCGhn4RgssM+7N7L1HHMkloEvjhXO1Mg6vERzkyjR+W3VZZhHT2yB 32OcldurOJ63pQ0CU6rXWk8vXrTlQ6iEwNGYmpsbgAYkjxB3zyX8etl+r1QBnW2nEvZh f4yA== 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=n3GRgT0gt59D1J1zZGKGxa9iFUfAPZR9b0RN6M5rngM=; b=gI3I5aUxOP3T3dj3wlM6wWLa7qhpiayzCd2JzPkw2HanLselQlBq1+M2kVw1XO6k5T NgYIVy/zTvhzTZ1c8AlwDudTzJ/DrdIH5Ec7JIGUehDijxxjgisy3NjMLN4xJvTFbZ2Y fixrzUfI2LcmHdGJXEMfxxpOlSSppXGsTs8NWoKVTXiPA/cva2bV61gexv8GHJ/JGbqD c0WPybPpVeyh70c5L7AbYi6YbUImzgNpJuETWL03MKpzeK9on+FdegwuqNLQ2Lgzl+K4 Z/43mRWIci8UM9RmNtbfq98syDpSVMzVAISTuikCEWgoRh8i+lsVsv7PrefZs2YLw416 LK6A== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g190si13726922qkf.118.2017.05.08.17.02.12; Mon, 08 May 2017 17:02:13 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 38BFA60ACC; Tue, 9 May 2017 00:02: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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 31E1C60AED; Tue, 9 May 2017 00:00:55 +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 6FDF66069C; Tue, 9 May 2017 00:00:47 +0000 (UTC) Received: from forward1h.cmail.yandex.net (forward1h.cmail.yandex.net [87.250.230.16]) by lists.linaro.org (Postfix) with ESMTPS id C70506069C for ; Tue, 9 May 2017 00:00:44 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [77.88.29.84]) by forward1h.cmail.yandex.net (Yandex) with ESMTP id 2FFA82071B for ; Tue, 9 May 2017 03:00:43 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id 0B95F1780AE2 for ; Tue, 9 May 2017 03:00:42 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jXeh2d2q7z-0gh0ZeCW; Tue, 09 May 2017 03:00:42 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 9 May 2017 03:00:04 +0300 Message-Id: <1494288006-2185-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> References: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 22 Subject: [lng-odp] [PATCH API-NEXT v2 4/5] api: ipsec: introduce all_status bitfield covering all error and flags 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 An expectation would be that an application would check if there is any exceptional status set by checking the all_status field and then further descending on the reason on the particular exception. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 22 (lumag:ipsec-limits) ** https://github.com/Linaro/odp/pull/22 ** Patch: https://github.com/Linaro/odp/pull/22.patch ** Base sha: 3ea9c1dac34e0fb4785b0d643056c731daa55e85 ** Merge commit sha: 85b927011c941f816b853da7284c0c3a939c5efb **/ include/odp/api/spec/ipsec.h | 135 +++++++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 63 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 26b3389..3a33845 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -839,71 +839,80 @@ typedef struct odp_ipsec_op_opt_t { #define ODP_IPSEC_OK 0 /** IPSEC operation status */ -typedef struct odp_ipsec_op_status_t { - /** Variant mappings for op status */ - 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; - - /** Authentication failed */ - uint32_t auth : 1; - - /** Anti-replay check failed */ - uint32_t antireplay : 1; - - /** Other algorithm error */ - uint32_t alg : 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: bytes */ - uint32_t soft_exp_bytes : 1; - - /** Soft lifetime expired: packets */ - uint32_t soft_exp_packets : 1; - - /** Hard lifetime expired: seconds */ - uint32_t hard_exp_sec : 1; - - /** Hard lifetime expired: bytes */ - uint32_t hard_exp_bytes : 1; - - /** Hard lifetime expired: packets */ - uint32_t hard_exp_packets : 1; - - } error; - - /** 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; +typedef union odp_ipsec_op_status_t { + struct { + /** Variant mappings for op status */ + 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; + + /** Authentication failed */ + uint32_t auth : 1; + + /** Anti-replay check failed */ + uint32_t antireplay : 1; + + /** Other algorithm error */ + uint32_t alg : 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: bytes */ + uint32_t soft_exp_bytes : 1; + + /** Soft lifetime expired: packets */ + uint32_t soft_exp_packets : 1; + + /** Hard lifetime expired: seconds */ + uint32_t hard_exp_sec : 1; + + /** Hard lifetime expired: bytes */ + uint32_t hard_exp_bytes : 1; + + /** Hard lifetime expired: packets */ + uint32_t hard_exp_packets : 1; + + } error; + + /** 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; + }; + + /** Variant mappings for status flags */ + union { + /** Status flags */ + struct { + /** Packet was processed in inline mode */ + uint32_t inline_mode : 1; + + } flag; + + /** All flag bits */ + uint32_t all_flag; + }; }; - /** Variant mappings for status flags */ - union { - /** Status flags */ - struct { - /** Packet was processed in inline mode */ - uint32_t inline_mode : 1; - - } flag; - - /** All flag bits */ - uint32_t all_flag; - }; + /** All status bits */ + uint64_t all_status; } odp_ipsec_op_status_t; From patchwork Tue May 9 00: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: 98855 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1572017qge; Mon, 8 May 2017 17:02:48 -0700 (PDT) X-Received: by 10.200.50.49 with SMTP id x46mr32249821qta.105.1494288168708; Mon, 08 May 2017 17:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494288168; cv=none; d=google.com; s=arc-20160816; b=J5tytbfqX0yRSyAzGJVCaEA/HPFKzUXQl8XWcIOWOf8mQWBqE++aVDZ/Nwdkc9XgKm LtisN+fN/lv0yCXOaf1EEOYalyB/0RVGW6h+ykP5552R13n+x6IZVbsve/h4wtUsmPEp ynnJ/0b7tLqPYid/aGbia6u/5/bHwy3Ce64GKL91sfV6Vi4w8jAAaxj5fOm/oFYDorgQ 25fPW4mT8Bd5Qjr3Od8ZZGFfmUYZIyxsD+A2G1uEnWwPmHZQBX9WopLd2Pv9P5meN03r ykEow6f88yrGECQ24zyaOV7z+hyE4t3l9OjMSIFMLIauQeY/JKrQhE6RC8clhOKSVlIu WKIg== 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=R2UmlmgLe1tBjBGxZgC43aX8r8qM1YJX78rJbIBQarI=; b=cOaAizSKZOJVnkSjQxgREMRaSwPZltcQBSV0sgzTc5wlClIYuS4Zf8kMdevIKvbOiX b3JRNCrP5NjOmUxgTBTq5LUxpVq45Es4mXTV+pzqHFIQAi4+L91w4er9lmO9bPT1wIqV /BI+rm2y1ugCkMPAwc7fS87fww8xh3iG3ZbrNdWIN8DAj9KMuWutz+7EYIvw/k5Rolna c0OCDpoh6AIupk1QzdfckYg/lgBLMjHmcddAQLHAN3G50eiiN36cBgw27nPXiJMPiwmo FNH0eyaJotHlTC7+txADVXeDmf6/37Y3OmyfdsntJgv58xDAY4ncI95cwSj8u510+nct kYqw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j16si7524488qtj.91.2017.05.08.17.02.47; Mon, 08 May 2017 17:02:48 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id B8E2A60A51; Tue, 9 May 2017 00:02:47 +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,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 78DBF60B0F; Tue, 9 May 2017 00:00:57 +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 C3413606A4; Tue, 9 May 2017 00:00:47 +0000 (UTC) Received: from forward5h.cmail.yandex.net (forward5h.cmail.yandex.net [87.250.230.20]) by lists.linaro.org (Postfix) with ESMTPS id A8DEB60661 for ; Tue, 9 May 2017 00:00:45 +0000 (UTC) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:6]) by forward5h.cmail.yandex.net (Yandex) with ESMTP id 2C11721000 for ; Tue, 9 May 2017 03:00:44 +0300 (MSK) Received: from smtp1p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1p.mail.yandex.net (Yandex) with ESMTP id D86DD178072C for ; Tue, 9 May 2017 03:00:43 +0300 (MSK) Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jXeh2d2q7z-0hhi3uRn; Tue, 09 May 2017 03:00:43 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 9 May 2017 03:00:05 +0300 Message-Id: <1494288006-2185-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> References: <1494288006-2185-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 22 Subject: [lng-odp] [PATCH API-NEXT v2 5/5] api: ipsec: invert the inline_mode flag 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 For INLINE-destined SAs it is typical to have packets processed through INLINE API. So, let's invert the inline_mode flag to mean that the packet was processed through ASYNC API. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 22 (lumag:ipsec-limits) ** https://github.com/Linaro/odp/pull/22 ** Patch: https://github.com/Linaro/odp/pull/22.patch ** Base sha: 3ea9c1dac34e0fb4785b0d643056c731daa55e85 ** Merge commit sha: 85b927011c941f816b853da7284c0c3a939c5efb **/ include/odp/api/spec/ipsec.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 3a33845..c16fcf1 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -901,8 +901,11 @@ typedef union odp_ipsec_op_status_t { union { /** Status flags */ struct { - /** Packet was processed in inline mode */ - uint32_t inline_mode : 1; + /** + * Packet was processed in ASYNC mode through + * the SA configured for INLINE mode. + */ + uint32_t non_inline_mode : 1; } flag;