aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_crypto.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2019-01-10 09:40:18 +0200
committerMatias Elo <matias.elo@nokia.com>2019-01-10 15:29:24 +0200
commit71fb9d3ef82fae9eb1529219779ce4e6ff7a7fa7 (patch)
tree19e51e1b0d5fb4a3c7caf83fde1e4f40d06b1c4e /platform/linux-dpdk/odp_crypto.c
parent8bb9555c2c35dfc2095f4b29e5323295e2ef09ac (diff)
linux-dpdk: crypto: deprecate rte_cryptodev_get_private_session_size()
rte_cryptodev_get_private_session_size() has been deprecated in DPDK v18.05. Signed-off-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/odp_crypto.c')
-rw-r--r--platform/linux-dpdk/odp_crypto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index d694ef79b..27af8a717 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -29,6 +29,7 @@
#include <rte_config.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>
+#include <rte_version.h>
#include <string.h>
#include <math.h>
@@ -337,7 +338,11 @@ int odp_crypto_init_global(void)
}
for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) {
+#if RTE_VERSION < RTE_VERSION_NUM(18, 5, 0, 0)
sess_sz = rte_cryptodev_get_private_session_size(cdev_id);
+#else
+ sess_sz = rte_cryptodev_sym_get_private_session_size(cdev_id);
+#endif
if (sess_sz > max_sess_sz)
max_sess_sz = sess_sz;
}