On 30 May 2017 at 21:24, Dmitry Eremin-Solenikov
<[email protected]> wrote:
> On 30 May 2017 at 18:30, Bala Manoharan <[email protected]> wrote:
>> On 30 May 2017 at 20:46, Dmitry Eremin-Solenikov
>> <[email protected]> wrote:
>>> On 30 May 2017 at 18:06, Bala Manoharan <[email protected]> wrote:
>>>> On 30 May 2017 at 20:30, Github ODP bot <[email protected]> wrote:
>>>>> From: Dmitry Eremin-Solenikov <[email protected]>
>>>>>
>>>>> 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 <[email protected]>
>>>
>>> [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.

 Not sure about this. We have to maintain backward compatibility and
having multiple APIs will create confusion for application user.

>
> 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.

This seems valid. Why don't you update the documentation to clarify this.

Regards,
Bala

Reply via email to