From patchwork Mon Sep 30 11:54:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 174745 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7041866ill; Mon, 30 Sep 2019 05:11:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbfmIYVnfJdywH+7tgR0j3V7Hp1Xok4+l6qrFQiRLgZlzfEn6wJpdXClPjAhDLeahfHidg X-Received: by 2002:a50:ce53:: with SMTP id k19mr19295074edj.2.1569845509384; Mon, 30 Sep 2019 05:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569845509; cv=none; d=google.com; s=arc-20160816; b=IwowKONeOYvCiABPe5mJanZNR7x8JLxsdXuRW8QZfcTLnNse+PDJifvs11X4FU+xOq Q/ihIBM/KuBzhEzra7IecbJAxK9pT7dR60619L77DunFC8XCbd87+Y8M03k5TM5nouiT QrUrYaHF6humTme7fCKf0hZz1r73p9r4ZiiYe9FSB/caIn/zSirc57WppDOPmM0DTIiv buONfWcBNSAiObwKA29j4/wFRTeJQnSgWXkM8wKiE+xXJ00GEDtqjj2Zzr/oF1HKoNwA 8JIdzB7n/hD8yaNtyV2F9MCR745SVVCNEpxX2xMrF/Lj8uiZ0hQSrM2fHltDfmhZET6g L3GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=wq8+klZPv2lhhwoJLtfSewWxyPqcl80QsyK4gFEsk5c=; b=AeSkpQGLkbHoNbA3uZdGG70oVOHyxF4wuztHYC6gQ2dfW/SaJ7Y/pswjwaCUmMWQtl QaFmGTmIwTe71tUU59smNJcYl8PX5EiFQzspXHp3vANqfv+FpXhzY5ekZ8Y0kTFTTPZb 8x9Y69i7AE7+4HJ4vXkgYKhzuvy33HXdJHeEGr+37DWTCTPAxKwEoaGLgKal89InHRDp rHZi6bZrj3zXm/yMXc0LscNg6buMXIxK3Ca7L0wUVrW4ILq/vS3pmm6oWQhxzuFulwvo RUslBWbMtiD6wD0NInfMsVhPvcf0SSLVyJi3Blbflovw5F0hxQlC2Utog6VgO+S8H3wX yIiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id h14si6895348edb.425.2019.09.30.05.11.49; Mon, 30 Sep 2019 05:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 129371BE9D; Mon, 30 Sep 2019 14:10:43 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 76BBB1BE97 for ; Mon, 30 Sep 2019 14:10:08 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 58F041A0858; Mon, 30 Sep 2019 14:10:08 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BCDF01A0852; Mon, 30 Sep 2019 14:10:06 +0200 (CEST) Received: from GDB1.ap.freescale.net (GDB1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3B61340319; Mon, 30 Sep 2019 20:10:02 +0800 (SGT) From: Akhil Goyal To: dev@dpdk.org Cc: hemant.agrawal@nxp.com Date: Mon, 30 Sep 2019 17:24:52 +0530 Message-Id: <20190930115452.5178-4-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190930115452.5178-1-akhil.goyal@nxp.com> References: <20190930115452.5178-1-akhil.goyal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] crypto/dpaa2_sec: improve debug logging X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hemant Agrawal unnecessary debug logs in data path are removed and hardware debug logs are compiled off. Signed-off-by: Hemant Agrawal Acked-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 41 ++++++++------------- 1 file changed, 16 insertions(+), 25 deletions(-) -- 2.17.1 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;