On 30 May 2017 at 18:30, Bala Manoharan <bala.manoha...@linaro.org> wrote:
> On 30 May 2017 at 20:46, Dmitry Eremin-Solenikov
> <dmitry.ereminsoleni...@linaro.org> wrote:
>> On 30 May 2017 at 18:06, Bala Manoharan <bala.manoha...@linaro.org> wrote:
>>> On 30 May 2017 at 20:30, Github ODP bot <odp...@yandex.ru> wrote:
>>>> From: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>
>>>>
>>>> Currently odp_crypto_session_create() (unlike other creation functions)
>>>> returns int result with session being returned through pointer argument.
>>>> Replace it with odp_crypto_session_create2 directly returning a session
>>>> (or ODP_CRYPTO_SESSION_INVALID in case of an error).
>>>>
>>>> Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>
>>
>> [skipped]
>>
>>>> @@ -114,8 +114,8 @@ int create_ipsec_cache_entry(sa_db_entry_t *cipher_sa,
>>>>                         return -1;
>>>>         }
>>>>
>>>> -       /* Synchronous session create for now */
>>>> -       if (odp_crypto_session_create(&params, &session, &ses_create_rc))
>>>> +       session = odp_crypto_session_create2(&params, &ses_create_rc);
>>>
>>> IMO, I would prefer not having these types of numbered extensions to
>>> an API this will be confusing on the long run.
>>
>> Well, your proposal for the name?
>
> Do we really need this change to the API? This is not such a big
> change to propose a new API.

I think we need.

First, we need consistency in the API usage.

Second, right now it is not clear even from the example/test point of view,
whether odp_crypto_session_create will set *session param in case
of error. See run_measure_one_config in
test/common_plat/performance/odp_crypto.c file.

Reply via email to