From patchwork Tue Aug 15 05: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: 110082 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5227156qge; Mon, 14 Aug 2017 22:04:20 -0700 (PDT) X-Received: by 10.55.24.100 with SMTP id j97mr7661748qkh.50.1502773460136; Mon, 14 Aug 2017 22:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502773460; cv=none; d=google.com; s=arc-20160816; b=KF6L849ime+HXZf0ch0JK2rMcYezvOFXtekeFrdn9NWKOtZhZV7DqH0eS27pdpKKdH 9t3l+1w4KCHIy8r5c7mQSKdgUBgZpt58ej00ZKuDuzZhhRGl/urEkSc06URT0Bh5ybwn zuN80haU4AERUG2MJ/AX3l/WwfZq2RlytqX6l+mghseVR/ZAl2pSTOHsmEvbtjFnrUDg myDe36J0Ka3xLkK2xqS2XSG+IEqHC5pwagF2lK9zVkNZRbQImXTp1Ydahr1cu9viguNE D6IzjPjSjc+0JJP1nJ4OP/s8dYUHZpPgtMgCsN0TbFZNVyjfe5R7r5STtLr6C7ZqxAg+ 3b3w== 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=vAEsquIkoatBtaFYHoctu0TiP7HHRQ1aMUtV5dAPkag=; b=pN5+jptDS+hXzcKeqsbyflxLVNEqxi/N7TUzyFfVYZZoQieYjtMI6DgtmQNs5Ejyiu WvBJA7KEK9dEhjP8RMbCiO5hMfAYkHWXu5Z7ZEuSN37v07n7DvW2NAykzTPQljwdg+k0 T92O9yjq8G6G0HxDQbu4HRO6bW6tdFEhrLJ1s4Fy0kHrlG2bEyQu2zEIRfoCrmf1XwA+ 46LJFdZUjSqO/NuRAZF7c7AGGA9Nnx86UERU+MzeASzHlFLKUHerQm+oCfMijpgNJYKR UbEs1RrQ/RvT4ogFyJu9oRz9qfM0Yejs9Q+49MCO52BCBnkKOxYyvbijhPyNJ5as5Vnv sSag== 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 v64si7678879qkd.464.2017.08.14.22.04.19; Mon, 14 Aug 2017 22:04:20 -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 C493E65BE3; Tue, 15 Aug 2017 05:04: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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 5F2CF65BE8; Tue, 15 Aug 2017 05: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 E613565BD1; Tue, 15 Aug 2017 05:00:39 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id AA59264A61 for ; Tue, 15 Aug 2017 05:00:31 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 9BC805A0183A for ; Tue, 15 Aug 2017 08:00:30 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Tszipk2HdY-0UESqmbR; Tue, 15 Aug 2017 08:00:30 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FcDs4y0iHj-0U8qlgvj; Tue, 15 Aug 2017 08:00:30 +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, 15 Aug 2017 08:00:12 +0300 Message-Id: <1502773212-31557-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502773212-31557-1-git-send-email-odpbot@yandex.ru> References: <1502773212-31557-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 109 Subject: [lng-odp] [PATCH API-NEXT v6 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: 3547226b19e6982bf74fc8c258b89db2c5f6a39c ** Merge commit sha: c5a312d1fbf91fbf3ffab109a84d4bb658db1e2f **/ 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..f502c7fa 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 associated 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()