From patchwork Fri Jun 9 13:54:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 128466 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 6F1F842C6E; Fri, 9 Jun 2023 15:55:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1198442DC8; Fri, 9 Jun 2023 15:55:06 +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 D28D940EDB for ; Fri, 9 Jun 2023 15:55:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318902; 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=ya68TtQHE84yVxK9qV39Djef++2GCj8tpY5IpkmNbrU=; b=YIpOxVq5nXoPuPvAgs2zGij3LyAWq4LlaVxDHhAmD06v7e2+f3tbE0o9z3xu/AHZ7uIARy IT/NeREm2+qe28YzMfqzesMERYviw9YvjTKC56PiHojZnWTfjkHikE+ILX4A1zXLH7V2Nu Mm4Qx7zHd6Wk7aZNWVRtiteTW/JodvU= 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-494-m6zvEUHLNc-PolfVeoSbRA-1; Fri, 09 Jun 2023 09:55:00 -0400 X-MC-Unique: m6zvEUHLNc-PolfVeoSbRA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 548F5801182; Fri, 9 Jun 2023 13:55:00 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB12B140E956; Fri, 9 Jun 2023 13:54: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 Cc: Maxime Coquelin , stable@dpdk.org Subject: [PATCH 1/6] crypto/qat: fix sym device prototype Date: Fri, 9 Jun 2023 15:54:45 +0200 Message-Id: <20230609135450.476983-2-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 Signed-off-by: Maxime Coquelin Acked-by: Fan Zhang Acked-by: Tyler Retzlaff --- 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 08e92191a3..2450f042c8 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 Fri Jun 9 13:54: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: 128467 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 63B9B42C6E; Fri, 9 Jun 2023 15:55:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35DDF42DC6; Fri, 9 Jun 2023 15:55:08 +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 86CC040A84 for ; Fri, 9 Jun 2023 15:55:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318906; 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=XynGVWx2P9xl/RE8f1jugHUoQPxprrhled3u5VYjFRI=; b=IdhnsSHh3mf82PSuDPbBWiRe0mbGjy2lngQAxGnmd/aUNsvcSBs5nZtaJuZD26aVLaJIrC H99Ac2uyymHZTE5lFpq8+Bc2YleaR/L6Ms1Mv3BCi148CvB+Mi14TJLD0vhUrQ4XVMTSu1 LiCfb+0IA0d1Hs4N/O3jZuDi7g0v5Wc= 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-554-Gw9JE9adMp2wMu1fkcVHLA-1; Fri, 09 Jun 2023 09:55:02 -0400 X-MC-Unique: Gw9JE9adMp2wMu1fkcVHLA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C6E9803791; Fri, 9 Jun 2023 13:55:02 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id A482E140E956; Fri, 9 Jun 2023 13:55: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 Cc: Maxime Coquelin Subject: [PATCH 2/6] crypto/qat: remove security lib presence checks Date: Fri, 9 Jun 2023 15:54:46 +0200 Message-Id: <20230609135450.476983-3-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 9cbd19a481..82f75124a1 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -599,10 +599,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 60ca0fc0d2..0fcbbc8b56 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 524c291340..942f61c63f 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h @@ -938,11 +938,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 91d5cfa71d..9d9d072991 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, @@ -1248,8 +1243,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 6fe1326c51..14d9870815 100644 --- a/drivers/crypto/qat/qat_crypto.h +++ b/drivers/crypto/qat/qat_crypto.h @@ -61,9 +61,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 2450f042c8..4aea5b217f 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); @@ -302,10 +295,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)); @@ -327,10 +318,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 9a4251e08b..30faf34b38 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" @@ -221,7 +217,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) { @@ -286,7 +281,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, @@ -304,7 +298,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 @@ -312,9 +305,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; } @@ -329,10 +320,8 @@ 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) 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 6ad6c7ee3a..29971686ad 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -25,9 +25,7 @@ #include #include #include -#ifdef RTE_LIB_SECURITY #include -#endif #include "qat_logs.h" #include "qat_sym_session.h" @@ -2597,7 +2595,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) { @@ -2746,4 +2743,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 6322d7e3bc..baf29e5c64 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" @@ -174,7 +172,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); @@ -182,6 +179,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 Fri Jun 9 13:54: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: 128468 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 71E7D42C6E; Fri, 9 Jun 2023 15:55:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C36E042FA0; Fri, 9 Jun 2023 15:55:10 +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 4F00442F86 for ; Fri, 9 Jun 2023 15:55:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318907; 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=MfAgxvOmLtHarZcX8481yEqlgs8MIebAbWTBj1k7OpY=; b=ddudBgavNUXeuZwdP6e4BOCTNcFbwu52uWrU/zzH8YvKR/Bp01QKsJF1BM64AqruqaHsBT hvEHlE/g3lxydz0pd48VzvGgT3itjh7AafiyqGLfuZ5qzafgV0z6zYDsAjTdAti2cwzziL 3K8mF7IPlt0cbsQbGur6TFqQJEGNmsk= 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-576-RAh24QqRPd2dioucr_GfoA-1; Fri, 09 Jun 2023 09:55:04 -0400 X-MC-Unique: RAh24QqRPd2dioucr_GfoA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 106E48007D9; Fri, 9 Jun 2023 13:55:04 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C58B140E956; Fri, 9 Jun 2023 13:55: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 Cc: Maxime Coquelin Subject: [PATCH 3/6] crypto/dpaa2_sec: remove security lib presence checks Date: Fri, 9 Jun 2023 15:54:47 +0200 Message-Id: <20230609135450.476983-4-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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. Signed-off-by: Maxime Coquelin Acked-by: Hemant Agrawal --- 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 Fri Jun 9 13:54: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: 128469 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 E8FB542C6E; Fri, 9 Jun 2023 15:55:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C50C242FAC; Fri, 9 Jun 2023 15:55:12 +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 77D3542FA6 for ; Fri, 9 Jun 2023 15:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318911; 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=CF9U3V3rfGK2ilEVlVe3eLhtgTgpUSoRVYQhIq2iLsQ=; b=XyDxO9w6TZFVhAlnK7V3ptyZaMQ3krmtzdm0FX7YRhaovELxzF1Kjxyr+kl/c39m9HAnDY MF0VyE9/5gb23scWnYebt5oB6e/RqTDE3+3P0ICSA2Z/w/l1aBG00o51nswZaiLbKnZ53e JVM6fmU20izsjUTrrxmutZpIFuCNJ0A= 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-280-Tuz__DEPMrKpy2bBJP__wA-1; Fri, 09 Jun 2023 09:55:06 -0400 X-MC-Unique: Tuz__DEPMrKpy2bBJP__wA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6FED3802147; Fri, 9 Jun 2023 13:55:05 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55865140E956; Fri, 9 Jun 2023 13:55: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 Cc: Maxime Coquelin Subject: [PATCH 4/6] crypto/dpaa_sec: remove security lib presence checks Date: Fri, 9 Jun 2023 15:54:48 +0200 Message-Id: <20230609135450.476983-5-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 iSince security library is a required dependency for building DPAA crypto PMD, remove useless #ifdefs around rte_security APIs calls. Signed-off-by: Maxime Coquelin Acked-by: Hemant Agrawal --- 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 Fri Jun 9 13:54: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: 128470 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 D8A6242C6E; Fri, 9 Jun 2023 15:55:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8A8B42FB0; Fri, 9 Jun 2023 15:55:13 +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 D45AD42F82 for ; Fri, 9 Jun 2023 15:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318911; 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=IHoGVAQ0Hj76WdzqwdMZvv44ZGu5PXPBJ/X94Ekl4+E=; b=OAEd8s6hMY2GMpEydCAyTLSF+UtFVl3y3/g+LMfVND/oWsrDsJ1OQkX7cTZz+rEpb32o7V yPEA+IINBmoi1Rn/Kuws2JxG6EV7+fZK44ZBl/35dloy3995AvE8DntmkxkKmI/39We4On MpBQWa36kbCfpdHWNF/y/JAZsS924t0= 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-606-zm8b9r3_PVSo6fHB45axxg-1; Fri, 09 Jun 2023 09:55:08 -0400 X-MC-Unique: zm8b9r3_PVSo6fHB45axxg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 95CFD811E86; Fri, 9 Jun 2023 13:55:07 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19564140E956; Fri, 9 Jun 2023 13:55:05 +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 Cc: Maxime Coquelin Subject: [PATCH 5/6] crypto/ipsec_mb: remove security lib presence checks Date: Fri, 9 Jun 2023 15:54:49 +0200 Message-Id: <20230609135450.476983-6-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 8a7c74f621..fee02306c1 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" @@ -960,7 +958,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 */ @@ -1008,6 +1005,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 Fri Jun 9 13:54: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: 128471 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 3D53342C6E; Fri, 9 Jun 2023 15:55:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2946642FB8; Fri, 9 Jun 2023 15:55:16 +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 7EB5842F8C for ; Fri, 9 Jun 2023 15:55:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686318912; 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=mhwCscTA8Bi701wJsHdDdQrOaslPXhBNxUZ1O48NukY=; b=GR5Do6HOJ01LdRlY668aoz1e1wanwxWFboIGLeCONMcWica7HowCiaaZCfiSOmKH7wu/oW UlVmsBbxxsgORy7HfSijElYjOXG0gIOWMnkh1zNAoLRlDGB54RNoawpJDcdlsvR8F+TlzR bUTGipogWN2Wq397NJhRgT0NQ+7deuU= 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-68-m_hYCyTbPVSfAz3XTYCCpA-1; Fri, 09 Jun 2023 09:55:09 -0400 X-MC-Unique: m_hYCyTbPVSfAz3XTYCCpA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3CCF71C0692E; Fri, 9 Jun 2023 13:55:09 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4C8C140E956; Fri, 9 Jun 2023 13:55:07 +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 Cc: Maxime Coquelin Subject: [PATCH 6/6] crypto/qat: remove useless log level checks Date: Fri, 9 Jun 2023 15:54:50 +0200 Message-Id: <20230609135450.476983-7-maxime.coquelin@redhat.com> In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com> References: <20230609135450.476983-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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. Signed-off-by: Maxime Coquelin Acked-by: Fan Zhang --- 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 9d9d072991..4ea5304f80 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))