From patchwork Tue Jun 20 07:52:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128826 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97BEB42D04; Tue, 20 Jun 2023 09:53:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9747242D17; Tue, 20 Jun 2023 09:53:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4F33642C4D for ; Tue, 20 Jun 2023 09:53:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e138NHBx8JM3R1rpjVkfhfDaZi/mXuJlqHHetdkNw0Y=; b=JfKZkUW0HNUzyEdSxS4fO5yMkTxEIT9YOiQP6sw3gEEpGvPChucwO0aUF4cPaRF2eNSh3s GdnCMoasWg4ZuJh1nCAacn2OdtDj0mE6+zxuGmJ2cai/QP72LRtb3b31Nl+lGHpNG3rdWu cc8CqqXbbGIcf9Q76g2OIrZhVCpnSkE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-655-4_5M9MjnPtS2iGSukkk7ZQ-1; Tue, 20 Jun 2023 03:52:58 -0400 X-MC-Unique: 4_5M9MjnPtS2iGSukkk7ZQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F4BF85A58A; Tue, 20 Jun 2023 07:52:58 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 785A4207B2BC; Tue, 20 Jun 2023 07:52:56 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin , stable@dpdk.org Subject: [PATCH v2 1/6] crypto/qat: fix sym device prototype Date: Tue, 20 Jun 2023 09:52:46 +0200 Message-ID: <20230620075251.103491-2-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org qat_dev_cmd_param parameter of qat_sym_dev_create() was wrongly marked as unused, this patch fixes it. Fixes: fb3b9f492205 ("crypto/qat: rework burst data path") Cc: stable@dpdk.org Acked-by: Tyler Retzlaff Acked-by: Fan Zhang Signed-off-by: Maxime Coquelin --- drivers/crypto/qat/qat_sym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index 345c845325..506a80419a 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -179,7 +179,7 @@ qat_sym_dequeue_burst(void *qp, struct rte_crypto_op **ops, int qat_sym_dev_create(struct qat_pci_device *qat_pci_dev, - struct qat_dev_cmd_param *qat_dev_cmd_param __rte_unused) + struct qat_dev_cmd_param *qat_dev_cmd_param) { int i = 0, ret = 0; uint16_t slice_map = 0; From patchwork Tue Jun 20 07:52:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128824 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0FDBF42D04; Tue, 20 Jun 2023 09:53:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66E5742BDA; Tue, 20 Jun 2023 09:53:06 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7396542BAC for ; Tue, 20 Jun 2023 09:53:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ktDMYeIdbLtFts6hB3tCNiA4dMHnU49Sf/aqEZRgiJ8=; b=NU1efxSDUx8ujUlaHiElvXYiTRgayGs+RdypZW/97HIDqX1rSCTCpbIr8UIXNLO1xpQVX8 pb/3QQ6sESze63kEEvPrA8tVbuf841+GGAUDov6bmDn/yDbFi1d5UmU+DAfN76Ya5Xe8Yb qbSxZtV6ZA18Yt5Gt7c3Bkf+DwMx1xM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631-mTKTxVXVOKWCOqEb8I72_Q-1; Tue, 20 Jun 2023 03:53:00 -0400 X-MC-Unique: mTKTxVXVOKWCOqEb8I72_Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F64D28088A2; Tue, 20 Jun 2023 07:53:00 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F418200A398; Tue, 20 Jun 2023 07:52:58 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin Subject: [PATCH v2 2/6] crypto/qat: remove security lib presence checks Date: Tue, 20 Jun 2023 09:52:47 +0200 Message-ID: <20230620075251.103491-3-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since security library is a required dependency for building QAT crypto PMD, remove useless #ifdefs around rte_security APIs calls. Signed-off-by: Maxime Coquelin --- drivers/common/qat/qat_qp.c | 2 -- drivers/crypto/qat/dev/qat_crypto_pmd_gen2.c | 3 --- drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 2 -- drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 2 -- drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 2 -- drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 7 ------- drivers/crypto/qat/qat_crypto.h | 2 -- drivers/crypto/qat/qat_sym.c | 15 ++------------- drivers/crypto/qat/qat_sym.h | 13 +------------ drivers/crypto/qat/qat_sym_session.c | 4 ---- drivers/crypto/qat/qat_sym_session.h | 4 ---- 11 files changed, 3 insertions(+), 53 deletions(-) diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index 348a1d574d..0ba26d8580 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -640,10 +640,8 @@ qat_enqueue_op_burst(void *qp, qat_op_build_request_t op_build_request, } } -#ifdef RTE_LIB_SECURITY if (tmp_qp->service_type == QAT_SERVICE_SYMMETRIC) qat_sym_preprocess_requests(ops, nb_ops_possible); -#endif memset(tmp_qp->opaque, 0xff, sizeof(tmp_qp->opaque)); diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen2.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen2.c index 1f3e2b1d99..e643baaa8f 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen2.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen2.c @@ -327,11 +327,8 @@ RTE_INIT(qat_sym_crypto_gen2_init) qat_sym_configure_raw_dp_ctx_gen1; qat_sym_gen_dev_ops[QAT_GEN2].get_feature_flags = qat_sym_crypto_feature_flags_get_gen1; - -#ifdef RTE_LIB_SECURITY qat_sym_gen_dev_ops[QAT_GEN2].create_security_ctx = qat_sym_create_security_gen1; -#endif } RTE_INIT(qat_asym_crypto_gen2_init) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c index 6013fed721..93b1327e22 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c @@ -732,10 +732,8 @@ RTE_INIT(qat_sym_crypto_gen3_init) qat_sym_crypto_set_session_gen3; qat_sym_gen_dev_ops[QAT_GEN3].set_raw_dp_ctx = qat_sym_configure_raw_dp_ctx_gen3; -#ifdef RTE_LIB_SECURITY qat_sym_gen_dev_ops[QAT_GEN3].create_security_ctx = qat_sym_create_security_gen1; -#endif } RTE_INIT(qat_asym_crypto_gen3_init) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c index b219a418ba..ab87ac2461 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c @@ -408,10 +408,8 @@ RTE_INIT(qat_sym_crypto_gen4_init) qat_sym_configure_raw_dp_ctx_gen4; qat_sym_gen_dev_ops[QAT_GEN4].get_feature_flags = qat_sym_crypto_feature_flags_get_gen1; -#ifdef RTE_LIB_SECURITY qat_sym_gen_dev_ops[QAT_GEN4].create_security_ctx = qat_sym_create_security_gen1; -#endif } RTE_INIT(qat_asym_crypto_gen4_init) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h index e8e92e22d4..f2bf343793 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h @@ -947,11 +947,9 @@ qat_asym_crypto_feature_flags_get_gen1(struct qat_pci_device *qat_dev); int qat_asym_crypto_set_session_gen1(void *cryptodev, void *session); -#ifdef RTE_LIB_SECURITY extern struct rte_security_ops security_qat_ops_gen1; void * qat_sym_create_security_gen1(void *cryptodev); -#endif #endif diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c index 590eaa0057..db463b71e0 100644 --- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c +++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c @@ -3,9 +3,7 @@ */ #include -#ifdef RTE_LIB_SECURITY #include -#endif #include "adf_transport_access_macros.h" #include "icp_qat_fw.h" @@ -393,8 +391,6 @@ qat_sym_build_op_chain_gen1(void *in_op, struct qat_sym_session *ctx, return 0; } -#ifdef RTE_LIB_SECURITY - #define QAT_SECURITY_SYM_CAPABILITIES \ { /* AES DOCSIS BPI */ \ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \ @@ -481,7 +477,6 @@ qat_sym_create_security_gen1(void *cryptodev) return (void *)security_instance; } -#endif int qat_sym_dp_enqueue_single_cipher_gen1(void *qp_data, uint8_t *drv_ctx, struct rte_crypto_vec *data, uint16_t n_data_vecs, @@ -1252,8 +1247,6 @@ RTE_INIT(qat_sym_crypto_gen1_init) qat_sym_configure_raw_dp_ctx_gen1; qat_sym_gen_dev_ops[QAT_GEN1].get_feature_flags = qat_sym_crypto_feature_flags_get_gen1; -#ifdef RTE_LIB_SECURITY qat_sym_gen_dev_ops[QAT_GEN1].create_security_ctx = qat_sym_create_security_gen1; -#endif } diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h index e20f16236e..fcd62eda27 100644 --- a/drivers/crypto/qat/qat_crypto.h +++ b/drivers/crypto/qat/qat_crypto.h @@ -62,9 +62,7 @@ struct qat_crypto_gen_dev_ops { struct rte_cryptodev_ops *cryptodev_ops; set_session_t set_session; set_raw_dp_ctx_t set_raw_dp_ctx; -#ifdef RTE_LIB_SECURITY create_security_ctx_t create_security_ctx; -#endif }; extern struct qat_crypto_gen_dev_ops qat_sym_gen_dev_ops[]; diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index 506a80419a..ed65c04f84 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -97,10 +97,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, opaque[0] = (uintptr_t)ctx; opaque[1] = (uintptr_t)build_request; } - } - -#ifdef RTE_LIB_SECURITY - else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { + } else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { ctx = SECURITY_GET_SESS_PRIV(op->sym->session); if (unlikely(!ctx)) { QAT_DP_LOG(ERR, "No session for this device"); @@ -150,9 +147,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, opaque[0] = sess; opaque[1] = (uintptr_t)build_request; } - } -#endif - else { /* RTE_CRYPTO_OP_SESSIONLESS */ + } else { /* RTE_CRYPTO_OP_SESSIONLESS */ op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS; QAT_LOG(DEBUG, "QAT does not support sessionless operation"); return -1; @@ -250,7 +245,6 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev, if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; -#ifdef RTE_LIB_SECURITY if (gen_dev_ops->create_security_ctx) { cryptodev->security_ctx = gen_dev_ops->create_security_ctx((void *)cryptodev); @@ -265,7 +259,6 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev, } else { QAT_LOG(INFO, "Device %s rte_security support disabled", name); } -#endif snprintf(capa_memz_name, RTE_CRYPTODEV_NAME_MAX_LEN, "QAT_SYM_CAPA_GEN_%d", qat_pci_dev->qat_dev_gen); @@ -306,10 +299,8 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev, return 0; error: -#ifdef RTE_LIB_SECURITY rte_free(cryptodev->security_ctx); cryptodev->security_ctx = NULL; -#endif rte_cryptodev_pmd_destroy(cryptodev); memset(&qat_dev_instance->sym_rte_dev, 0, sizeof(qat_dev_instance->sym_rte_dev)); @@ -331,10 +322,8 @@ qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev) /* free crypto device */ cryptodev = rte_cryptodev_pmd_get_dev(qat_pci_dev->sym_dev->dev_id); -#ifdef RTE_LIB_SECURITY rte_free(cryptodev->security_ctx); cryptodev->security_ctx = NULL; -#endif rte_cryptodev_pmd_destroy(cryptodev); qat_pci_devs[qat_pci_dev->qat_dev_id].sym_rte_dev.name = NULL; qat_pci_dev->sym_dev = NULL; diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index 3d841d0eba..0f78c0f4b8 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -6,15 +6,11 @@ #define _QAT_SYM_H_ #include -#ifdef RTE_LIB_SECURITY #include -#endif #ifdef BUILD_QAT_SYM #include -#ifdef RTE_LIB_SECURITY #include -#endif #include "qat_common.h" #include "qat_sym_session.h" @@ -222,7 +218,6 @@ qat_bpicipher_postprocess(struct qat_sym_session *ctx, return sym_op->cipher.data.length - last_block_len; } -#ifdef RTE_LIB_SECURITY static inline void qat_crc_verify(struct qat_sym_session *ctx, struct rte_crypto_op *op) { @@ -288,7 +283,6 @@ qat_sym_preprocess_requests(void **ops, uint16_t nb_ops) } } } -#endif static __rte_always_inline int qat_sym_process_response(void **op, uint8_t *resp, void *op_cookie, @@ -306,7 +300,6 @@ qat_sym_process_response(void **op, uint8_t *resp, void *op_cookie, sizeof(struct icp_qat_fw_comn_resp)); #endif -#ifdef RTE_LIB_SECURITY if (rx_op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { /* * Assuming at this point that if it's a security @@ -314,9 +307,7 @@ qat_sym_process_response(void **op, uint8_t *resp, void *op_cookie, */ sess = SECURITY_GET_SESS_PRIV(rx_op->sym->session); is_docsis_sec = 1; - } else -#endif - { + } else { sess = CRYPTODEV_GET_SYM_SESS_PRIV(rx_op->sym->session); is_docsis_sec = 0; } @@ -331,11 +322,9 @@ qat_sym_process_response(void **op, uint8_t *resp, void *op_cookie, if (sess->bpi_ctx) { qat_bpicipher_postprocess(sess, rx_op); -#ifdef RTE_LIB_SECURITY if (is_docsis_sec && sess->qat_cmd != ICP_QAT_FW_LA_CMD_CIPHER_CRC) qat_crc_verify(sess, rx_op); -#endif } } diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 9babf13b66..327f568a28 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -25,10 +25,8 @@ #include #include #include -#ifdef RTE_LIB_SECURITY #include #include -#endif #include "qat_logs.h" #include "qat_sym_session.h" @@ -2653,7 +2651,6 @@ int qat_sym_validate_zuc_key(int key_len, enum icp_qat_hw_cipher_algo *alg) return 0; } -#ifdef RTE_LIB_SECURITY static int qat_sec_session_check_docsis(struct rte_security_session_conf *conf) { @@ -2940,4 +2937,3 @@ qat_security_session_get_size(void *device __rte_unused) { return sizeof(struct qat_sym_session); } -#endif diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h index 9b5d11ac88..b7fbf5c491 100644 --- a/drivers/crypto/qat/qat_sym_session.h +++ b/drivers/crypto/qat/qat_sym_session.h @@ -6,9 +6,7 @@ #include #include -#ifdef RTE_LIB_SECURITY #include -#endif #include "qat_common.h" #include "icp_qat_hw.h" @@ -193,7 +191,6 @@ qat_cipher_get_block_size(enum icp_qat_hw_cipher_algo qat_cipher_alg); int qat_sym_validate_zuc_key(int key_len, enum icp_qat_hw_cipher_algo *alg); -#ifdef RTE_LIB_SECURITY int qat_security_session_create(void *dev, struct rte_security_session_conf *conf, struct rte_security_session *sess); @@ -201,6 +198,5 @@ int qat_security_session_destroy(void *dev, struct rte_security_session *sess); unsigned int qat_security_session_get_size(void *dev __rte_unused); -#endif #endif /* _QAT_SYM_SESSION_H_ */ From patchwork Tue Jun 20 07:52:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128825 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3285542D04; Tue, 20 Jun 2023 09:53:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B10C42D0C; Tue, 20 Jun 2023 09:53:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 0927442BD9 for ; Tue, 20 Jun 2023 09:53:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xV8TmmP4XHKA7Jqawnz4MfCjTwm3mfM56LEv5Qk6ThY=; b=giJz/ui+335wMCCl+SMC2dUtNpO3NGqXJzj5nX6ffMriSiPx6yJ94Kc2rDZM1u2R7gtwqY iXzjNVPZITCglLTyDh7xqwUahKCeSmHHhsZ3y6O+CEJhkZmHHV5TxfHXDKIpte42rZIvj1 y36YtHiL8F716xP7XypfQ9EeQEp6KLs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-DHYK5oEpMFOat1aJJak69Q-1; Tue, 20 Jun 2023 03:53:03 -0400 X-MC-Unique: DHYK5oEpMFOat1aJJak69Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6EF22806000; Tue, 20 Jun 2023 07:53:02 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2F51200A398; Tue, 20 Jun 2023 07:53:00 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin Subject: [PATCH v2 3/6] crypto/dpaa2_sec: remove security lib presence checks Date: Tue, 20 Jun 2023 09:52:48 +0200 Message-ID: <20230620075251.103491-4-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since security library is a required dependency for building DPAA2 crypto PMD, remove useless #ifdefs around rte_security APIs calls. Acked-by: Hemant Agrawal Signed-off-by: Maxime Coquelin --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 36 ++++++--------------- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 9 ------ 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 392bf74856..5ccfcbd7a6 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -70,10 +70,9 @@ free_fle(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) struct qbman_fle *fle; struct rte_crypto_op *op; -#ifdef RTE_LIB_SECURITY if (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single) return; -#endif + fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1)); /* free the fle memory */ @@ -83,7 +82,6 @@ free_fle(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) rte_free((void *)(fle-1)); } -#ifdef RTE_LIB_SECURITY static inline int build_proto_compound_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op, @@ -309,7 +307,6 @@ build_proto_fd(dpaa2_sec_session *sess, return 0; } -#endif static inline int build_authenc_gcm_sg_fd(dpaa2_sec_session *sess, @@ -1378,13 +1375,11 @@ build_sec_fd(struct rte_crypto_op *op, int ret = -1; dpaa2_sec_session *sess; - if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) + if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) { sess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session); -#ifdef RTE_LIB_SECURITY - else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) + } else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { sess = SECURITY_GET_SESS_PRIV(op->sym->session); -#endif - else { + } else { DPAA2_SEC_DP_ERR("Session type invalid\n"); return -ENOTSUP; } @@ -1411,12 +1406,10 @@ build_sec_fd(struct rte_crypto_op *op, case DPAA2_SEC_CIPHER_HASH: ret = build_authenc_sg_fd(sess, op, fd, bpid); break; -#ifdef RTE_LIB_SECURITY case DPAA2_SEC_IPSEC: case DPAA2_SEC_PDCP: ret = build_proto_compound_sg_fd(sess, op, fd, bpid); break; -#endif case DPAA2_SEC_HASH_CIPHER: default: DPAA2_SEC_ERR("error: Unsupported session"); @@ -1435,14 +1428,12 @@ build_sec_fd(struct rte_crypto_op *op, case DPAA2_SEC_CIPHER_HASH: ret = build_authenc_fd(sess, op, fd, bpid, qp); break; -#ifdef RTE_LIB_SECURITY case DPAA2_SEC_IPSEC: ret = build_proto_fd(sess, op, fd, bpid, qp); break; case DPAA2_SEC_PDCP: ret = build_proto_compound_fd(sess, op, fd, bpid, qp); break; -#endif case DPAA2_SEC_HASH_CIPHER: default: DPAA2_SEC_ERR("error: Unsupported session"); @@ -1558,7 +1549,6 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, return num_tx; } -#ifdef RTE_LIB_SECURITY static inline struct rte_crypto_op * sec_simple_fd_to_mbuf(const struct qbman_fd *fd) { @@ -1598,7 +1588,6 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd) return op; } -#endif static inline struct rte_crypto_op * sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) @@ -1607,10 +1596,9 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) struct rte_crypto_op *op; struct rte_mbuf *dst, *src; -#ifdef RTE_LIB_SECURITY if (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single) return sec_simple_fd_to_mbuf(fd); -#endif + fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x\n", @@ -1635,7 +1623,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) } else dst = src; -#ifdef RTE_LIB_SECURITY if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { uint16_t len = DPAA2_GET_FD_LEN(fd); dst->pkt_len = len; @@ -1645,7 +1632,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp) } dst->data_len = len; } -#endif + DPAA2_SEC_DP_DEBUG("mbuf %p BMAN buf addr %p," " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d\n", (void *)dst, @@ -2916,7 +2903,6 @@ dpaa2_sec_set_session_parameters(struct rte_crypto_sym_xform *xform, void *sess) return ret; } -#ifdef RTE_LIB_SECURITY static int dpaa2_sec_ipsec_aead_init(struct rte_crypto_aead_xform *aead_xform, dpaa2_sec_session *session, @@ -3739,7 +3725,7 @@ dpaa2_sec_security_session_get_size(void *device __rte_unused) { return sizeof(dpaa2_sec_session); } -#endif + static int dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev __rte_unused, struct rte_crypto_sym_xform *xform, @@ -4180,7 +4166,6 @@ static struct rte_cryptodev_ops crypto_ops = { .sym_configure_raw_dp_ctx = dpaa2_sec_configure_raw_dp_ctx, }; -#ifdef RTE_LIB_SECURITY static const struct rte_security_capability * dpaa2_sec_capabilities_get(void *device __rte_unused) { @@ -4196,7 +4181,6 @@ static const struct rte_security_ops dpaa2_sec_security_ops = { .set_pkt_metadata = NULL, .capabilities_get = dpaa2_sec_capabilities_get }; -#endif static int dpaa2_sec_uninit(const struct rte_cryptodev *dev) @@ -4285,9 +4269,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) struct dpaa2_sec_dev_private *internals; struct rte_device *dev = cryptodev->device; struct rte_dpaa2_device *dpaa2_dev; -#ifdef RTE_LIB_SECURITY struct rte_security_ctx *security_instance; -#endif struct fsl_mc_io *dpseci; uint16_t token; struct dpseci_attr attr; @@ -4324,7 +4306,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) DPAA2_SEC_DEBUG("Device already init by primary process"); return 0; } -#ifdef RTE_LIB_SECURITY + /* Initialize security_ctx only for primary process*/ security_instance = rte_malloc("rte_security_instances_ops", sizeof(struct rte_security_ctx), 0); @@ -4334,7 +4316,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) security_instance->ops = &dpaa2_sec_security_ops; security_instance->sess_cnt = 0; cryptodev->security_ctx = security_instance; -#endif + /*Open the rte device via MC and save the handle for further use*/ dpseci = (struct fsl_mc_io *)rte_calloc(NULL, 1, sizeof(struct fsl_mc_io), 0); diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index 63f4c64aab..f84d2caf43 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -8,9 +8,7 @@ #ifndef _DPAA2_SEC_PMD_PRIVATE_H_ #define _DPAA2_SEC_PMD_PRIVATE_H_ -#ifdef RTE_LIB_SECURITY #include -#endif #define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec /**< NXP DPAA2 - SEC PMD device name */ @@ -152,7 +150,6 @@ struct dpaa2_sec_aead_ctxt { uint8_t auth_cipher_text; /**< Authenticate/cipher ordering */ }; -#ifdef RTE_LIB_SECURITY /* * The structure is to be filled by user for PDCP Protocol */ @@ -168,7 +165,6 @@ struct dpaa2_pdcp_ctxt { uint32_t hfn; /*!< Hyper Frame Number */ uint32_t hfn_threshold; /*!< HFN Threashold for key renegotiation */ }; -#endif typedef int (*dpaa2_sec_build_fd_t)( void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec, @@ -225,9 +221,7 @@ typedef struct dpaa2_sec_session_entry { struct dpaa2_sec_aead_ctxt aead_ctxt; } ext_params; }; -#ifdef RTE_LIB_SECURITY struct dpaa2_pdcp_ctxt pdcp; -#endif }; } dpaa2_sec_session; @@ -732,8 +726,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; -#ifdef RTE_LIB_SECURITY - static const struct rte_cryptodev_capabilities dpaa2_pdcp_capabilities[] = { { /* SNOW 3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, @@ -946,7 +938,6 @@ static const struct rte_security_capability dpaa2_sec_security_cap[] = { .action = RTE_SECURITY_ACTION_TYPE_NONE } }; -#endif /** * Checksum * From patchwork Tue Jun 20 07:52:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128827 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA2C742D04; Tue, 20 Jun 2023 09:53:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F5FE42D36; Tue, 20 Jun 2023 09:53:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8ADD242D13 for ; Tue, 20 Jun 2023 09:53:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5ajUYu1Pmg8bNI/6PgaykrLGohcXppaupk8hQoj9xZo=; b=DlR0jpcdar42qycgXSJ20fY7AAPnv0pw4eJPddJo6lWLtAVrplHlqX2f3GAI7/ldIqEjaU 09R4blV/vUXJUlim1zMpPGauHUwp+H/X4mzXTWnFuXtat2GkBnSEVr/jvdxP1rxowPm502 tPIy83AVlnrIRGsjxZaXuG0YXWTfVPA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-266-Vuh-WKxkNYuDPAT1p0_AVQ-1; Tue, 20 Jun 2023 03:53:04 -0400 X-MC-Unique: Vuh-WKxkNYuDPAT1p0_AVQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 655BC185A78F; Tue, 20 Jun 2023 07:53:04 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9E19200A398; Tue, 20 Jun 2023 07:53:02 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin Subject: [PATCH v2 4/6] crypto/dpaa_sec: remove security lib presence checks Date: Tue, 20 Jun 2023 09:52:49 +0200 Message-ID: <20230620075251.103491-5-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since security library is a required dependency for building DPAA crypto PMD, remove useless #ifdefs around rte_security APIs calls. Acked-by: Hemant Agrawal Signed-off-by: Maxime Coquelin --- drivers/crypto/dpaa_sec/dpaa_sec.c | 26 ++--------------------- drivers/crypto/dpaa_sec/dpaa_sec.h | 9 +------- drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 6 ------ 3 files changed, 3 insertions(+), 38 deletions(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index db52683847..7d47c32693 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -15,9 +15,7 @@ #include #include #include -#ifdef RTE_LIB_SECURITY #include -#endif #include #include #include @@ -237,7 +235,6 @@ static inline int is_decode(dpaa_sec_session *ses) return ses->dir == DIR_DEC; } -#ifdef RTE_LIB_SECURITY static int dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses) { @@ -441,7 +438,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses) } return shared_desc_len; } -#endif + /* prepare command block of the session */ static int dpaa_sec_prep_cdb(dpaa_sec_session *ses) @@ -459,14 +456,12 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) memset(cdb, 0, sizeof(struct sec_cdb)); switch (ses->ctxt) { -#ifdef RTE_LIB_SECURITY case DPAA_SEC_IPSEC: shared_desc_len = dpaa_sec_prep_ipsec_cdb(ses); break; case DPAA_SEC_PDCP: shared_desc_len = dpaa_sec_prep_pdcp_cdb(ses); break; -#endif case DPAA_SEC_CIPHER: alginfo_c.key = (size_t)ses->cipher_key.data; alginfo_c.keylen = ses->cipher_key.length; @@ -1745,7 +1740,6 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses) return cf; } -#ifdef RTE_LIB_SECURITY static inline struct dpaa_sec_job * build_proto(struct rte_crypto_op *op, dpaa_sec_session *ses) { @@ -1877,7 +1871,6 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) return cf; } -#endif static uint16_t dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, @@ -1924,11 +1917,9 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, case RTE_CRYPTO_OP_WITH_SESSION: ses = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session); break; -#ifdef RTE_LIB_SECURITY case RTE_CRYPTO_OP_SECURITY_SESSION: ses = SECURITY_GET_SESS_PRIV(op->sym->session); break; -#endif default: DPAA_SEC_DP_ERR( "sessionless crypto op not supported"); @@ -1969,12 +1960,10 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, ((op->sym->m_dst == NULL) || rte_pktmbuf_is_contiguous(op->sym->m_dst))) { switch (ses->ctxt) { -#ifdef RTE_LIB_SECURITY case DPAA_SEC_PDCP: case DPAA_SEC_IPSEC: cf = build_proto(op, ses); break; -#endif case DPAA_SEC_AUTH: cf = build_auth_only(op, ses); break; @@ -2003,12 +1992,10 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, } } else { switch (ses->ctxt) { -#ifdef RTE_LIB_SECURITY case DPAA_SEC_PDCP: case DPAA_SEC_IPSEC: cf = build_proto_sg(op, ses); break; -#endif case DPAA_SEC_AUTH: cf = build_auth_only_sg(op, ses); break; @@ -2060,7 +2047,6 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, ((auth_tail_len << 16) | auth_hdr_len); } -#ifdef RTE_LIB_SECURITY /* In case of PDCP, per packet HFN is stored in * mbuf priv after sym_op. */ @@ -2073,7 +2059,6 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, ses->pdcp.hfn_ovd_offset)), ses->pdcp.hfn_ovd); } -#endif } send_pkts: loop = 0; @@ -2715,7 +2700,6 @@ dpaa_sec_sym_session_clear(struct rte_cryptodev *dev, free_session_memory(dev, s); } -#ifdef RTE_LIB_SECURITY static int dpaa_sec_ipsec_aead_init(struct rte_crypto_aead_xform *aead_xform, struct rte_security_ipsec_xform *ipsec_xform, @@ -3296,7 +3280,6 @@ dpaa_sec_security_session_get_size(void *device __rte_unused) return sizeof(dpaa_sec_session); } -#endif static int dpaa_sec_dev_configure(struct rte_cryptodev *dev __rte_unused, struct rte_cryptodev_config *config __rte_unused) @@ -3544,7 +3527,6 @@ static struct rte_cryptodev_ops crypto_ops = { .sym_configure_raw_dp_ctx = dpaa_sec_configure_raw_dp_ctx, }; -#ifdef RTE_LIB_SECURITY static const struct rte_security_capability * dpaa_sec_capabilities_get(void *device __rte_unused) { @@ -3560,7 +3542,7 @@ static const struct rte_security_ops dpaa_sec_security_ops = { .set_pkt_metadata = NULL, .capabilities_get = dpaa_sec_capabilities_get }; -#endif + static int dpaa_sec_uninit(struct rte_cryptodev *dev) { @@ -3620,9 +3602,7 @@ static int dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) { struct dpaa_sec_dev_private *internals; -#ifdef RTE_LIB_SECURITY struct rte_security_ctx *security_instance; -#endif struct dpaa_sec_qp *qp; uint32_t i, flags; int ret; @@ -3683,7 +3663,6 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) DPAA_SEC_WARN("Device already init by primary process"); return 0; } -#ifdef RTE_LIB_SECURITY /* Initialize security_ctx only for primary process*/ security_instance = rte_malloc("rte_security_instances_ops", sizeof(struct rte_security_ctx), 0); @@ -3693,7 +3672,6 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) security_instance->ops = &dpaa_sec_security_ops; security_instance->sess_cnt = 0; cryptodev->security_ctx = security_instance; -#endif rte_spinlock_init(&internals->lock); for (i = 0; i < internals->max_nb_queue_pairs; i++) { /* init qman fq for queue pair */ diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index 8921e3ed89..412a9da942 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -106,7 +106,7 @@ struct sec_cdb { uint32_t sh_desc[DPAA_SEC_MAX_DESC_SIZE]; }; -#ifdef RTE_LIB_SECURITY + /*! * The structure is to be filled by user as a part of * dpaa_sec_proto_ctxt for PDCP Protocol @@ -124,7 +124,6 @@ struct sec_pdcp_ctxt { uint32_t hfn; /*!< Hyper Frame Number */ uint32_t hfn_threshold; /*!< HFN Threashold for key renegotiation */ }; -#endif typedef int (*dpaa_sec_build_fd_t)( void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec, @@ -153,9 +152,7 @@ typedef struct dpaa_sec_session_entry { enum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/ enum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/ enum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/ -#ifdef RTE_LIB_SECURITY enum rte_security_session_protocol proto_alg; /*!< Security Algorithm*/ -#endif dpaa_sec_build_fd_t build_fd; dpaa_sec_build_raw_dp_fd_t build_raw_dp_fd; union { @@ -198,9 +195,7 @@ typedef struct dpaa_sec_session_entry { uint8_t auth_cipher_text; /**< Authenticate/cipher ordering */ }; -#ifdef RTE_LIB_SECURITY struct sec_pdcp_ctxt pdcp; -#endif }; } dpaa_sec_session; @@ -790,7 +785,6 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; -#ifdef RTE_LIB_SECURITY static const struct rte_cryptodev_capabilities dpaa_pdcp_capabilities[] = { { /* SNOW 3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, @@ -1003,7 +997,6 @@ static const struct rte_security_capability dpaa_sec_security_cap[] = { .action = RTE_SECURITY_ACTION_TYPE_NONE } }; -#endif /** * Checksum diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c index b7dd8beab2..ce49c4996f 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c @@ -7,9 +7,7 @@ #include #include #include -#ifdef RTE_LIB_SECURITY #include -#endif /* RTA header files */ #include @@ -645,7 +643,6 @@ build_dpaa_raw_dp_cipher_fd(uint8_t *drv_ctx, return cf; } -#ifdef RTE_LIB_SECURITY static inline struct dpaa_sec_job * build_dpaa_raw_proto_sg(uint8_t *drv_ctx, struct rte_crypto_sgl *sgl, @@ -772,7 +769,6 @@ build_dpaa_raw_proto_sg(uint8_t *drv_ctx, return cf; } -#endif static uint32_t dpaa_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx, @@ -1035,11 +1031,9 @@ dpaa_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id, sess->build_raw_dp_fd = build_dpaa_raw_dp_chain_fd; else if (sess->ctxt == DPAA_SEC_AEAD) sess->build_raw_dp_fd = build_raw_cipher_auth_gcm_sg; -#ifdef RTE_LIB_SECURITY else if (sess->ctxt == DPAA_SEC_IPSEC || sess->ctxt == DPAA_SEC_PDCP) sess->build_raw_dp_fd = build_dpaa_raw_proto_sg; -#endif else return -ENOTSUP; dp_ctx = (struct dpaa_sec_raw_dp_ctx *)raw_dp_ctx->drv_ctx_data; From patchwork Tue Jun 20 07:52:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128828 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBE7E42D04; Tue, 20 Jun 2023 09:53:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5975F42D2C; Tue, 20 Jun 2023 09:53:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7628D42D3C for ; Tue, 20 Jun 2023 09:53:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N5rOi7Q3HudaP0BcIiFioyBXaBSGu7PxnsyP/oDqsPE=; b=RPjKzCzOJrCHYzJzTODhzqy7AjHi1iycbU80oNWLOa5ls1qMRnqbfr0VtaxmtPHGZyWloY 4i207iSWrZKeEPzPva1zeU3uFlmaKhZR7AF78eRHH/NBkWTkoxgeaElDfErAV8peWEPbsx oZ6RbcVoKOsPNEVVvzdxvgv9V+q7lC8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-fhdW2rtrMWCU-MJ9qzqMxQ-1; Tue, 20 Jun 2023 03:53:06 -0400 X-MC-Unique: fhdW2rtrMWCU-MJ9qzqMxQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 578C73802AE7; Tue, 20 Jun 2023 07:53:06 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACFE5200A398; Tue, 20 Jun 2023 07:53:04 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin Subject: [PATCH v2 5/6] crypto/ipsec_mb: remove security lib presence checks Date: Tue, 20 Jun 2023 09:52:50 +0200 Message-ID: <20230620075251.103491-6-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since security library is a required dependency for building ipsec_mb crypto PMD, remove useless check before security lib headers inclusion. The patch also takes the opportunity to remove unused related defines. Signed-off-by: Maxime Coquelin --- drivers/crypto/ipsec_mb/ipsec_mb_private.h | 3 --- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 4 ---- 2 files changed, 7 deletions(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h index ab27214f2c..52722f94a0 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h +++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h @@ -13,11 +13,8 @@ #include #include -#if defined(RTE_LIB_SECURITY) -#define IPSEC_MB_DOCSIS_SEC_ENABLED 1 #include #include -#endif /* Maximum length for digest */ #define DIGEST_LENGTH_MAX 64 diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h index 9b7c9edb6d..4ffbe4b282 100644 --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h @@ -5,12 +5,10 @@ #ifndef _PMD_AESNI_MB_PRIV_H_ #define _PMD_AESNI_MB_PRIV_H_ -#if defined(RTE_LIB_SECURITY) #define AESNI_MB_DOCSIS_SEC_ENABLED 1 #include #include #include -#endif #include "ipsec_mb_private.h" @@ -950,7 +948,6 @@ typedef void (*hash_one_block_t)(const void *data, void *digest); typedef void (*aes_keyexp_t)(const void *key, void *enc_exp_keys, void *dec_exp_keys); -#ifdef AESNI_MB_DOCSIS_SEC_ENABLED static const struct rte_cryptodev_capabilities aesni_mb_pmd_security_crypto_cap[] = { { /* AES DOCSIS BPI */ @@ -998,6 +995,5 @@ static const struct rte_security_capability aesni_mb_pmd_security_cap[] = { .action = RTE_SECURITY_ACTION_TYPE_NONE } }; -#endif #endif /* _PMD_AESNI_MB_PRIV_H_ */ From patchwork Tue Jun 20 07:52:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128829 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8082742D04; Tue, 20 Jun 2023 09:53:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 719E842D29; Tue, 20 Jun 2023 09:53:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A5B2F42D3E for ; Tue, 20 Jun 2023 09:53:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687247592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sm6MD10oGuNDqvxv5oTnOKFhqCN8Wk1EKG2mBJenXXo=; b=W83eB067vSQ1uI/Z4dPcDAwsS//NiPV5ZSMeaMBNePH4eb70ihXh68tKE+0hxTHIcur1yF QbdL8bBBoGAEDXWH9B155zk9EbxURhbiK4YHWPns6bZrjgrLN9AuN2f+/Nf8FETab70cVF J56m1X1Vplk4I3+qght8FevArP5d2Q4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-448-anxApT7GP627i5e8u8jccQ-1; Tue, 20 Jun 2023 03:53:08 -0400 X-MC-Unique: anxApT7GP627i5e8u8jccQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 469AB811E9E; Tue, 20 Jun 2023 07:53:08 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D231207B2BC; Tue, 20 Jun 2023 07:53:06 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, kai.ji@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com, fanzhang.oss@gmail.com, roretzla@linux.microsoft.com Cc: Maxime Coquelin Subject: [PATCH v2 6/6] crypto/qat: remove useless log level checks Date: Tue, 20 Jun 2023 09:52:51 +0200 Message-ID: <20230620075251.103491-7-maxime.coquelin@redhat.com> In-Reply-To: <20230620075251.103491-1-maxime.coquelin@redhat.com> References: <20230620075251.103491-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org qat_sym_debug_log_dump() being stubbed if log level is less than debug, it is not necessary to check the log level before calling it. Acked-by: Fan Zhang Signed-off-by: Maxime Coquelin --- drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 9 +------ drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 7 +---- drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 27 +++----------------- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c index 93b1327e22..57f247be28 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c @@ -389,10 +389,8 @@ qat_sym_build_op_aead_gen3(void *in_op, struct qat_sym_session *ctx, enqueue_one_aead_job_gen3(ctx, req, &cipher_iv, &digest, &aad, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, &cipher_iv, NULL, &aad, &digest); -#endif return 0; } @@ -435,10 +433,8 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx, enqueue_one_auth_job_gen3(ctx, cookie, req, &digest, &auth_iv, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, NULL, &auth_iv, NULL, &digest); -#endif return 0; } @@ -525,10 +521,9 @@ qat_sym_dp_enqueue_single_aead_gen3(void *qp_data, uint8_t *drv_ctx, dp_ctx->tail = tail; dp_ctx->cached_enqueue++; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, iv, NULL, aad, digest); -#endif + return 0; } @@ -584,11 +579,9 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, &vec->iv[i], NULL, &vec->aad[i], &vec->digest[i]); -#endif } if (unlikely(i < n)) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c index ab87ac2461..8da3e760f4 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c @@ -215,10 +215,8 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx, enqueue_one_aead_job_gen4(ctx, qat_req, &cipher_iv, &digest, &aad, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(qat_req, ctx, in_sgl.vec, in_sgl.num, &cipher_iv, NULL, &aad, &digest); -#endif return 0; } @@ -303,10 +301,9 @@ qat_sym_dp_enqueue_single_aead_gen4(void *qp_data, uint8_t *drv_ctx, dp_ctx->tail = tail; dp_ctx->cached_enqueue++; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, iv, NULL, aad, digest); -#endif + return 0; } @@ -362,11 +359,9 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx, tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, &vec->iv[i], NULL, &vec->aad[i], &vec->digest[i]); -#endif } if (unlikely(i < n)) diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c index db463b71e0..d44c155be5 100644 --- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c +++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c @@ -242,10 +242,8 @@ qat_sym_build_op_cipher_gen1(void *in_op, struct qat_sym_session *ctx, enqueue_one_cipher_job_gen1(ctx, req, &cipher_iv, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, &cipher_iv, NULL, NULL, NULL); -#endif return 0; } @@ -288,10 +286,8 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx, enqueue_one_auth_job_gen1(ctx, req, &digest, &auth_iv, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, NULL, &auth_iv, NULL, &digest); -#endif return 0; } @@ -335,10 +331,8 @@ qat_sym_build_op_aead_gen1(void *in_op, struct qat_sym_session *ctx, enqueue_one_aead_job_gen1(ctx, req, &cipher_iv, &digest, &aad, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, &cipher_iv, NULL, &aad, &digest); -#endif return 0; } @@ -383,10 +377,8 @@ qat_sym_build_op_chain_gen1(void *in_op, struct qat_sym_session *ctx, out_sgl.vec, out_sgl.num, &cipher_iv, &digest, &auth_iv, ofs, total_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, in_sgl.vec, in_sgl.num, &cipher_iv, &auth_iv, NULL, &digest); -#endif return 0; } @@ -509,10 +501,8 @@ qat_sym_dp_enqueue_single_cipher_gen1(void *qp_data, uint8_t *drv_ctx, enqueue_one_cipher_job_gen1(ctx, req, iv, ofs, (uint32_t)data_len); -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, iv, NULL, NULL, NULL); -#endif dp_ctx->tail = tail; dp_ctx->cached_enqueue++; @@ -569,11 +559,9 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx, (uint32_t)data_len); tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, &vec->iv[i], NULL, NULL, NULL); -#endif } if (unlikely(i < n)) @@ -621,10 +609,9 @@ qat_sym_dp_enqueue_single_auth_gen1(void *qp_data, uint8_t *drv_ctx, dp_ctx->tail = tail; dp_ctx->cached_enqueue++; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, NULL, auth_iv, NULL, digest); -#endif + return 0; } @@ -677,11 +664,9 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx, &vec->auth_iv[i], ofs, (uint32_t)data_len); tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, NULL, &vec->auth_iv[i], NULL, &vec->digest[i]); -#endif } if (unlikely(i < n)) @@ -731,10 +716,9 @@ qat_sym_dp_enqueue_single_chain_gen1(void *qp_data, uint8_t *drv_ctx, dp_ctx->cached_enqueue++; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, cipher_iv, auth_iv, NULL, digest); -#endif + return 0; } @@ -793,12 +777,10 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx, tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, &vec->iv[i], &vec->auth_iv[i], NULL, &vec->digest[i]); -#endif } if (unlikely(i < n)) @@ -846,10 +828,9 @@ qat_sym_dp_enqueue_single_aead_gen1(void *qp_data, uint8_t *drv_ctx, dp_ctx->tail = tail; dp_ctx->cached_enqueue++; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, data, n_data_vecs, iv, NULL, aad, digest); -#endif + return 0; } @@ -905,11 +886,9 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx, tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; -#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG qat_sym_debug_log_dump(req, ctx, vec->src_sgl[i].vec, vec->src_sgl[i].num, &vec->iv[i], NULL, &vec->aad[i], &vec->digest[i]); -#endif } if (unlikely(i < n))