crypto/qat: clean up unused and useless trace

Removed INIT_FUNC trace and other unused macros.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
This commit is contained in:
Tomasz Jozwiak 2018-06-14 13:03:02 +02:00 committed by Pablo de Lara
parent 845bc9b37a
commit dc0349e08f
5 changed files with 2 additions and 57 deletions

View File

@ -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

View File

@ -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)

View File

@ -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,

View File

@ -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);

View File

@ -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);