muvarov replied on github web page:

platform/linux-generic/odp_crypto.c
@@ -1060,6 +1081,41 @@ int odp_crypto_term_global(void)
        return rc;
 }
 
+int odp_crypto_init_local(void)
+{
+       unsigned i;
+
+       memset(&local, 0, sizeof(local));
+
+       for (i = 0; i < MAX_SESSIONS; i++) {
+               local.ctx[i].hmac = HMAC_CTX_new();
+               local.ctx[i].cipher = EVP_CIPHER_CTX_new();
+
+               if (local.ctx[i].hmac == NULL || local.ctx[i].cipher == NULL) {
+                       odp_crypto_term_local();
+                       return -1;
+               }
+       }
+
+       local.id = odp_thread_id();
+
+       return 0;
+}
+
+int odp_crypto_term_local(void)


Comment:
`_odp_crypto_term_local`

> muvarov wrote
> `_odp_crypto_init_local`


>> muvarov wrote
>> is 32 everywhere MAX_SESSIONS?


https://github.com/Linaro/odp/pull/342#discussion_r157224993
updated_at 2017-12-16 02:08:29

Reply via email to