diff mbox

api: crypto: add session destroy function

Message ID 1424859251-6933-1-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit 1b8b12ec375c201bd161096aa7b7dddb9450252b
Headers show

Commit Message

Taras Kondratiuk Feb. 25, 2015, 10:14 a.m. UTC
Number of crypto sessions may be limited by HW. Application should be
able to destroy unused sessions.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 include/odp/api/crypto.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Maxim Uvarov Feb. 25, 2015, 2:11 p.m. UTC | #1
Is that for ODP 1.0 ?

Maxim.

On 02/25/2015 01:40 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
>
>> -----Original Message-----
>> From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp-
>> bounces@lists.linaro.org] On Behalf Of ext Taras Kondratiuk
>> Sent: Wednesday, February 25, 2015 12:14 PM
>> To: lng-odp@lists.linaro.org; robking@cisco.com
>> Subject: [lng-odp] [PATCH] api: crypto: add session destroy function
>>
>> Number of crypto sessions may be limited by HW. Application should be
>> able to destroy unused sessions.
>>
>> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>> ---
>>   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
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Bill Fischofer Feb. 25, 2015, 3:08 p.m. UTC | #2
Yes, as we discussed in the last hour we want this API in v1.0

On Wed, Feb 25, 2015 at 8:11 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> Is that for ODP 1.0 ?
>
> Maxim.
>
>
> On 02/25/2015 01:40 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>
>> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
>>
>>  -----Original Message-----
>>> From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp-
>>> bounces@lists.linaro.org] On Behalf Of ext Taras Kondratiuk
>>> Sent: Wednesday, February 25, 2015 12:14 PM
>>> To: lng-odp@lists.linaro.org; robking@cisco.com
>>> Subject: [lng-odp] [PATCH] api: crypto: add session destroy function
>>>
>>> Number of crypto sessions may be limited by HW. Application should be
>>> able to destroy unused sessions.
>>>
>>> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>>> ---
>>>   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
>>> --
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 25, 2015, 3:29 p.m. UTC | #3
Merged,
Maxim.

On 02/25/2015 01:14 PM, Taras Kondratiuk wrote:
> Number of crypto sessions may be limited by HW. Application should be
> able to destroy unused sessions.
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> ---
>   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
diff mbox

Patch

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