net/ark: replace compile time log config with runtime
authorEd Czeck <ed.czeck@atomicrules.com>
Tue, 8 Sep 2020 19:20:17 +0000 (15:20 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:08 +0000 (18:55 +0200)
Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
12 files changed:
doc/guides/nics/ark.rst
drivers/net/ark/ark_ddm.c
drivers/net/ark/ark_ethdev.c
drivers/net/ark/ark_ethdev_rx.c
drivers/net/ark/ark_ethdev_tx.c
drivers/net/ark/ark_logs.h
drivers/net/ark/ark_mpu.c
drivers/net/ark/ark_pktchkr.c
drivers/net/ark/ark_pktdir.c
drivers/net/ark/ark_pktgen.c
drivers/net/ark/ark_rqp.c
drivers/net/ark/ark_udm.c

index 06e8c33..c3ffcbb 100644 (file)
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
index 57026f8..91d1179 100644 (file)
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
        uint32_t hw_const;
        if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-               PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+               ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
                            ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
                return -1;
        }
 
        hw_const = ddm->cfg.const0;
        if (hw_const == ARK_DDM_CONST1) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "ARK: DDM module is version 1, "
                            "PMD expects version 2\n");
                return -1;
        } else if (hw_const != ARK_DDM_CONST2) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "ARK: DDM module not found as expected 0x%08x\n",
                            ddm->cfg.const0);
                return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
        status = ark_ddm_stop(ddm, 1);
 
        if (status != 0) {
-               PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+               ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
                              __func__);
                ddm->cfg.command = 4;
                usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-       PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+       ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
                     ark_ddm_is_stopped(ddm)
                     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
        struct ark_ddm_stats_t *stats = &ddm->stats;
 
-       PMD_STATS_LOG(INFO, "DDM Stats: %s"
+       ARK_PMD_LOG(INFO, "DDM Stats: %s"
                      ARK_SU64 ARK_SU64 ARK_SU64
                      "\n", msg,
                      "Bytes:", stats->tx_byte_count,
index b32ccd8..646427d 100644 (file)
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
        const char *dllpath = getenv("ARK_EXT_PATH");
 
        if (dllpath == NULL) {
-               PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+               ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
                return 0;
        }
-       PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+       ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
        /* Open and load the .so */
        ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
        if (ark->d_handle == NULL) {
-               PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+               ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
                            dllpath);
                return -1;
        }
-       PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+       ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
                            dllpath);
 
        /* Get the entry points */
        ark->user_ext.dev_init =
                (void *(*)(struct rte_eth_dev *, void *, int))
                dlsym(ark->d_handle, "dev_init");
-       PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+       ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
                      ark->user_ext.dev_init);
        ark->user_ext.dev_get_port_count =
                (int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
        ark->eth_dev = dev;
 
-       PMD_FUNC_LOG(DEBUG, "\n");
+       ARK_PMD_LOG(DEBUG, "\n");
 
        /* Check to see if there is an extension that we need to load */
        ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
                (struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
        ark->started = 0;
 
-       PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+       ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
                      ark->sysctrl.t32[4],
                      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-       PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+       ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
                    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
        /* If HW sanity test fails, return an error */
        if (ark->sysctrl.t32[4] != 0xcafef00d) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "HW Sanity test has failed, expected constant"
                            " 0x%x, read 0x%x (%s)\n",
                            0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
        }
        if (ark->sysctrl.t32[3] != 0) {
                if (ark_rqp_lasped(ark->rqpacing)) {
-                       PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+                       ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
                                    "Timer has Expired\n");
                        return -1;
                }
-               PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+               ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
                            "Timer is Running\n");
        }
 
-       PMD_DRV_LOG(INFO,
+       ARK_PMD_LOG(DEBUG,
                    "HW Sanity test has PASSED, expected constant"
                    " 0x%x, read 0x%x (%s)\n",
                    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
        dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
        if (!dev->data->mac_addrs) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "Failed to allocated memory for storing mac address"
                            );
        }
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
                ark->user_data[dev->data->port_id] =
                        ark->user_ext.dev_init(dev, ark->a_bar, 0);
                if (!ark->user_data[dev->data->port_id]) {
-                       PMD_DRV_LOG(INFO,
+                       ARK_PMD_LOG(WARNING,
                                    "Failed to initialize PMD extension!"
                                    " continuing without it\n");
                        memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
        if (pci_dev->device.devargs)
                ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
        else
-               PMD_DRV_LOG(INFO, "No Device args found\n");
+               ARK_PMD_LOG(INFO, "No Device args found\n");
 
        if (ret)
                goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
                /* reserve an ethdev entry */
                eth_dev = rte_eth_dev_allocate(name);
                if (!eth_dev) {
-                       PMD_DRV_LOG(ERR,
+                       ARK_PMD_LOG(ERR,
                                    "Could not allocate eth_dev for port %d\n",
                                    p);
                        goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
                eth_dev->data->mac_addrs = rte_zmalloc(name,
                                                RTE_ETHER_ADDR_LEN, 0);
                if (!eth_dev->data->mac_addrs) {
-                       PMD_DRV_LOG(ERR,
+                       ARK_PMD_LOG(ERR,
                                    "Memory allocation for MAC failed!"
                                    " Exiting.\n");
                        goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
        /* UDM */
        if (ark_udm_reset(ark->udm.v)) {
-               PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+               ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
                return -1;
        }
        /* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
        /* TX -- DDM */
        if (ark_ddm_stop(ark->ddm.v, 1))
-               PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+               ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
        mpu = ark->mputx.v;
        num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-       PMD_FUNC_LOG(DEBUG, "\n");
        struct ark_adapter *ark = dev->data->dev_private;
 
        eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
        struct ark_adapter *ark = dev->data->dev_private;
        int i;
 
-       PMD_FUNC_LOG(DEBUG, "\n");
-
        /* RX Side */
        /* start UDM */
        ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
                 * This is only used for sanity checking with internal generator
                 */
                if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-                       PMD_DRV_LOG(ERR, "Could not create pktgen "
+                       ARK_PMD_LOG(ERR, "Could not create pktgen "
                                    "starter thread\n");
                        return -1;
                }
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
        struct ark_adapter *ark = dev->data->dev_private;
        struct ark_mpu_t *mpu;
 
-       PMD_FUNC_LOG(DEBUG, "\n");
-
        if (ark->started == 0)
                return;
        ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
                status = eth_ark_tx_queue_stop(dev, i);
                if (status != 0) {
                        uint16_t port = dev->data->port_id;
-                       PMD_DRV_LOG(ERR,
+                       ARK_PMD_LOG(ERR,
                                    "tx_queue stop anomaly"
                                    " port %u, queue %u\n",
                                    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
                        break;
        }
        if (status || i != 0) {
-               PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+               ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
                            " %d iter: %u. (%s)\n",
                            status,
                            i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
                        break;
        }
        if (status || i != 0) {
-               PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+               ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
                            status, i, __func__);
                ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-       PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+       ARK_PMD_LOG(DEBUG, "link status = %d\n",
                        dev->data->dev_link.link_status);
        struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
                   void *extra_args)
 {
-       PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+       ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
                    key, value);
        struct ark_adapter *ark =
                (struct ark_adapter *)extra_args;
 
        ark->pkt_dir_v = strtol(value, NULL, 16);
-       PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+       ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
        return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-       PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+       ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
                    key, value);
        char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
        int first = 1;
 
        if (file == NULL) {
-               PMD_DRV_LOG(ERR, "Unable to open "
+               ARK_PMD_LOG(ERR, "Unable to open "
                            "config file %s\n", value);
                return -1;
        }
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
        while (fgets(line, sizeof(line), file)) {
                size += strlen(line);
                if (size >= ARK_MAX_ARG_LEN) {
-                       PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+                       ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
                                    "parameter list is too long\n", value);
                        fclose(file);
                        return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
                        strncat(args, line, ARK_MAX_ARG_LEN);
                }
        }
-       PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+       ARK_PMD_LOG(DEBUG, "file = %s\n", args);
        fclose(file);
        return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
        for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
                pair = &kvlist->pairs[k_idx];
-               PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+               ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
                             pair->key,
                             pair->value);
        }
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
                               ARK_PKTDIR_ARG,
                               &process_pktdir_arg,
                               ark) != 0) {
-               PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+               ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
                goto free_kvlist;
        }
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
                               ARK_PKTGEN_ARG,
                               &process_file_args,
                               ark->pkt_gen_args) != 0) {
-               PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+               ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
                goto free_kvlist;
        }
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
                               ARK_PKTCHKR_ARG,
                               &process_file_args,
                               ark->pkt_chkr_args) != 0) {
-               PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+               ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
                goto free_kvlist;
        }
 
-       PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+       ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
        /* Setup the packet director */
        ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
        /* Setup the packet generator */
        if (ark->pkt_gen_args[0]) {
-               PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+               ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
                ark_pktgen_parse(ark->pkt_gen_args);
                ark_pktgen_reset(ark->pg);
                ark_pktgen_setup(ark->pg);
index 4d518d5..2f8d050 100644 (file)
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
        /* Verify HW */
        if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-               PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+               ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
                return -1;
        }
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
        if (rx_conf != NULL && warning1 == 0) {
                warning1 = 1;
-               PMD_DRV_LOG(INFO,
+               ARK_PMD_LOG(NOTICE,
                            "Arkville ignores rte_eth_rxconf argument.\n");
        }
 
        if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
                            ARK_RX_META_SIZE, __func__);
                return -1;              /* ERROR CODE */
        }
 
        if (!rte_is_power_of_2(nb_desc)) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
                            nb_desc, __func__);
                return -1;              /* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
                                   64,
                                   socket_id);
        if (queue == 0) {
-               PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+               ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
                return -ENOMEM;
        }
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
                                   socket_id);
 
        if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "Failed to allocate queue memory in %s\n",
                            __func__);
                rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
        status = eth_ark_rx_seed_mbufs(queue);
 
        if (queue->seed_index != nb_desc) {
-               PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+               ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
                            nb_desc, qidx);
                status = -1;
        }
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
        if (unlikely(status != 0)) {
                struct rte_mbuf **mbuf;
 
-               PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+               ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
                            qidx,
                            __func__);
                /* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
                mbuf->timestamp = meta->timestamp;
                mbuf->udata64 = meta->user_data;
 
-               if (ARK_RX_DEBUG) {     /* debug sanity checks */
+               if (ARK_DEBUG_CORE) {   /* debug sanity checks */
                        if ((meta->pkt_len > (1024 * 16)) ||
                            (meta->pkt_len == 0)) {
-                               PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+                               ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
                                           " cons: %" PRIU32
                                           " prod: %" PRIU32
                                           " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
                                           queue->seed_index);
 
 
-                               PMD_RX_LOG(DEBUG, "       :  UDM"
+                               ARK_PMD_LOG(DEBUG, "       :  UDM"
                                           " prod: %" PRIU32
                                           " len: %u\n",
                                           queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
                mbuf_prev = mbuf;
                mbuf->data_len = data_len;
                mbuf->data_off = 0;
-               if (ARK_RX_DEBUG)
+               if (ARK_DEBUG_CORE)
                        mbuf->seqn = cons_index;        /* for debug only */
 
                cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
                }
        }
 
-       if (ARK_RX_DEBUG) {             /* DEBUG */
+       if (ARK_DEBUG_CORE) {           /* DEBUG */
                while (count != nb) {
                        struct rte_mbuf *mbuf_init =
                                queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
        *pnb = 64U;
        status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
        if (status != 0) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(NOTICE,
                            "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
                            " %u free buffers remaining in queue\n",
                            *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
        if (!ark_udm_is_flushed(ark->udm.v)) {
                /* restart the MPUs */
-               PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+               ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
                for (i = 0; i < dev->data->nb_rx_queues; i++) {
                        queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
                        if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
                /* Wait to allow data to pass */
                usleep(100);
 
-               PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+               ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
                                ark_udm_is_flushed(ark->udm.v));
        }
        ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
        if (queue == NULL)
                return;
-       PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-       PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+       ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+       ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
                        "queue_size", queue->queue_size,
                        "seed_index", queue->seed_index,
                        "prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
        uint16_t i, j;
 
-       PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-               mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+       ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+                   mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
        for (i = lo; i < hi; i += 16) {
                uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-               PMD_DRV_LOG(INFO, "  %6d:  ", i);
+               ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
                for (j = 0; j < 16; j++)
-                       PMD_DRV_LOG(INFO, " %02x", dp[j]);
+                       ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-               PMD_DRV_LOG(INFO, "\n");
+               ARK_PMD_LOG(DEBUG, "\n");
        }
 }
index 2896687..72624de 100644 (file)
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
                }
        }
 
-       if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-               PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+       if (ARK_DEBUG_CORE && nb != nb_pkts) {
+               ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
                           " req: %" PRIU32
                           " sent: %" PRIU32
                           " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
        int qidx = queue_idx;
 
        if (!rte_is_power_of_2(nb_desc)) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "DPDK Arkville configuration queue size"
                            " must be power of two %u (%s)\n",
                            nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
                                   64,
                                   socket_id);
        if (queue == 0) {
-               PMD_DRV_LOG(ERR, "Failed to allocate tx "
+               ARK_PMD_LOG(ERR, "Failed to allocate tx "
                            "queue memory in %s\n",
                            __func__);
                return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
                                   socket_id);
 
        if (queue->meta_q == 0 || queue->bufs == 0) {
-               PMD_DRV_LOG(ERR, "Failed to allocate "
+               ARK_PMD_LOG(ERR, "Failed to allocate "
                            "queue memory in %s\n", __func__);
                rte_free(queue->meta_q);
                rte_free(queue->bufs);
index 44aac61..c3d7e7d 100644 (file)
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)       \
-       rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)       \
+       rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-       PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)                     \
-       do {                                                    \
-               if (0)                                          \
-                       PMD_DRV_LOG(level, fmt, ## args);       \
-       } while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-       PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)                              \
-       do {                                                            \
-               if (0)                                                  \
-                       PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-       } while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
index 21f840f..8160c1d 100644 (file)
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
        if ((mpu->id.idnum != 0x2055504d) ||
            (mpu->hw.obj_size != obj_size) ||
            (version != 0x00003100)) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "   MPU module not found as expected %08x"
                            " \"%c%c%c%c %c%c%c%c\"\n",
                            mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
                            mpu->id.id[2], mpu->id.id[3],
                            mpu->id.ver[0], mpu->id.ver[1],
                            mpu->id.ver[2], mpu->id.ver[3]);
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "   MPU HW num_queues: %u hw_depth %u,"
                            " obj_size: %u, obj_per_mrr: %u"
                            " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
        ark_mpu_reset(mpu);
 
        if (!rte_is_power_of_2(ring_size)) {
-               PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+               ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
                            ring_size);
                return -1;
        }
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
        /* DUMP to see that we have started */
-       PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+       ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
                      code, qid,
                      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-       PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-                     " data 0x%08x_%08x 0x%08x_%08x\n",
+       ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+                     "\n",
                      code,
                      mpu->debug.state, mpu->debug.count,
-                     mpu->debug.reserved,
-                     mpu->debug.peek[1],
-                     mpu->debug.peek[0],
-                     mpu->debug.peek[3],
-                     mpu->debug.peek[2]
-                     );
-       PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-                     ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-                     ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-                     code, qid,
-                     "PCI Request:", mpu->stats.pci_request,
-                     "Queue_empty", mpu->stats.q_empty,
-                     "Queue_q1", mpu->stats.q_q1,
-                     "Queue_q2", mpu->stats.q_q2,
-                     "Queue_q3", mpu->stats.q_q3,
-                     "Queue_q4", mpu->stats.q_q4,
-                     "Queue_full", mpu->stats.q_full
+                     mpu->debug.reserved
                      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-       PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+       ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
                      ARK_SU64X "\n",
                      q_id,
                      "ring_base", mpu->cfg.ring_base
index ef861ee..b8fb694 100644 (file)
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
                rte_malloc("ark_pkt_chkr_inst",
                           sizeof(struct ark_pkt_chkr_inst), 0);
        if (inst == NULL) {
-               PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+               ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
                return inst;
        }
        inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
        while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
                usleep(1000);
                wait_cycle--;
-               PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+               ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
                              inst->ordinal);
        }
-       PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+       ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
        struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
        if (ark_pktchkr_is_gen_forever(handle)) {
-               PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+               ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
                              " because gen_forever=1\n");
                return -1;
        }
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
        while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
                usleep(1000);
                wait_cycle--;
-               PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+               ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
                              " internal pktgen to finish sending...\n",
                              inst->ordinal);
-               PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+               ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
                              inst->ordinal);
        }
        return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
        struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-       PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+       ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
                      inst->sregs->pkts_rcvd);
-       PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+       ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
                      inst->sregs->bytes_rcvd);
-       PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+       ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
                      inst->sregs->pkts_ok);
-       PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+       ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
                      inst->sregs->pkts_mismatch);
-       PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+       ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
                      inst->sregs->pkts_err);
-       PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+       ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
                      inst->sregs->first_mismatch);
-       PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+       ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
                      inst->sregs->resync_events);
-       PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+       ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
                      inst->sregs->pkts_missing);
-       PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+       ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
                      inst->sregs->min_latency);
-       PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+       ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
                      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
                if (strcmp(id, toptions[i].opt) == 0)
                        return &toptions[i];
        }
-       PMD_DRV_LOG(ERR,
+       ARK_PMD_LOG(ERR,
                    "pktchkr: Could not find requested option!, option = %s\n",
                    id);
        return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
                ark_pktchkr_stop(handle);
 
        if (options("run")->v.BOOL) {
-               PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+               ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
                              options("port")->v.INT);
                ark_pktchkr_run(handle);
        }
index 1f2c818..25e1218 100644 (file)
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
                           sizeof(struct ark_pkt_dir_inst),
                           0);
        if (inst == NULL) {
-               PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+               ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
                return inst;
        }
        inst->regs = (struct ark_pkt_dir_regs *)base;
index 2cae252..4a02662 100644 (file)
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
                rte_malloc("ark_pkt_gen_inst_pmd",
                           sizeof(struct ark_pkt_gen_inst), 0);
        if (inst == NULL) {
-               PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+               ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
                return inst;
        }
        inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
        while (!ark_pktgen_paused(handle)) {
                usleep(1000);
                if (cnt++ > 100) {
-                       PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+                       ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
                                    inst->ordinal);
                        break;
                }
        }
-       PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+       ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
        if (!ark_pktgen_is_running(handle) &&
            !ark_pktgen_paused(handle)) {
-               PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+               ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
                              " and is not paused. No need to reset.\n",
                              inst->ordinal);
                return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
        if (ark_pktgen_is_running(handle) &&
            !ark_pktgen_paused(handle)) {
-               PMD_DEBUG_LOG(DEBUG,
+               ARK_PMD_LOG(DEBUG,
                              "Pktgen %d is not paused. Pausing first.\n",
                              inst->ordinal);
                ark_pktgen_pause(handle);
        }
 
-       PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+       ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
        inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
        int wait_cycle = 10;
 
        if (ark_pktgen_is_gen_forever(handle))
-               PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+               ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
                            " because gen_forever=1\n");
 
        while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
                usleep(1000);
                wait_cycle--;
-               PMD_DEBUG_LOG(DEBUG,
+               ARK_PMD_LOG(DEBUG,
                              "Waiting for pktgen %d to finish sending...\n",
                              inst->ordinal);
        }
-       PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+       ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
                        return &toptions[i];
        }
 
-       PMD_DRV_LOG(ERR,
+       ARK_PMD_LOG(ERR,
                    "Pktgen: Could not find requested option!, "
                    "option = %s\n",
                    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
        if (options("reset")->v.BOOL)
                ark_pktgen_reset(handle);
        if (options("run")->v.BOOL) {
-               PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+               ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
                                options("port")->v.INT);
                ark_pktgen_run(handle);
        }
index bf1af4d..ef9ccd0 100644 (file)
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
        if (rqp->err_count_other != 0)
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
                            ARK_SU32
                            ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
                            "Error Count", rqp->err_cnt,
                            "Error General", rqp->err_count_other);
 
-       PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+       ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
                      ARK_SU32
                      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
                      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
index 03f1922..a740d36 100644 (file)
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
        if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "ARK: UDM structure looks incorrect %d vs %zd\n",
                            ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
                return -1;
        }
 
        if (udm->setup.const0 != ARK_UDM_CONST) {
-               PMD_DRV_LOG(ERR,
+               ARK_PMD_LOG(ERR,
                            "ARK: UDM module not found as expected 0x%08x\n",
                            udm->setup.const0);
                return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
        status = ark_udm_stop(udm, 1);
        if (status != 0) {
-               PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+               ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
                              __func__);
                udm->cfg.command = 4;
                usleep(10);
                udm->cfg.command = 3;
                status = ark_udm_stop(udm, 0);
-               PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+               ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
                              " and forced reset\n",
                              __func__, status);
        } else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-       PMD_STATS_LOG(INFO, "UDM Stats: %s"
+       ARK_PMD_LOG(INFO, "UDM Stats: %s"
                      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
                      msg,
                      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-       PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+       ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
                      ARK_SU64 ARK_SU64
                      ARK_SU64 ARK_SU64
                      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-       PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+       ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
                      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-       PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+       ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
                      ARK_SU64X ARK_SU32 "\n",
                      q_id,
                      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
        struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-       PMD_STATS_LOG(INFO, "UDM Performance %s"
+       ARK_PMD_LOG(INFO, "UDM Performance %s"
                      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
                      "\n",
                      msg,