aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/cryptodev/cryptodev.h
diff options
context:
space:
mode:
authorXinyao Cai <xinyao.cai@intel.com>2023-04-12 18:35:23 +0800
committerDamjan Marion <dmarion@0xa5.net>2023-04-25 15:13:22 +0000
commitefad24a84d35458e2c672b94027e54923a42fd25 (patch)
treee3ebb21f1c3274d81e5d1b9fbcf874f0685a5dbc /src/plugins/dpdk/cryptodev/cryptodev.h
parent140ca0fa95b4b8c037dfa83e99fd08620e93c646 (diff)
dpdk: code preparation for bumping to DPDK 22.11
This patch prepares code for bumping DPDK version to 22.11, but the DPDK version of this patch keeps at 22.07 for compatibility. the "no-dsa" parameter in DPDK configuration is removed, the "blacklist" parameter can be used to block the related DSA devices. Type: feature Signed-off-by: Xinyao Cai <xinyao.cai@intel.com> Change-Id: I08787c6584bba66383fc0a784963f33171196910
Diffstat (limited to 'src/plugins/dpdk/cryptodev/cryptodev.h')
-rw-r--r--src/plugins/dpdk/cryptodev/cryptodev.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev.h b/src/plugins/dpdk/cryptodev/cryptodev.h
index 53a0462ea43..cf68e1da083 100644
--- a/src/plugins/dpdk/cryptodev/cryptodev.h
+++ b/src/plugins/dpdk/cryptodev/cryptodev.h
@@ -81,10 +81,16 @@ typedef enum
CRYPTODEV_N_OP_TYPES,
} cryptodev_op_type_t;
+#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0)
+typedef void cryptodev_session_t;
+#else
+typedef struct rte_cryptodev_sym_session cryptodev_session_t;
+#endif
+
/* Cryptodev session data, one data per direction per numa */
typedef struct
{
- struct rte_cryptodev_sym_session ***keys;
+ cryptodev_session_t ***keys;
} cryptodev_key_t;
/* Replicate DPDK rte_cryptodev_sym_capability structure with key size ranges
@@ -125,7 +131,9 @@ typedef struct
typedef struct
{
struct rte_mempool *sess_pool;
+#if RTE_VERSION < RTE_VERSION_NUM(22, 11, 0, 0)
struct rte_mempool *sess_priv_pool;
+#endif
} cryptodev_session_pool_t;
typedef struct
@@ -163,7 +171,7 @@ typedef struct
u16 aad_index;
u8 *aad_buf;
u64 aad_phy_addr;
- struct rte_cryptodev_sym_session *reset_sess;
+ cryptodev_session_t *reset_sess;
};
};
u16 cryptodev_id;
@@ -184,6 +192,9 @@ typedef struct
u32 sess_sz;
u32 drivers_cnt;
u8 is_raw_api;
+#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0)
+ u8 driver_id;
+#endif
} cryptodev_main_t;
extern cryptodev_main_t cryptodev_main;