Skip to content

Commit

Permalink
crypto/ipsec_mb: remove unused defines
Browse files Browse the repository at this point in the history
removed AESNI_MB_DOCSIS_SEC_ENABLED defines as they are no longer used.

Fixes: 66a9d8d ("crypto/qat: remove security library presence checks")
Cc: maxime.coquelin@redhat.com

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
bdoole1 authored and ovsrobot committed Jul 6, 2023
1 parent ed4f8e0 commit c06093f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
4 changes: 0 additions & 4 deletions drivers/crypto/ipsec_mb/ipsec_mb_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,6 @@ ipsec_mb_remove(struct rte_vdev_device *vdev)
rte_free(cryptodev->security_ctx);
cryptodev->security_ctx = NULL;
}
#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
rte_free(cryptodev->security_ctx);
cryptodev->security_ctx = NULL;
#endif

for (qp_id = 0; qp_id < cryptodev->data->nb_queue_pairs; qp_id++)
ipsec_mb_qp_release(cryptodev, qp_id);
Expand Down
22 changes: 2 additions & 20 deletions drivers/crypto/ipsec_mb/pmd_aesni_mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ aesni_mb_session_configure(IMB_MGR *mb_mgr,
return 0;
}

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
/** Check DOCSIS security session configuration is valid */
static int
check_docsis_sec_session(struct rte_security_session_conf *conf)
Expand Down Expand Up @@ -989,7 +988,6 @@ aesni_mb_set_docsis_sec_session_parameters(
free_mb_mgr(mb_mgr);
return ret;
}
#endif

static inline uint64_t
auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
Expand Down Expand Up @@ -1760,7 +1758,6 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
return 0;
}

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
/**
* Process a crypto operation containing a security op and complete a
* IMB_JOB job structure for submission to the multi buffer library for
Expand Down Expand Up @@ -1851,7 +1848,6 @@ verify_docsis_sec_crc(IMB_JOB *job, uint8_t *status)
if (memcmp(job->auth_tag_output, crc, RTE_ETHER_CRC_LEN) != 0)
*status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
}
#endif

static inline void
verify_digest(IMB_JOB *job, void *digest, uint16_t len, uint8_t *status)
Expand Down Expand Up @@ -1919,8 +1915,6 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
struct aesni_mb_session *sess = NULL;
uint8_t *linear_buf = NULL;
int sgl = 0;

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
uint8_t is_docsis_sec = 0;

if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
Expand All @@ -1931,7 +1925,6 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
is_docsis_sec = 1;
sess = SECURITY_GET_SESS_PRIV(op->sym->session);
} else
#endif
sess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session);

if (likely(op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)) {
Expand Down Expand Up @@ -1959,11 +1952,9 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
op->sym->aead.digest.data,
sess->auth.req_digest_len,
&op->status);
#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
else if (is_docsis_sec)
verify_docsis_sec_crc(job,
&op->status);
#endif
else
verify_digest(job,
op->sym->auth.digest.data,
Expand Down Expand Up @@ -2095,12 +2086,10 @@ aesni_mb_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
job = jobs[i];
op = deqd_ops[i];

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
retval = set_sec_mb_job_params(job, qp, op,
&digest_idx);
else
#endif
retval = set_mb_job_params(job, qp, op,
&digest_idx, mb_mgr);

Expand Down Expand Up @@ -2256,12 +2245,10 @@ aesni_mb_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
if (retval < 0)
break;

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
retval = set_sec_mb_job_params(job, qp, op,
&digest_idx);
else
#endif
retval = set_mb_job_params(job, qp, op,
&digest_idx, mb_mgr);

Expand Down Expand Up @@ -2437,7 +2424,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.sym_session_clear = ipsec_mb_sym_session_clear
};

#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
/**
* Configure a aesni multi-buffer session from a security session
* configuration
Expand Down Expand Up @@ -2525,8 +2511,6 @@ aesni_mb_configure_dev(struct rte_cryptodev *dev)
return -ENOMEM;
}

#endif

static int
aesni_mb_probe(struct rte_vdev_device *vdev)
{
Expand Down Expand Up @@ -2567,17 +2551,15 @@ RTE_INIT(ipsec_mb_register_aesni_mb)
RTE_CRYPTODEV_FF_IN_PLACE_SGL |
RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT |
RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT;
RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
RTE_CRYPTODEV_FF_SECURITY;

aesni_mb_data->internals_priv_size = 0;
aesni_mb_data->ops = &aesni_mb_pmd_ops;
aesni_mb_data->qp_priv_size = sizeof(struct aesni_mb_qp_data);
aesni_mb_data->queue_pair_configure = NULL;
#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
aesni_mb_data->security_ops = &aesni_mb_pmd_sec_ops;
aesni_mb_data->dev_config = aesni_mb_configure_dev;
aesni_mb_data->feature_flags |= RTE_CRYPTODEV_FF_SECURITY;
#endif
aesni_mb_data->session_configure = aesni_mb_session_configure;
aesni_mb_data->session_priv_size = sizeof(struct aesni_mb_session);
}
1 change: 0 additions & 1 deletion drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef _PMD_AESNI_MB_PRIV_H_
#define _PMD_AESNI_MB_PRIV_H_

#define AESNI_MB_DOCSIS_SEC_ENABLED 1
#include <rte_security.h>
#include <rte_security_driver.h>
#include <rte_ether.h>
Expand Down

0 comments on commit c06093f

Please sign in to comment.