#include <rte_malloc.h>
#include <rte_cryptodev_pmd.h>
-#include "rte_snow3g_pmd_private.h"
+#include "snow3g_pmd_private.h"
static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
{ /* SNOW 3G (UIA2) */
int socket_id)
{
struct snow3g_qp *qp = NULL;
+ struct snow3g_private *internals = dev->data->dev_private;
/* Free memory prior to re-allocation if needed. */
if (dev->data->queue_pairs[qp_id] != NULL)
if (qp->processed_ops == NULL)
goto qp_setup_cleanup;
+ qp->mgr = internals->mgr;
qp->sess_mp = qp_conf->mp_session;
qp->sess_mp_priv = qp_conf->mp_session_private;
return -1;
}
-/** Return the number of allocated queue pairs */
-static uint32_t
-snow3g_pmd_qp_count(struct rte_cryptodev *dev)
-{
- return dev->data->nb_queue_pairs;
-}
-
/** Returns the size of the SNOW 3G session structure */
static unsigned
snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
/** Configure a SNOW 3G session from a crypto xform chain */
static int
-snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
struct rte_cryptodev_sym_session *sess,
struct rte_mempool *mempool)
{
void *sess_private_data;
int ret;
+ struct snow3g_private *internals = dev->data->dev_private;
if (unlikely(sess == NULL)) {
SNOW3G_LOG(ERR, "invalid session struct");
return -ENOMEM;
}
- ret = snow3g_set_session_parameters(sess_private_data, xform);
+ ret = snow3g_set_session_parameters(internals->mgr,
+ sess_private_data, xform);
if (ret != 0) {
SNOW3G_LOG(ERR, "failed configure session parameters");
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_count = snow3g_pmd_qp_count,
.sym_session_get_size = snow3g_pmd_sym_session_get_size,
.sym_session_configure = snow3g_pmd_sym_session_configure,