From patchwork Thu Aug 10 06:00:12 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: 109778 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1890049qge; Wed, 9 Aug 2017 23:04:10 -0700 (PDT) X-Received: by 10.55.137.71 with SMTP id l68mr12695730qkd.166.1502345050257; Wed, 09 Aug 2017 23:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502345050; cv=none; d=google.com; s=arc-20160816; b=BPjVYWSsIrLqnD0vh8tDBzsiTnl6c20CqSYS5yysaCWHjeYijt1D/g/ZqB3GOlFFaM 0/oVcmHTteWojH+ysPZr05Ox8N3KBejTHNZc9qcw0ojiTPPfldjOxTX+p29E6XrPKhLr OSnMfzv0eFRIzfIJkl2np6Hc6xYf+FnbYHCSjdCth5UjljvyU8u2V3lxbCwbUzjSfxFh L/LJR2NYwVgO4RqmnUvRGMu7vkwQNh5k/ywK7IIYH5TqPhiefSeCwwzjTBnx7aCiqstL AqPnyz3tWIEOmD8+c5EoJSwK2tVDOosD8hsCTldejCGpc3KNGtjIgE90biWV+XdDUmxD 5NNg== 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=x1pJilQhVAPZTfOX0tLHvxVLSSgNFeJl7+QHZBRwZZs=; b=ZhWPQGIpbj2rOPJE+MplBk+Qb4aqi7Bb2AO5WSWBnJcFGU50F29izp3d8lEmYwjwC4 lIOwhKND76/AcqQcc3phrq7b9ySLRgwXZ6jV3rkFlaq3QRiZUdZ7duaHnfWXGcs0MQni Mr+eT1MEQyVpTyFWAk5JYvqiCgAV3OYAOLOBIz1c8NlsJizKRizQZsIRP92bmRxbFG0c s6mMX0/1sP5ddYy57vFkrweLWFzRkqjtVKt2JsMvDVEJYkUu98DPB6k4YSn00EMrDVlE EWWVlgatrYlwrxTbVcg4pN9BnN4hCADwrgXIPMICFSngpAhNCu1EC4Vhg23Y5Yys+Y6H gs9A== 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 n6si3947098qtk.310.2017.08.09.23.04.09; Wed, 09 Aug 2017 23:04:10 -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 B740D60D35; Thu, 10 Aug 2017 06:04:09 +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.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_SORBS_SPAM,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 735F160C0A; Thu, 10 Aug 2017 06:01: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 DD2E560CBD; Thu, 10 Aug 2017 06:01:21 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id CCA1360C07 for ; Thu, 10 Aug 2017 06:00:17 +0000 (UTC) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 45D952C82455 for ; Thu, 10 Aug 2017 09:00:16 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mUG9lcusl8-0GsCDeb5; Thu, 10 Aug 2017 09:00:16 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1wHbGqlKa6-0FdGglRw; Thu, 10 Aug 2017 09:00:16 +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: Thu, 10 Aug 2017 09:00:12 +0300 Message-Id: <1502344812-23276-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502344812-23276-1-git-send-email-odpbot@yandex.ru> References: <1502344812-23276-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 109 Subject: [lng-odp] [PATCH API-NEXT v5 1/1] API:IPSEC: IPSEC events may be reported synchronously. 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: Nikhil Agarwal IPSEC events may be delivered synchronous or ansynchrous depending on implementation. Application will know based on return value of odp_ipsec_sa_disable API. Signed-off-by: Nikhil Agarwal --- /** Email created from pull request 109 (NikhilA-Linaro:disable_event) ** https://github.com/Linaro/odp/pull/109 ** Patch: https://github.com/Linaro/odp/pull/109.patch ** Base sha: e420668cd3886f003c8bd6022e210bf08a0ee3b5 ** Merge commit sha: f65d49b122f2f60a7fc9af3e0a09067dcfd369d9 **/ include/odp/api/spec/ipsec.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 7085bc0d..3f02635a 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -831,16 +831,19 @@ odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param); * 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. The - * status event is guaranteed to be the last event for the SA, i.e. all - * in-progress operations have completed and resulting events (including status - * events) have been enqueued before it. + * A return value 0 indicates that the disable request has completed + * synchronously and the SA is now disabled. A return value 1 indicates that the + * disable request has been accepted and completion will be indicated by an + * ODP_EVENT_IPSEC_STATUS sent to the queue specified for the SA. This event is + * guaranteed to be the last event for the SA, i.e., all in-progress operations + * have completed and resulting events (including status events) have been + * enqueued before it. In synchronous mode of operation, disable requests are + * gauranteed to complete synchronously as there is no queue assciated with SA. * * @param sa IPSEC SA to be disabled * - * @retval 0 On success + * @retval 0 When SA is disabled successfully. + * @retval 1 Disable event will be posted on SA queue. * @retval <0 On failure * * @see odp_ipsec_sa_destroy()