uint32_t max_sess_size = 0, sess_size;
for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) {
- sess_size = rte_cryptodev_get_private_session_size(cdev_id);
+ sess_size = rte_cryptodev_sym_get_private_session_size(cdev_id);
if (sess_size > max_sess_size)
max_sess_size = sess_size;
}
enough to hold the private session of any crypto device), as well as having
multiple session mempools of different sizes for better memory usage.
-An application can use ``rte_cryptodev_get_private_session_size()`` to
+An application can use ``rte_cryptodev_sym_get_private_session_size()`` to
get the private session size of given crypto device. This function would allow
an application to calculate the max device session size of all crypto devices
to create a single session mempool.
If instead an application creates multiple session mempools, the Crypto device
-framework also provides ``rte_cryptodev_get_header_session_size`` to get
+framework also provides ``rte_cryptodev_sym_get_header_session_size`` to get
the size of an uninitialized session.
Once the session mempools have been created, ``rte_cryptodev_sym_session_create()``
uint8_t cdev_id = rte_cryptodev_get_dev_id(crypto_name);
/* Get private session data size. */
- session_size = rte_cryptodev_get_private_session_size(cdev_id);
+ session_size = rte_cryptodev_sym_get_private_session_size(cdev_id);
/*
* Create session mempool, with two objects per session,
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
+ - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
+ in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
+ It will be removed in 18.08.
+ - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
+ in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
+ It will be removed in 18.08.
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct aesni_gcm_session));
memset(op->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct aesni_mb_session));
memset(op->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct armv8_crypto_session));
memset(op->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(session, 0, sizeof(struct kasumi_session));
memset(ops[i]->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, session);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
openssl_reset_session(sess);
memset(sess, 0, sizeof(struct openssl_session));
memset(op->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(session, 0, sizeof(struct snow3g_session));
memset(ops[i]->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, session);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sessions[i], 0, sizeof(struct zuc_session));
memset(ops[i]->sym->session, 0,
- rte_cryptodev_get_header_session_size());
+ rte_cryptodev_sym_get_header_session_size());
rte_mempool_put(qp->sess_mp, sessions[i]);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
uint32_t max_sess_sz = 0, sess_sz;
for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) {
- sess_sz = rte_cryptodev_get_private_session_size(cdev_id);
+ sess_sz = rte_cryptodev_sym_get_private_session_size(cdev_id);
if (sess_sz > max_sess_sz)
max_sess_sz = sess_sz;
}
}
for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
- sess_sz = rte_cryptodev_get_private_session_size(cdev_id);
+ sess_sz = rte_cryptodev_sym_get_private_session_size(cdev_id);
if (sess_sz > max_sess_sz)
max_sess_sz = sess_sz;
}
snprintf(name, 127, "SESS_POOL_%u", worker_lcore);
info.sess_pool = rte_mempool_create(name, SESSION_MAP_ENTRIES,
- rte_cryptodev_get_private_session_size(
+ rte_cryptodev_sym_get_private_session_size(
cryptodev_id), 64, 0, NULL, NULL, NULL, NULL,
rte_lcore_to_socket_id(worker_lcore), 0);
if (!info.sess_pool) {
unsigned int
rte_cryptodev_get_header_session_size(void)
+{
+ return rte_cryptodev_sym_get_header_session_size();
+}
+
+unsigned int
+rte_cryptodev_sym_get_header_session_size(void)
{
/*
* Header contains pointers to the private data
unsigned int
rte_cryptodev_get_private_session_size(uint8_t dev_id)
+{
+ return rte_cryptodev_sym_get_private_session_size(dev_id);
+}
+
+unsigned int
+rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
{
struct rte_cryptodev *dev;
unsigned int header_size = sizeof(void *) * nb_drivers;
struct rte_cryptodev_sym_session *sess);
/**
+ * @deprecated
* Get the size of the header session, for all registered drivers.
*
* @return
* Size of the header session.
*/
+__rte_deprecated
unsigned int
rte_cryptodev_get_header_session_size(void);
/**
+ * @deprecated
* Get the size of the private session data for a device.
*
* @param dev_id The device identifier.
* - Size of the private data, if successful
* - 0 if device is invalid or does not have private session
*/
+__rte_deprecated
unsigned int
rte_cryptodev_get_private_session_size(uint8_t dev_id);
+/**
+ * Get the size of the header session, for all registered drivers.
+ *
+ * @return
+ * Size of the symmetric eader session.
+ */
+unsigned int
+rte_cryptodev_sym_get_header_session_size(void);
+
+/**
+ * Get the size of the private symmetric session data
+ * for a device.
+ *
+ * @param dev_id The device identifier.
+ *
+ * @return
+ * - Size of the private data, if successful
+ * - 0 if device is invalid or does not have private
+ * symmetric session
+ */
+unsigned int
+rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
+
/**
* @deprecated
* Attach queue pair with sym session.
} DPDK_17.08;
+DPDK_18.05 {
+ global:
+
+ rte_cryptodev_sym_get_header_session_size;
+ rte_cryptodev_sym_get_private_session_size;
+
+} DPDK_17.11;
+
EXPERIMENTAL {
global:
ts_params->conf.nb_queue_pairs = info.max_nb_queue_pairs;
ts_params->conf.socket_id = SOCKET_ID_ANY;
- unsigned int session_size = rte_cryptodev_get_private_session_size(dev_id);
+ unsigned int session_size =
+ rte_cryptodev_sym_get_private_session_size(dev_id);
/*
* Create mempool with maximum number of sessions * 2,
rte_mempool_free(ts_params->session_mpool);
ts_params->session_mpool = NULL;
}
- unsigned int session_size = rte_cryptodev_get_private_session_size(i);
+ unsigned int session_size =
+ rte_cryptodev_sym_get_private_session_size(i);
/*
* Create mempool with maximum number of sessions * 2,
* Create mempool with maximum number of sessions * 2,
* to include the session headers & private data
*/
- session_size = rte_cryptodev_get_private_session_size(TEST_CDEV_ID);
+ session_size = rte_cryptodev_sym_get_private_session_size(TEST_CDEV_ID);
session_size += sizeof(union rte_event_crypto_metadata);
params.session_mpool = rte_mempool_create(