summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/ipsec.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-02 16:28:16 +0100
committerDamjan Marion <dmarion@me.com>2019-02-02 16:31:07 +0000
commit1a6ece34358a34367ff1807ac3a9a97b8a120b77 (patch)
treeff3df0b997689914129c8345e32815bda448298d /src/plugins/dpdk/ipsec/ipsec.c
parent773291163a4f72f131afc6a84b065bcfed13aeb7 (diff)
dpdk: bump to dpdk 19.02
HQoS requires fixes to work with dpdk 19.02 so code is disabled and pending deprecation unless active maintainer is found. Change-Id: I3569c4287b6dfdd2c29e02375eb53bf01fa6ae84 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec/ipsec.c')
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c
index 520708476a8..698f3b51637 100644
--- a/src/plugins/dpdk/ipsec/ipsec.c
+++ b/src/plugins/dpdk/ipsec/ipsec.c
@@ -419,7 +419,14 @@ static inline void *
get_session_private_data (const struct rte_cryptodev_sym_session *sess,
uint8_t driver_id)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
return sess->sess_private_data[driver_id];
+#else
+ if (unlikely (sess->nb_drivers <= driver_id))
+ return 0;
+
+ return sess->sess_data[driver_id].data;
+#endif
}
/* This is from rte_cryptodev_pmd.h */
@@ -427,7 +434,13 @@ static inline void
set_session_private_data (struct rte_cryptodev_sym_session *sess,
uint8_t driver_id, void *private_data)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
sess->sess_private_data[driver_id] = private_data;
+#else
+ if (unlikely (sess->nb_drivers <= driver_id))
+ return;
+ sess->sess_data[driver_id].data = private_data;
+#endif
}
static clib_error_t *
@@ -649,7 +662,11 @@ crypto_dev_conf (u8 dev, u16 n_qp, u8 numa)
qp_conf.nb_descriptors = DPDK_CRYPTO_N_QUEUE_DESC;
for (qp = 0; qp < n_qp; qp++)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
ret = rte_cryptodev_queue_pair_setup (dev, qp, &qp_conf, numa, NULL);
+#else
+ ret = rte_cryptodev_queue_pair_setup (dev, qp, &qp_conf, numa);
+#endif
if (ret < 0)
return clib_error_return (0, error_str, dev, qp);
}