DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com
Subject: [dpdk-dev] [PATCH] crypto/dpaa2_sec: improve debug logging
Date: Mon, 30 Sep 2019 17:24:52 +0530	[thread overview]
Message-ID: <20190930115452.5178-4-akhil.goyal@nxp.com> (raw)
In-Reply-To: <20190930115452.5178-1-akhil.goyal@nxp.com>

From: Hemant Agrawal <hemant.agrawal@nxp.com>

unnecessary debug logs in data path are removed
and hardware debug logs are compiled off.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 41 ++++++++-------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 4c93f61ff..72ab02fe3 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -305,8 +305,6 @@ build_authenc_gcm_sg_fd(dpaa2_sec_session *sess,
 	uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
 
-	PMD_INIT_FUNC_TRACE();
-
 	if (sym_op->m_dst)
 		mbuf = sym_op->m_dst;
 	else
@@ -453,8 +451,6 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess,
 	uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
 
-	PMD_INIT_FUNC_TRACE();
-
 	if (sym_op->m_dst)
 		dst = sym_op->m_dst;
 	else
@@ -602,8 +598,6 @@ build_authenc_sg_fd(dpaa2_sec_session *sess,
 	uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
 
-	PMD_INIT_FUNC_TRACE();
-
 	if (sym_op->m_dst)
 		mbuf = sym_op->m_dst;
 	else
@@ -748,8 +742,6 @@ build_authenc_fd(dpaa2_sec_session *sess,
 			sess->iv.offset);
 	struct rte_mbuf *dst;
 
-	PMD_INIT_FUNC_TRACE();
-
 	if (sym_op->m_dst)
 		dst = sym_op->m_dst;
 	else
@@ -887,8 +879,6 @@ static inline int build_auth_sg_fd(
 	uint8_t *old_digest;
 	struct rte_mbuf *mbuf;
 
-	PMD_INIT_FUNC_TRACE();
-
 	data_len = sym_op->auth.data.length;
 	data_offset = sym_op->auth.data.offset;
 
@@ -1006,8 +996,6 @@ build_auth_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
 	uint8_t *old_digest;
 	int retval;
 
-	PMD_INIT_FUNC_TRACE();
-
 	data_len = sym_op->auth.data.length;
 	data_offset = sym_op->auth.data.offset;
 
@@ -1123,8 +1111,6 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
 	uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
 
-	PMD_INIT_FUNC_TRACE();
-
 	data_len = sym_op->cipher.data.length;
 	data_offset = sym_op->cipher.data.offset;
 
@@ -1258,8 +1244,6 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
 			sess->iv.offset);
 	struct rte_mbuf *dst;
 
-	PMD_INIT_FUNC_TRACE();
-
 	data_len = sym_op->cipher.data.length;
 	data_offset = sym_op->cipher.data.offset;
 
@@ -1371,8 +1355,6 @@ build_sec_fd(struct rte_crypto_op *op,
 	int ret = -1;
 	dpaa2_sec_session *sess;
 
-	PMD_INIT_FUNC_TRACE();
-
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
 		sess = (dpaa2_sec_session *)get_sym_session_private_data(
 				op->sym->session, cryptodev_driver_id);
@@ -1821,7 +1803,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
 {
 	struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private;
 	struct alginfo cipherdata;
-	int bufsize, i;
+	int bufsize;
 	struct ctxt_priv *priv;
 	struct sec_flow_context *flc;
 
@@ -1937,9 +1919,11 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
 	flc->word1_sdl = (uint8_t)bufsize;
 	session->ctxt = priv;
 
+#ifdef CAAM_DESC_DEBUG
+	int i;
 	for (i = 0; i < bufsize; i++)
 		DPAA2_SEC_DEBUG("DESC[%d]:0x%x", i, priv->flc_desc[0].desc[i]);
-
+#endif
 	return 0;
 
 error_out:
@@ -1955,7 +1939,7 @@ dpaa2_sec_auth_init(struct rte_cryptodev *dev,
 {
 	struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private;
 	struct alginfo authdata;
-	int bufsize, i;
+	int bufsize;
 	struct ctxt_priv *priv;
 	struct sec_flow_context *flc;
 
@@ -2099,10 +2083,12 @@ dpaa2_sec_auth_init(struct rte_cryptodev *dev,
 
 	flc->word1_sdl = (uint8_t)bufsize;
 	session->ctxt = priv;
+#ifdef CAAM_DESC_DEBUG
+	int i;
 	for (i = 0; i < bufsize; i++)
 		DPAA2_SEC_DEBUG("DESC[%d]:0x%x",
 				i, priv->flc_desc[DESC_INITFINAL].desc[i]);
-
+#endif
 
 	return 0;
 
@@ -2120,7 +2106,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
 	struct dpaa2_sec_aead_ctxt *ctxt = &session->ext_params.aead_ctxt;
 	struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private;
 	struct alginfo aeaddata;
-	int bufsize, i;
+	int bufsize;
 	struct ctxt_priv *priv;
 	struct sec_flow_context *flc;
 	struct rte_crypto_aead_xform *aead_xform = &xform->aead;
@@ -2218,10 +2204,12 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
 
 	flc->word1_sdl = (uint8_t)bufsize;
 	session->ctxt = priv;
+#ifdef CAAM_DESC_DEBUG
+	int i;
 	for (i = 0; i < bufsize; i++)
 		DPAA2_SEC_DEBUG("DESC[%d]:0x%x\n",
 			    i, priv->flc_desc[0].desc[i]);
-
+#endif
 	return 0;
 
 error_out:
@@ -2239,7 +2227,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
 	struct dpaa2_sec_aead_ctxt *ctxt = &session->ext_params.aead_ctxt;
 	struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private;
 	struct alginfo authdata, cipherdata;
-	int bufsize, i;
+	int bufsize;
 	struct ctxt_priv *priv;
 	struct sec_flow_context *flc;
 	struct rte_crypto_cipher_xform *cipher_xform;
@@ -2444,9 +2432,12 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
 
 	flc->word1_sdl = (uint8_t)bufsize;
 	session->ctxt = priv;
+#ifdef CAAM_DESC_DEBUG
+	int i;
 	for (i = 0; i < bufsize; i++)
 		DPAA2_SEC_DEBUG("DESC[%d]:0x%x",
 			    i, priv->flc_desc[0].desc[i]);
+#endif
 
 	return 0;
 
-- 
2.17.1


      parent reply	other threads:[~2019-09-30 12:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 11:54 [dpdk-dev] [PATCH] crypto/dpaa2_sec: allocate context as per num segs Akhil Goyal
2019-09-30 11:54 ` [dpdk-dev] [PATCH] crypto/dpaa_sec: dynamic contxt buffer for SG cases Akhil Goyal
2019-09-30 11:54 ` [dpdk-dev] [PATCH] crypto/dpaa_sec: change per cryptodev pool to per qp Akhil Goyal
2019-09-30 11:54 ` Akhil Goyal [this message]

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=20190930115452.5178-4-akhil.goyal@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.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).