diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-06-21 20:09:13 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-06-29 13:08:26 +0300 |
commit | 3d591a7970918cee809927595ebf28e554460ca1 (patch) | |
tree | a05abfc432020af99c889562a34c31d4ddf78154 /platform/linux-generic/odp_init.c | |
parent | bbb0829282ba766e26d334dd7afa05e723ec61e7 (diff) |
linux-gen: support building ODP without libcrypto from OpenSSL
Closes https://github.com/Linaro/odp/issues/626
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/odp_init.c')
-rw-r--r-- | platform/linux-generic/odp_init.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 61f99e4d4..28f94cd37 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -33,6 +33,7 @@ enum init_stage { SCHED_INIT, PKTIO_INIT, TIMER_INIT, + RANDOM_INIT, CRYPTO_INIT, CLASSIFICATION_INIT, TRAFFIC_MNGR_INIT, @@ -105,6 +106,9 @@ static int term_global(enum init_stage stage) } /* Fall through */ + case RANDOM_INIT: + /* Fall through */ + case TIMER_INIT: if (odp_timer_term_global()) { ODP_ERR("ODP timer term failed.\n"); @@ -302,6 +306,9 @@ int odp_init_global(odp_instance_t *instance, } stage = TIMER_INIT; + /* No init neeeded */ + stage = RANDOM_INIT; + if (odp_crypto_init_global()) { ODP_ERR("ODP crypto init failed.\n"); goto init_failed; @@ -391,6 +398,13 @@ static int term_local(enum init_stage stage) } /* Fall through */ + case RANDOM_INIT: + if (_odp_random_term_local()) { + ODP_ERR("ODP random local term failed.\n"); + rc = -1; + } + /* Fall through */ + case POOL_INIT: if (odp_pool_term_local()) { ODP_ERR("ODP buffer pool local term failed.\n"); @@ -450,6 +464,12 @@ int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type) } stage = PKTIO_INIT; + if (_odp_random_init_local()) { + ODP_ERR("ODP random local init failed.\n"); + goto init_fail; + } + stage = RANDOM_INIT; + if (_odp_crypto_init_local()) { ODP_ERR("ODP crypto local init failed.\n"); goto init_fail; |