From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 --- 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)) -- 2.40.1