Skip to content

Commit

Permalink
crypto/mvsam: fix build after session rework
Browse files Browse the repository at this point in the history
mvsam build was broken due to the recent session rework,
as it was not enabled in default build.
This patch fixes the build.

Fixes: 3f3fc33 ("security: remove private mempool usage")
Fixes: bdce256 ("cryptodev: rework session framework")
Fixes: 6683786 ("drivers/crypto: support security session size query")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
  • Loading branch information
Akhil Goyal authored and tmonjalo committed Oct 6, 2022
1 parent 690493f commit 7244858
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/crypto/mvsam/rte_mrvl_pmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ mrvl_request_prepare_sec(struct sam_cio_ipsec_params *request,
return -EINVAL;
}

sess = SECURITY_GET_SESS_PRIV(op->sym->sec_session);
sess = SECURITY_GET_SESS_PRIV(op->sym->session);
if (unlikely(sess == NULL)) {
MRVL_LOG(ERR, "Session was not created for this device! %d",
cryptodev_driver_id);
Expand Down
7 changes: 3 additions & 4 deletions drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
break;

qp->sess_mp = qp_conf->mp_session;
qp->sess_mp_priv = qp_conf->mp_session_private;

memset(&qp->stats, 0, sizeof(qp->stats));
dev->data->queue_pairs[qp_id] = qp;
Expand Down Expand Up @@ -778,11 +777,11 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
* @returns 0. Always.
*/
static void
mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{

void *sess_priv = sess->data;
void *sess_priv = sess->driver_priv_data;

/* Zero out the whole structure */
if (sess_priv) {
Expand Down Expand Up @@ -908,7 +907,7 @@ mrvl_crypto_pmd_security_session_destroy(void *dev __rte_unused,
}

static unsigned int
mrvl_crypto_pmd_security_session_create(void *device __rte_unused)
mrvl_crypto_pmd_security_session_get_size(void *device __rte_unused)
{
return sizeof(struct mrvl_crypto_session);
}
Expand Down

0 comments on commit 7244858

Please sign in to comment.