diff mbox

[v3] odp_crypto.c : Add stubs for missing functions

Message ID 1415633433-30247-1-git-send-email-alexandru.badicioiu@linaro.org
State New
Headers show

Commit Message

Alexandru Badicioiu Nov. 10, 2014, 3:30 p.m. UTC
From: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>

This patch is required by crypto unit testing.

Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
---
 platform/linux-generic/odp_crypto.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

Comments

Mike Holmes Nov. 10, 2014, 4:33 p.m. UTC | #1
On 10 November 2014 10:30, <alexandru.badicioiu@linaro.org> wrote:

> From: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>
> This patch is required by crypto unit testing.
>
> Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
> ---
>  platform/linux-generic/odp_crypto.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/platform/linux-generic/odp_crypto.c
> b/platform/linux-generic/odp_crypto.c
> index 1475437..b9dd3e7 100644
> --- a/platform/linux-generic/odp_crypto.c
> +++ b/platform/linux-generic/odp_crypto.c
> @@ -13,6 +13,7 @@
>  #include <odp_align.h>
>  #include <odp_shared_memory.h>
>  #include <odp_crypto_internal.h>
> +#include <odp_debug_internal.h>
>  #include <odp_hints.h>
>  #include <odph_packet.h>
>
> @@ -467,3 +468,28 @@ odp_crypto_get_ses_create_compl_session(odp_buffer_t
> completion_event,
>         result = odp_buffer_addr(completion_event);
>         *session = result->session;
>  }
> +
> +void
> +odp_crypto_set_operation_compl_ctx(odp_buffer_t completion_event,
> +                                  void *ctx)
> +{
>

use ODP_UNUSED for unused arguments not the void below


> +       (void)completion_event;
> +       (void)ctx;
> +       ODP_UNIMPLEMENTED();
> +}
> +
> +void
> +*odp_crypto_get_operation_compl_ctx(odp_buffer_t completion_event)
> +{
>

use ODP_UNUSED for unused arguments not the void below


> +       (void)completion_event;
> +       ODP_UNIMPLEMENTED();
> +       return NULL;
>

The documentation makes no mention of NULL being a possible error case, it
just says "Returns user data"  The documentation should be improved with
this patch submission to indicate the error case NULL with a new @retval


> +}
> +
> +odp_packet_t
> +odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
> +{
>

use ODP_UNUSED for unused arguments not the void below


> +       (void)completion_event;
> +       ODP_UNIMPLEMENTED();
> +       return ODP_PACKET_INVALID;
>

The documentation makes no mention of ODP_PACKET_INVALID being a possible
error case, it just says "Returns Packet structure where data now resides"
The documentation should be improved with this patch submission to indicate
the error case ODP_PACKET_INVALID with a new @retval


> +}
> --
> 1.7.3.4
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Alexandru Badicioiu Nov. 10, 2014, 4:44 p.m. UTC | #2
It seems I resent the wrong patch.

On 10 November 2014 18:33, Mike Holmes <mike.holmes@linaro.org> wrote:

>
>
> On 10 November 2014 10:30, <alexandru.badicioiu@linaro.org> wrote:
>
>> From: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>>
>> This patch is required by crypto unit testing.
>>
>> Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>> ---
>>  platform/linux-generic/odp_crypto.c |   26 ++++++++++++++++++++++++++
>>  1 files changed, 26 insertions(+), 0 deletions(-)
>>
>> diff --git a/platform/linux-generic/odp_crypto.c
>> b/platform/linux-generic/odp_crypto.c
>> index 1475437..b9dd3e7 100644
>> --- a/platform/linux-generic/odp_crypto.c
>> +++ b/platform/linux-generic/odp_crypto.c
>> @@ -13,6 +13,7 @@
>>  #include <odp_align.h>
>>  #include <odp_shared_memory.h>
>>  #include <odp_crypto_internal.h>
>> +#include <odp_debug_internal.h>
>>  #include <odp_hints.h>
>>  #include <odph_packet.h>
>>
>> @@ -467,3 +468,28 @@ odp_crypto_get_ses_create_compl_session(odp_buffer_t
>> completion_event,
>>         result = odp_buffer_addr(completion_event);
>>         *session = result->session;
>>  }
>> +
>> +void
>> +odp_crypto_set_operation_compl_ctx(odp_buffer_t completion_event,
>> +                                  void *ctx)
>> +{
>>
>
> use ODP_UNUSED for unused arguments not the void below
>
>
>> +       (void)completion_event;
>> +       (void)ctx;
>> +       ODP_UNIMPLEMENTED();
>> +}
>> +
>> +void
>> +*odp_crypto_get_operation_compl_ctx(odp_buffer_t completion_event)
>> +{
>>
>
> use ODP_UNUSED for unused arguments not the void below
>
>
>> +       (void)completion_event;
>> +       ODP_UNIMPLEMENTED();
>> +       return NULL;
>>
>
> The documentation makes no mention of NULL being a possible error case,
> it just says "Returns user data"  The documentation should be improved
> with this patch submission to indicate the error case NULL with a new
> @retval
>
>
>> +}
>> +
>> +odp_packet_t
>> +odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
>> +{
>>
>
> use ODP_UNUSED for unused arguments not the void below
>
>
>> +       (void)completion_event;
>> +       ODP_UNIMPLEMENTED();
>> +       return ODP_PACKET_INVALID;
>>
>
> The documentation makes no mention of ODP_PACKET_INVALID being a possible
> error case, it just says "Returns Packet structure where data now resides"
> The documentation should be improved with this patch submission to indicate
> the error case ODP_PACKET_INVALID with a new @retval
>
>
>> +}
>> --
>> 1.7.3.4
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
>
> --
> *Mike Holmes*
> Linaro  Sr Technical Manager
> LNG - ODP
>
Bill Fischofer Nov. 10, 2014, 4:53 p.m. UTC | #3
As an aside, thanks Mike for the pointer to ODP_UNUSED.  I just ran into
that exact issue for the various unmap() calls that are no-ops in
linux-generic.

Bill

On Mon, Nov 10, 2014 at 10:44 AM, Alexandru Badicioiu <
alexandru.badicioiu@linaro.org> wrote:

> It seems I resent the wrong patch.
>
> On 10 November 2014 18:33, Mike Holmes <mike.holmes@linaro.org> wrote:
>
>>
>>
>> On 10 November 2014 10:30, <alexandru.badicioiu@linaro.org> wrote:
>>
>>> From: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>>>
>>> This patch is required by crypto unit testing.
>>>
>>> Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>>> ---
>>>  platform/linux-generic/odp_crypto.c |   26 ++++++++++++++++++++++++++
>>>  1 files changed, 26 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/platform/linux-generic/odp_crypto.c
>>> b/platform/linux-generic/odp_crypto.c
>>> index 1475437..b9dd3e7 100644
>>> --- a/platform/linux-generic/odp_crypto.c
>>> +++ b/platform/linux-generic/odp_crypto.c
>>> @@ -13,6 +13,7 @@
>>>  #include <odp_align.h>
>>>  #include <odp_shared_memory.h>
>>>  #include <odp_crypto_internal.h>
>>> +#include <odp_debug_internal.h>
>>>  #include <odp_hints.h>
>>>  #include <odph_packet.h>
>>>
>>> @@ -467,3 +468,28 @@
>>> odp_crypto_get_ses_create_compl_session(odp_buffer_t completion_event,
>>>         result = odp_buffer_addr(completion_event);
>>>         *session = result->session;
>>>  }
>>> +
>>> +void
>>> +odp_crypto_set_operation_compl_ctx(odp_buffer_t completion_event,
>>> +                                  void *ctx)
>>> +{
>>>
>>
>> use ODP_UNUSED for unused arguments not the void below
>>
>>
>>> +       (void)completion_event;
>>> +       (void)ctx;
>>> +       ODP_UNIMPLEMENTED();
>>> +}
>>> +
>>> +void
>>> +*odp_crypto_get_operation_compl_ctx(odp_buffer_t completion_event)
>>> +{
>>>
>>
>> use ODP_UNUSED for unused arguments not the void below
>>
>>
>>> +       (void)completion_event;
>>> +       ODP_UNIMPLEMENTED();
>>> +       return NULL;
>>>
>>
>> The documentation makes no mention of NULL being a possible error case,
>> it just says "Returns user data"  The documentation should be improved
>> with this patch submission to indicate the error case NULL with a new
>> @retval
>>
>>
>>> +}
>>> +
>>> +odp_packet_t
>>> +odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
>>> +{
>>>
>>
>> use ODP_UNUSED for unused arguments not the void below
>>
>>
>>> +       (void)completion_event;
>>> +       ODP_UNIMPLEMENTED();
>>> +       return ODP_PACKET_INVALID;
>>>
>>
>> The documentation makes no mention of ODP_PACKET_INVALID being a
>> possible error case, it just says "Returns Packet structure where data now
>> resides" The documentation should be improved with this patch submission to
>> indicate the error case ODP_PACKET_INVALID with a new @retval
>>
>>
>>> +}
>>> --
>>> 1.7.3.4
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>>
>> --
>> *Mike Holmes*
>> Linaro  Sr Technical Manager
>> LNG - ODP
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Mike Holmes Nov. 11, 2014, 1 p.m. UTC | #4
Hi Alex

Do you have a new revision, we really need to get the crypto unit tests
into the repo and presumable we need this for linux generic

On 10 November 2014 11:53, Bill Fischofer <bill.fischofer@linaro.org> wrote:

> As an aside, thanks Mike for the pointer to ODP_UNUSED.  I just ran into
> that exact issue for the various unmap() calls that are no-ops in
> linux-generic.
>
> Bill
>
> On Mon, Nov 10, 2014 at 10:44 AM, Alexandru Badicioiu <
> alexandru.badicioiu@linaro.org> wrote:
>
>> It seems I resent the wrong patch.
>>
>> On 10 November 2014 18:33, Mike Holmes <mike.holmes@linaro.org> wrote:
>>
>>>
>>>
>>> On 10 November 2014 10:30, <alexandru.badicioiu@linaro.org> wrote:
>>>
>>>> From: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>>>>
>>>> This patch is required by crypto unit testing.
>>>>
>>>> Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
>>>> ---
>>>>  platform/linux-generic/odp_crypto.c |   26 ++++++++++++++++++++++++++
>>>>  1 files changed, 26 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/platform/linux-generic/odp_crypto.c
>>>> b/platform/linux-generic/odp_crypto.c
>>>> index 1475437..b9dd3e7 100644
>>>> --- a/platform/linux-generic/odp_crypto.c
>>>> +++ b/platform/linux-generic/odp_crypto.c
>>>> @@ -13,6 +13,7 @@
>>>>  #include <odp_align.h>
>>>>  #include <odp_shared_memory.h>
>>>>  #include <odp_crypto_internal.h>
>>>> +#include <odp_debug_internal.h>
>>>>  #include <odp_hints.h>
>>>>  #include <odph_packet.h>
>>>>
>>>> @@ -467,3 +468,28 @@
>>>> odp_crypto_get_ses_create_compl_session(odp_buffer_t completion_event,
>>>>         result = odp_buffer_addr(completion_event);
>>>>         *session = result->session;
>>>>  }
>>>> +
>>>> +void
>>>> +odp_crypto_set_operation_compl_ctx(odp_buffer_t completion_event,
>>>> +                                  void *ctx)
>>>> +{
>>>>
>>>
>>> use ODP_UNUSED for unused arguments not the void below
>>>
>>>
>>>> +       (void)completion_event;
>>>> +       (void)ctx;
>>>> +       ODP_UNIMPLEMENTED();
>>>> +}
>>>> +
>>>> +void
>>>> +*odp_crypto_get_operation_compl_ctx(odp_buffer_t completion_event)
>>>> +{
>>>>
>>>
>>> use ODP_UNUSED for unused arguments not the void below
>>>
>>>
>>>> +       (void)completion_event;
>>>> +       ODP_UNIMPLEMENTED();
>>>> +       return NULL;
>>>>
>>>
>>> The documentation makes no mention of NULL being a possible error case,
>>> it just says "Returns user data"  The documentation should be improved
>>> with this patch submission to indicate the error case NULL with a new
>>> @retval
>>>
>>>
>>>> +}
>>>> +
>>>> +odp_packet_t
>>>> +odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
>>>> +{
>>>>
>>>
>>> use ODP_UNUSED for unused arguments not the void below
>>>
>>>
>>>> +       (void)completion_event;
>>>> +       ODP_UNIMPLEMENTED();
>>>> +       return ODP_PACKET_INVALID;
>>>>
>>>
>>> The documentation makes no mention of ODP_PACKET_INVALID being a
>>> possible error case, it just says "Returns Packet structure where data now
>>> resides" The documentation should be improved with this patch submission to
>>> indicate the error case ODP_PACKET_INVALID with a new @retval
>>>
>>>
>>>> +}
>>>> --
>>>> 1.7.3.4
>>>>
>>>>
>>>> _______________________________________________
>>>> lng-odp mailing list
>>>> lng-odp@lists.linaro.org
>>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>
>>>
>>>
>>> --
>>> *Mike Holmes*
>>> Linaro  Sr Technical Manager
>>> 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/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 1475437..b9dd3e7 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -13,6 +13,7 @@ 
 #include <odp_align.h>
 #include <odp_shared_memory.h>
 #include <odp_crypto_internal.h>
+#include <odp_debug_internal.h>
 #include <odp_hints.h>
 #include <odph_packet.h>
 
@@ -467,3 +468,28 @@  odp_crypto_get_ses_create_compl_session(odp_buffer_t completion_event,
 	result = odp_buffer_addr(completion_event);
 	*session = result->session;
 }
+
+void
+odp_crypto_set_operation_compl_ctx(odp_buffer_t completion_event,
+				   void *ctx)
+{
+	(void)completion_event;
+	(void)ctx;
+	ODP_UNIMPLEMENTED();
+}
+
+void
+*odp_crypto_get_operation_compl_ctx(odp_buffer_t completion_event)
+{
+	(void)completion_event;
+	ODP_UNIMPLEMENTED();
+	return NULL;
+}
+
+odp_packet_t
+odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event)
+{
+	(void)completion_event;
+	ODP_UNIMPLEMENTED();
+	return ODP_PACKET_INVALID;
+}