aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-11-07 10:58:51 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-11-09 15:36:25 +0300
commit8c63fb0dc5b94dc5a1e6384be97229fa73619ce2 (patch)
treebccb21c5ec255f93a7910dd2511748da986688b9
parente9ad0a254722115450199fe4a72942be9b5cf4e1 (diff)
downloadodp-dpdk-master.tar.gz
odp-dpdk: crypto: fix capability call return valueHEADmaster
Capability call should succeed also when crypto operations are not supported. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-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>
-rw-r--r--platform/linux-dpdk/odp_crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index 9324c590..2f3f9089 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -549,15 +549,15 @@ int odp_crypto_capability(odp_crypto_capability_t *capability)
/* Initialize crypto capability structure */
memset(capability, 0, sizeof(odp_crypto_capability_t));
- capability->sync_mode = ODP_SUPPORT_YES;
- capability->async_mode = ODP_SUPPORT_PREFERRED;
-
cdev_count = rte_cryptodev_count();
if (cdev_count == 0) {
ODP_ERR("No crypto devices available\n");
- return -1;
+ return 0;
}
+ capability->sync_mode = ODP_SUPPORT_YES;
+ capability->async_mode = ODP_SUPPORT_PREFERRED;
+
for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
struct rte_cryptodev_info dev_info;