From patchwork Wed Feb 25 10:14:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 45031 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0CFF32142A for ; Wed, 25 Feb 2015 10:14:48 +0000 (UTC) Received: by lamq1 with SMTP id q1sf2096333lam.0 for ; Wed, 25 Feb 2015 02:14:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=G0+kJD1or6ot2SztKo79b+U4K2yvkv5O/QiHCI85XGY=; b=Ik7DYIaV90OEpu1dgHrVdAc8Vh+P8gLPQQm5o0Cl6TOGwYRAAaGNGj1patLWIyShBm HYGSqwBeqFjMjZZ/P6+Jw6nZPKxk0LXnz+4SkJNRSJXIUI/zeY7YxLVrf0VfCMqexSak +/1C+k4OpaUQ9MNQpotsdnO26eDqjYC96bQaoDq38/OtQGX47HzhXJGWSfVWm3g8iAE+ Bypjw7UrTeQIhys07AK+udix7ftRlucfTQO2/DJsF5YtZkSTdejUjN2ioyACem/QDbtU MmPXxGtgwgOE3gOpy4i1WAkJlNHAAzo/FGqZsJXqlGWPLv6y1zLfs3ioK7AiMDAiqYY/ Zo1g== X-Gm-Message-State: ALoCoQk+hoo9SNDh7B3InCCkRnsYBO1ceF5vbI26WOwiQR4tUCJ55XXD9iS+moVXJ5hXkVBdkrwV X-Received: by 10.112.130.70 with SMTP id oc6mr346829lbb.13.1424859287018; Wed, 25 Feb 2015 02:14:47 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.167 with SMTP id an7ls274513lac.47.gmail; Wed, 25 Feb 2015 02:14:46 -0800 (PST) X-Received: by 10.112.85.140 with SMTP id h12mr1999245lbz.67.1424859286775; Wed, 25 Feb 2015 02:14:46 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id wl10si28022809lbb.90.2015.02.25.02.14.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 02:14:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbjf15 with SMTP id f15so2710630lbj.13 for ; Wed, 25 Feb 2015 02:14:46 -0800 (PST) X-Received: by 10.112.211.200 with SMTP id ne8mr2010504lbc.73.1424859286619; Wed, 25 Feb 2015 02:14:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2517504lbj; Wed, 25 Feb 2015 02:14:45 -0800 (PST) X-Received: by 10.140.82.71 with SMTP id g65mr5120412qgd.42.1424859285228; Wed, 25 Feb 2015 02:14:45 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 34si36348162qgn.30.2015.02.25.02.14.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 02:14:45 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQYzI-0000KG-4e; Wed, 25 Feb 2015 10:14:40 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQYyz-0000Jk-Pq for lng-odp@lists.linaro.org; Wed, 25 Feb 2015 10:14:21 +0000 Received: by labgq15 with SMTP id gq15so2829313lab.3 for ; Wed, 25 Feb 2015 02:14:15 -0800 (PST) X-Received: by 10.152.6.100 with SMTP id z4mr2065161laz.114.1424859255558; Wed, 25 Feb 2015 02:14:15 -0800 (PST) Received: from localhost.localdomain ([80.77.38.170]) by mx.google.com with ESMTPSA id xq2sm606358lbb.49.2015.02.25.02.14.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 02:14:15 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org, robking@cisco.com Date: Wed, 25 Feb 2015 12:14:11 +0200 Message-Id: <1424859251-6933-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: crypto patch Subject: [lng-odp] [PATCH] api: crypto: add session destroy function X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Number of crypto sessions may be limited by HW. Application should be able to destroy unused sessions. Signed-off-by: Taras Kondratiuk --- include/odp/api/crypto.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/odp/api/crypto.h b/include/odp/api/crypto.h index da035cb..bc6b27e 100644 --- a/include/odp/api/crypto.h +++ b/include/odp/api/crypto.h @@ -279,6 +279,19 @@ odp_crypto_session_create(odp_crypto_session_params_t *params, enum odp_crypto_ses_create_err *status); /** + * Crypto session destroy + * + * Destroy an unused session. Result is undefined if session is being used + * (i.e. asynchronous operation is in progress). + * + * @param session Session handle + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_crypto_session_destroy(odp_crypto_session_t session); + +/** * Return crypto completion handle that is associated with event * * Note: any invalid parameters will cause undefined behavior and may cause