DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
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 <maxime.coquelin@redhat.com>
Subject: [PATCH 6/6] crypto/qat: remove useless log level checks
Date: Fri,  9 Jun 2023 15:54:50 +0200	[thread overview]
Message-ID: <20230609135450.476983-7-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20230609135450.476983-1-maxime.coquelin@redhat.com>

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 <maxime.coquelin@redhat.com>
---
 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


  parent reply	other threads:[~2023-06-09 13:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 13:54 [PATCH 0/6] Trivial crypto PMDs cleanup Maxime Coquelin
2023-06-09 13:54 ` [PATCH 1/6] crypto/qat: fix sym device prototype Maxime Coquelin
2023-06-09 14:03   ` Zhang, Fan
2023-06-09 15:40     ` Tyler Retzlaff
2023-06-09 13:54 ` [PATCH 2/6] crypto/qat: remove security lib presence checks Maxime Coquelin
2023-06-09 13:54 ` [PATCH 3/6] crypto/dpaa2_sec: " Maxime Coquelin
2023-06-09 15:04   ` Hemant Agrawal
2023-06-09 13:54 ` [PATCH 4/6] crypto/dpaa_sec: " Maxime Coquelin
2023-06-09 15:05   ` Hemant Agrawal
2023-06-09 13:54 ` [PATCH 5/6] crypto/ipsec_mb: " Maxime Coquelin
2023-06-09 13:54 ` Maxime Coquelin [this message]
2023-06-09 14:02   ` [PATCH 6/6] crypto/qat: remove useless log level checks Zhang, Fan
2023-06-14 18:17 ` [EXT] [PATCH 0/6] Trivial crypto PMDs cleanup Akhil Goyal
2023-06-20  6:49   ` Akhil Goyal
2023-06-20  7:54     ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609135450.476983-7-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=g.singh@nxp.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).