From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id F04EE1E2CF for ; Thu, 14 Jun 2018 13:03:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2018 04:03:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,222,1526367600"; d="scan'208";a="66939740" Received: from tjozwiax-mobl.ger.corp.intel.com (HELO tojo-VirtualBox.MobicaPL.local) ([10.103.104.42]) by orsmga002.jf.intel.com with ESMTP; 14 Jun 2018 04:03:14 -0700 From: Tomasz Jozwiak To: fiona.trahe@intel.com, tomaszx.jozwiak@intel.com, dev@dpdk.org Date: Thu, 14 Jun 2018 13:03:02 +0200 Message-Id: <1528974186-13370-2-git-send-email-tomaszx.jozwiak@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528974186-13370-1-git-send-email-tomaszx.jozwiak@intel.com> References: <1526038308-12043-1-git-send-email-fiona.trahe@intel.com> <1528974186-13370-1-git-send-email-tomaszx.jozwiak@intel.com> Subject: [dpdk-dev] [PATCH v2 1/5] crypto/qat: cleanup unused and useless trace 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: , X-List-Received-Date: Thu, 14 Jun 2018 11:03:16 -0000 Removed INIT_FUNC trace and other unused macros. Signed-off-by: Tomasz Jozwiak Signed-off-by: Fiona Trahe --- config/common_base | 1 - drivers/crypto/qat/qat_logs.h | 31 ------------------------------- drivers/crypto/qat/qat_qp.c | 11 +---------- drivers/crypto/qat/qat_sym_pmd.c | 7 +------ drivers/crypto/qat/qat_sym_session.c | 9 --------- 5 files changed, 2 insertions(+), 57 deletions(-) diff --git a/config/common_base b/config/common_base index f03f9c3..0e6f2fb 100644 --- a/config/common_base +++ b/config/common_base @@ -486,7 +486,6 @@ CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048 # Compile PMD for QuickAssist based devices # CONFIG_RTE_LIBRTE_PMD_QAT=n -CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n diff --git a/drivers/crypto/qat/qat_logs.h b/drivers/crypto/qat/qat_logs.h index c9144bf..e6f8a01 100644 --- a/drivers/crypto/qat/qat_logs.h +++ b/drivers/crypto/qat/qat_logs.h @@ -5,37 +5,6 @@ #ifndef _QAT_LOGS_H_ #define _QAT_LOGS_H_ -#define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) - -#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_INIT -#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -#else -#define PMD_INIT_FUNC_TRACE() do { } while (0) -#endif - -#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_RX -#define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_RX_LOG(level, fmt, args...) do { } while (0) -#endif - -#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX -#define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_LOG(level, fmt, args...) do { } while (0) -#endif - -#ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX_FREE -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0) -#endif - #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER #define PMD_DRV_LOG_RAW(level, fmt, args...) \ RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c index f9d3762..531752b 100644 --- a/drivers/crypto/qat/qat_qp.c +++ b/drivers/crypto/qat/qat_qp.c @@ -120,7 +120,6 @@ queue_dma_zone_reserve(const char *queue_name, uint32_t queue_size, { const struct rte_memzone *mz; - PMD_INIT_FUNC_TRACE(); mz = rte_memzone_lookup(queue_name); if (mz != 0) { if (((size_t)queue_size <= mz->len) && @@ -194,7 +193,7 @@ int qat_qp_setup(struct qat_pci_device *qat_dev, if (qat_queue_create(qat_dev, &(qp->tx_q), qat_qp_conf, ADF_RING_DIR_TX) != 0) { - PMD_INIT_LOG(ERR, "Tx queue create failed " + PMD_DRV_LOG(ERR, "Tx queue create failed " "queue_pair_id=%u", queue_pair_id); goto create_err; } @@ -261,7 +260,6 @@ int qat_qp_release(struct qat_qp **qp_addr) struct qat_qp *qp = *qp_addr; uint32_t i; - PMD_INIT_FUNC_TRACE(); if (qp == NULL) { PMD_DRV_LOG(DEBUG, "qp already freed"); return 0; @@ -418,7 +416,6 @@ qat_queue_create(struct qat_pci_device *qat_dev, struct qat_queue *queue, static int qat_qp_check_queue_alignment(uint64_t phys_addr, uint32_t queue_size_bytes) { - PMD_INIT_FUNC_TRACE(); if (((queue_size_bytes - 1) & phys_addr) != 0) return -EINVAL; return 0; @@ -429,7 +426,6 @@ static int adf_verify_queue_size(uint32_t msg_size, uint32_t msg_num, { uint8_t i = ADF_MIN_RING_SIZE; - PMD_INIT_FUNC_TRACE(); for (; i <= ADF_MAX_RING_SIZE; i++) if ((msg_size * msg_num) == (uint32_t)ADF_SIZE_TO_RING_SIZE_IN_BYTES(i)) { @@ -448,8 +444,6 @@ static void adf_queue_arb_enable(struct qat_queue *txq, void *base_addr, txq->hw_bundle_number); uint32_t value; - PMD_INIT_FUNC_TRACE(); - rte_spinlock_lock(lock); value = ADF_CSR_RD(base_addr, arb_csr_offset); value |= (0x01 << txq->hw_queue_number); @@ -465,8 +459,6 @@ static void adf_queue_arb_disable(struct qat_queue *txq, void *base_addr, txq->hw_bundle_number); uint32_t value; - PMD_INIT_FUNC_TRACE(); - rte_spinlock_lock(lock); value = ADF_CSR_RD(base_addr, arb_csr_offset); value &= ~(0x01 << txq->hw_queue_number); @@ -479,7 +471,6 @@ static void adf_configure_queues(struct qat_qp *qp) uint32_t queue_config; struct qat_queue *queue = &qp->tx_q; - PMD_INIT_FUNC_TRACE(); queue_config = BUILD_RING_CONFIG(queue->queue_size); WRITE_CSR_RING_CONFIG(qp->mmap_bar_addr, queue->hw_bundle_number, diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c index c94a8a1..8797c0e 100644 --- a/drivers/crypto/qat/qat_sym_pmd.c +++ b/drivers/crypto/qat/qat_sym_pmd.c @@ -33,27 +33,23 @@ static int qat_sym_qp_release(struct rte_cryptodev *dev, static int qat_sym_dev_config(__rte_unused struct rte_cryptodev *dev, __rte_unused struct rte_cryptodev_config *config) { - PMD_INIT_FUNC_TRACE(); return 0; } static int qat_sym_dev_start(__rte_unused struct rte_cryptodev *dev) { - PMD_INIT_FUNC_TRACE(); return 0; } static void qat_sym_dev_stop(__rte_unused struct rte_cryptodev *dev) { - PMD_INIT_FUNC_TRACE(); + return; } static int qat_sym_dev_close(struct rte_cryptodev *dev) { int i, ret; - PMD_INIT_FUNC_TRACE(); - for (i = 0; i < dev->data->nb_queue_pairs; i++) { ret = qat_sym_qp_release(dev, i); if (ret < 0) @@ -71,7 +67,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev, qat_gen_config[internals->qat_dev->qat_dev_gen] .qp_hw_data[QAT_SERVICE_SYMMETRIC]; - PMD_INIT_FUNC_TRACE(); if (info != NULL) { info->max_nb_queue_pairs = qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC); diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 689596d..83d0fb1 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -111,7 +111,6 @@ void qat_sym_session_clear(struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess) { - PMD_INIT_FUNC_TRACE(); uint8_t index = dev->driver_id; void *sess_priv = get_session_private_data(sess, index); struct qat_sym_session *s = (struct qat_sym_session *)sess_priv; @@ -411,8 +410,6 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev, int ret; int qat_cmd_id; - PMD_INIT_FUNC_TRACE(); - /* Set context descriptor physical address */ session->cd_paddr = rte_mempool_virt2iova(session) + offsetof(struct qat_sym_session, cd); @@ -936,7 +933,6 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg, uint64_t *hash_state_out_be64; int i; - PMD_INIT_FUNC_TRACE(); digest_size = qat_hash_get_digest_size(hash_alg); if (digest_size <= 0) return -EFAULT; @@ -1006,7 +1002,6 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, uint8_t opad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)]; int i; - PMD_INIT_FUNC_TRACE(); if (hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC) { static uint8_t qat_aes_xcbc_key_seed[ ICP_QAT_HW_AES_XCBC_MAC_STATE2_SZ] = { @@ -1129,7 +1124,6 @@ static void qat_sym_session_init_common_hdr(struct icp_qat_fw_comn_req_hdr *header, enum qat_sym_proto_flag proto_flags) { - PMD_INIT_FUNC_TRACE(); header->hdr_flags = ICP_QAT_FW_COMN_HDR_FLAGS_BUILD(ICP_QAT_FW_COMN_REQ_FLAG_SET); header->service_type = ICP_QAT_FW_COMN_REQ_CPM_FW_LA; @@ -1212,7 +1206,6 @@ int qat_sym_session_aead_create_cd_cipher(struct qat_sym_session *cdesc, uint16_t cipher_offset, cd_size; uint32_t wordIndex = 0; uint32_t *temp_key = NULL; - PMD_INIT_FUNC_TRACE(); if (cdesc->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER) { cd_pars->u.s.content_desc_addr = cdesc->cd_paddr; @@ -1369,8 +1362,6 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, enum qat_sym_proto_flag qat_proto_flag = QAT_CRYPTO_PROTO_FLAG_NONE; - PMD_INIT_FUNC_TRACE(); - if (cdesc->qat_cmd == ICP_QAT_FW_LA_CMD_AUTH) { ICP_QAT_FW_COMN_CURR_ID_SET(hash_cd_ctrl, ICP_QAT_FW_SLICE_AUTH); -- 2.7.4