bdev/crypto: lib/env: move minimum DPDK version to DPDK 19.11
SPDK supports two latest DPDK LTS releases and DPDK 20.11 is out now. Remove all functionality and checks for versions <= DPDK 19.11. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I9c354b7bc56d35a9ab04375f9f5255ca914d53e1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5344 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
6bb83abdef
commit
75e8c5f246
@ -280,10 +280,8 @@ create_vbdev_dev(uint8_t index, uint16_t num_lcores)
|
|||||||
|
|
||||||
struct rte_cryptodev_qp_conf qp_conf = {
|
struct rte_cryptodev_qp_conf qp_conf = {
|
||||||
.nb_descriptors = CRYPTO_QP_DESCRIPTORS,
|
.nb_descriptors = CRYPTO_QP_DESCRIPTORS,
|
||||||
#if RTE_VERSION >= RTE_VERSION_NUM(19, 02, 0, 0)
|
|
||||||
.mp_session = g_session_mp,
|
.mp_session = g_session_mp,
|
||||||
.mp_session_private = g_session_mp_priv,
|
.mp_session_private = g_session_mp_priv,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Pre-setup all potential qpairs now and assign them in the channel
|
/* Pre-setup all potential qpairs now and assign them in the channel
|
||||||
@ -292,13 +290,7 @@ create_vbdev_dev(uint8_t index, uint16_t num_lcores)
|
|||||||
* even on other queue pairs.
|
* even on other queue pairs.
|
||||||
*/
|
*/
|
||||||
for (j = 0; j < device->cdev_info.max_nb_queue_pairs; j++) {
|
for (j = 0; j < device->cdev_info.max_nb_queue_pairs; j++) {
|
||||||
#if RTE_VERSION >= RTE_VERSION_NUM(19, 02, 0, 0)
|
|
||||||
rc = rte_cryptodev_queue_pair_setup(cdev_id, j, &qp_conf, SOCKET_ID_ANY);
|
rc = rte_cryptodev_queue_pair_setup(cdev_id, j, &qp_conf, SOCKET_ID_ANY);
|
||||||
#else
|
|
||||||
rc = rte_cryptodev_queue_pair_setup(cdev_id, j, &qp_conf, SOCKET_ID_ANY,
|
|
||||||
g_session_mp);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
SPDK_ERRLOG("Failed to setup queue pair %u on "
|
SPDK_ERRLOG("Failed to setup queue pair %u on "
|
||||||
"cryptodev %u\n", j, cdev_id);
|
"cryptodev %u\n", j, cdev_id);
|
||||||
@ -409,7 +401,6 @@ vbdev_crypto_init_crypto_drivers(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RTE_VERSION >= RTE_VERSION_NUM(19, 02, 0, 0)
|
|
||||||
g_session_mp_priv = rte_mempool_create("session_mp_priv", NUM_SESSIONS, max_sess_size,
|
g_session_mp_priv = rte_mempool_create("session_mp_priv", NUM_SESSIONS, max_sess_size,
|
||||||
SESS_MEMPOOL_CACHE_SIZE, 0, NULL, NULL, NULL,
|
SESS_MEMPOOL_CACHE_SIZE, 0, NULL, NULL, NULL,
|
||||||
NULL, SOCKET_ID_ANY, 0);
|
NULL, SOCKET_ID_ANY, 0);
|
||||||
@ -422,11 +413,6 @@ vbdev_crypto_init_crypto_drivers(void)
|
|||||||
"session_mp",
|
"session_mp",
|
||||||
NUM_SESSIONS, 0, SESS_MEMPOOL_CACHE_SIZE, 0,
|
NUM_SESSIONS, 0, SESS_MEMPOOL_CACHE_SIZE, 0,
|
||||||
SOCKET_ID_ANY);
|
SOCKET_ID_ANY);
|
||||||
#else
|
|
||||||
g_session_mp = rte_mempool_create("session_mp", NUM_SESSIONS, max_sess_size,
|
|
||||||
SESS_MEMPOOL_CACHE_SIZE,
|
|
||||||
0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0);
|
|
||||||
#endif
|
|
||||||
if (g_session_mp == NULL) {
|
if (g_session_mp == NULL) {
|
||||||
SPDK_ERRLOG("Cannot create session pool max size 0x%x\n", max_sess_size);
|
SPDK_ERRLOG("Cannot create session pool max size 0x%x\n", max_sess_size);
|
||||||
goto error_create_session_mp;
|
goto error_create_session_mp;
|
||||||
|
@ -178,18 +178,12 @@ DEFINE_STUB(rte_crypto_op_pool_create, struct rte_mempool *,
|
|||||||
unsigned cache_size, uint16_t priv_size, int socket_id), (struct rte_mempool *)1);
|
unsigned cache_size, uint16_t priv_size, int socket_id), (struct rte_mempool *)1);
|
||||||
DEFINE_STUB(rte_cryptodev_device_count_by_driver, uint8_t, (uint8_t driver_id), 0);
|
DEFINE_STUB(rte_cryptodev_device_count_by_driver, uint8_t, (uint8_t driver_id), 0);
|
||||||
DEFINE_STUB(rte_cryptodev_configure, int, (uint8_t dev_id, struct rte_cryptodev_config *config), 0);
|
DEFINE_STUB(rte_cryptodev_configure, int, (uint8_t dev_id, struct rte_cryptodev_config *config), 0);
|
||||||
#if RTE_VERSION >= RTE_VERSION_NUM(19, 02, 0, 0)
|
|
||||||
DEFINE_STUB(rte_cryptodev_queue_pair_setup, int, (uint8_t dev_id, uint16_t queue_pair_id,
|
DEFINE_STUB(rte_cryptodev_queue_pair_setup, int, (uint8_t dev_id, uint16_t queue_pair_id,
|
||||||
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id), 0);
|
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id), 0);
|
||||||
DEFINE_STUB(rte_cryptodev_sym_session_pool_create, struct rte_mempool *, (const char *name,
|
DEFINE_STUB(rte_cryptodev_sym_session_pool_create, struct rte_mempool *, (const char *name,
|
||||||
uint32_t nb_elts,
|
uint32_t nb_elts,
|
||||||
uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
|
uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
|
||||||
int socket_id), (struct rte_mempool *)1);
|
int socket_id), (struct rte_mempool *)1);
|
||||||
#else
|
|
||||||
DEFINE_STUB(rte_cryptodev_queue_pair_setup, int, (uint8_t dev_id, uint16_t queue_pair_id,
|
|
||||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
|
||||||
int socket_id, struct rte_mempool *session_pool), 0);
|
|
||||||
#endif
|
|
||||||
DEFINE_STUB(rte_cryptodev_start, int, (uint8_t dev_id), 0);
|
DEFINE_STUB(rte_cryptodev_start, int, (uint8_t dev_id), 0);
|
||||||
DEFINE_STUB_V(rte_cryptodev_stop, (uint8_t dev_id));
|
DEFINE_STUB_V(rte_cryptodev_stop, (uint8_t dev_id));
|
||||||
DEFINE_STUB(rte_cryptodev_sym_session_create, struct rte_cryptodev_sym_session *,
|
DEFINE_STUB(rte_cryptodev_sym_session_create, struct rte_cryptodev_sym_session *,
|
||||||
|
Loading…
Reference in New Issue
Block a user