diff mbox

[3/5] linux-generic: crypto: added dummy odp_crypto_session_destroy

Message ID 1410397827-2758-4-git-send-email-victor.kamensky@linaro.org
State New
Headers show

Commit Message

vkamensky Sept. 11, 2014, 1:10 a.m. UTC
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
---
 platform/linux-generic/include/api/odp_crypto.h | 2 ++
 platform/linux-generic/odp_crypto.c             | 9 +++++++++
 2 files changed, 11 insertions(+)

Comments

Ola Liljedahl Sept. 11, 2014, 1:03 p.m. UTC | #1
Shouldn't we have a TODO or FIXME comment in the code
(odp_crypto_session_destroy)?
Some well-defined text that can easily be searched for?

On 11 September 2014 03:10, Victor Kamensky <victor.kamensky@linaro.org>
wrote:

> Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
> ---
>  platform/linux-generic/include/api/odp_crypto.h | 2 ++
>  platform/linux-generic/odp_crypto.c             | 9 +++++++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/platform/linux-generic/include/api/odp_crypto.h
> b/platform/linux-generic/include/api/odp_crypto.h
> index 9220fb5..918249a 100644
> --- a/platform/linux-generic/include/api/odp_crypto.h
> +++ b/platform/linux-generic/include/api/odp_crypto.h
> @@ -220,6 +220,8 @@ odp_crypto_session_create(odp_crypto_session_params_t
> *params,
>                           odp_crypto_session_t *session,
>                           enum odp_crypto_ses_create_err *status);
>
> +int odp_crypto_session_destroy(odp_crypto_session_t ses);
> +
>  /**
>   * Crypto session creation (asynchronous)
>   *
> diff --git a/platform/linux-generic/odp_crypto.c
> b/platform/linux-generic/odp_crypto.c
> index ef91a34..15aeb51 100644
> --- a/platform/linux-generic/odp_crypto.c
> +++ b/platform/linux-generic/odp_crypto.c
> @@ -472,3 +472,12 @@ odp_crypto_get_operation_compl_packet(odp_buffer_t
> completion_event)
>  {
>         return odp_packet_from_buffer(completion_event);
>  }
> +
> +int odp_crypto_session_destroy(odp_crypto_session_t ses ODP_UNUSED)
> +{
> +       /*
> +        * Just stub for now, there is no clean short way to reclaim
> +        * slot of odp_crypto_global_t.sessions
> +        */
> +       return 0;
> +}
> --
> 1.8.1.4
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Mike Holmes Sept. 17, 2014, 9:23 p.m. UTC | #2
I think we have started to form a policy on adding new todos to the code.
We should not take a patch until we hook any todo to a traceable bug

You can create one here
https://bugs.linaro.org/enter_bug.cgi?product=OpenDataPlane.



On 11 September 2014 09:03, Ola Liljedahl <ola.liljedahl@linaro.org> wrote:

> Shouldn't we have a TODO or FIXME comment in the code (odp_crypto_session_destroy)?
> Some well-defined text that can easily be searched for?
>
> On 11 September 2014 03:10, Victor Kamensky <victor.kamensky@linaro.org>
> wrote:
>
>> Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
>> ---
>>  platform/linux-generic/include/api/odp_crypto.h | 2 ++
>>  platform/linux-generic/odp_crypto.c             | 9 +++++++++
>>  2 files changed, 11 insertions(+)
>>
>> diff --git a/platform/linux-generic/include/api/odp_crypto.h
>> b/platform/linux-generic/include/api/odp_crypto.h
>> index 9220fb5..918249a 100644
>> --- a/platform/linux-generic/include/api/odp_crypto.h
>> +++ b/platform/linux-generic/include/api/odp_crypto.h
>> @@ -220,6 +220,8 @@ odp_crypto_session_create(odp_crypto_session_params_t
>> *params,
>>                           odp_crypto_session_t *session,
>>                           enum odp_crypto_ses_create_err *status);
>>
>> +int odp_crypto_session_destroy(odp_crypto_session_t ses);
>> +
>>  /**
>>   * Crypto session creation (asynchronous)
>>   *
>> diff --git a/platform/linux-generic/odp_crypto.c
>> b/platform/linux-generic/odp_crypto.c
>> index ef91a34..15aeb51 100644
>> --- a/platform/linux-generic/odp_crypto.c
>> +++ b/platform/linux-generic/odp_crypto.c
>> @@ -472,3 +472,12 @@ odp_crypto_get_operation_compl_packet(odp_buffer_t
>> completion_event)
>>  {
>>         return odp_packet_from_buffer(completion_event);
>>  }
>> +
>> +int odp_crypto_session_destroy(odp_crypto_session_t ses ODP_UNUSED)
>> +{
>> +       /*
>> +        * Just stub for now, there is no clean short way to reclaim
>> +        * slot of odp_crypto_global_t.sessions
>> +        */
>> +       return 0;
>> +}
>> --
>> 1.8.1.4
>>
>>
>> _______________________________________________
>> 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
>
>
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_crypto.h b/platform/linux-generic/include/api/odp_crypto.h
index 9220fb5..918249a 100644
--- a/platform/linux-generic/include/api/odp_crypto.h
+++ b/platform/linux-generic/include/api/odp_crypto.h
@@ -220,6 +220,8 @@  odp_crypto_session_create(odp_crypto_session_params_t *params,
 			  odp_crypto_session_t *session,
 			  enum odp_crypto_ses_create_err *status);
 
+int odp_crypto_session_destroy(odp_crypto_session_t ses);
+
 /**
  * Crypto session creation (asynchronous)
  *
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index ef91a34..15aeb51 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -472,3 +472,12 @@  odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
 {
 	return odp_packet_from_buffer(completion_event);
 }
+
+int odp_crypto_session_destroy(odp_crypto_session_t ses ODP_UNUSED)
+{
+	/*
+	 * Just stub for now, there is no clean short way to reclaim
+	 * slot of odp_crypto_global_t.sessions
+	 */
+	return 0;
+}