#include <netcfg.h>
int dpaa_logtype_bus;
-int dpaa_logtype_mempool;
-int dpaa_logtype_pmd;
-int dpaa_logtype_eventdev;
static struct rte_dpaa_bus rte_dpaa_bus;
struct netcfg_info *dpaa_netcfg;
/* One time load of Qman/Bman drivers */
ret = qman_global_init();
if (ret) {
- DPAA_PMD_ERR("QMAN initialization failed: %d",
+ DPAA_BUS_ERR("QMAN initialization failed: %d",
ret);
return ret;
}
ret = bman_global_init();
if (ret) {
- DPAA_PMD_ERR("BMAN initialization failed: %d",
+ DPAA_BUS_ERR("BMAN initialization failed: %d",
ret);
return ret;
}
dpaa_logtype_bus = rte_log_register("bus.dpaa");
if (dpaa_logtype_bus >= 0)
rte_log_set_level(dpaa_logtype_bus, RTE_LOG_NOTICE);
-
- dpaa_logtype_mempool = rte_log_register("mempool.dpaa");
- if (dpaa_logtype_mempool >= 0)
- rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE);
-
- dpaa_logtype_pmd = rte_log_register("pmd.net.dpaa");
- if (dpaa_logtype_pmd >= 0)
- rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE);
-
- dpaa_logtype_eventdev = rte_log_register("pmd.event.dpaa");
- if (dpaa_logtype_eventdev >= 0)
- rte_log_set_level(dpaa_logtype_eventdev, RTE_LOG_NOTICE);
}
bman_thread_irq;
dpaa_get_qm_channel_caam;
dpaa_get_qm_channel_pool;
- dpaa_logtype_eventdev;
- dpaa_logtype_mempool;
- dpaa_logtype_pmd;
dpaa_netcfg;
dpaa_svr_family;
fman_dealloc_bufs_mask_hi;
#include <rte_log.h>
extern int dpaa_logtype_bus;
-extern int dpaa_logtype_mempool;
-extern int dpaa_logtype_pmd;
-extern int dpaa_logtype_eventdev;
#define DPAA_BUS_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "dpaa: " fmt "\n", ##args)
#define DPAA_BUS_WARN(fmt, args...) \
DPAA_BUS_LOG(WARNING, fmt, ## args)
-/* Mempool related logs */
-
-#define DPAA_MEMPOOL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \
- __func__, ##args)
-
-#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>")
-
-#define DPAA_MEMPOOL_DPDEBUG(fmt, args...) \
- RTE_LOG_DP(DEBUG, PMD, fmt, ## args)
-#define DPAA_MEMPOOL_DEBUG(fmt, args...) \
- DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args)
-#define DPAA_MEMPOOL_ERR(fmt, args...) \
- DPAA_MEMPOOL_LOG(ERR, fmt, ## args)
-#define DPAA_MEMPOOL_INFO(fmt, args...) \
- DPAA_MEMPOOL_LOG(INFO, fmt, ## args)
-#define DPAA_MEMPOOL_WARN(fmt, args...) \
- DPAA_MEMPOOL_LOG(WARNING, fmt, ## args)
-
-/* PMD related logs */
-
-#define DPAA_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \
- __func__, ##args)
-
-#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>")
-
-#define DPAA_PMD_DEBUG(fmt, args...) \
- DPAA_PMD_LOG(DEBUG, fmt, ## args)
-#define DPAA_PMD_ERR(fmt, args...) \
- DPAA_PMD_LOG(ERR, fmt, ## args)
-#define DPAA_PMD_INFO(fmt, args...) \
- DPAA_PMD_LOG(INFO, fmt, ## args)
-#define DPAA_PMD_WARN(fmt, args...) \
- DPAA_PMD_LOG(WARNING, fmt, ## args)
-
-#define DPAA_EVENTDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_eventdev, "%s(): " fmt "\n", \
- __func__, ##args)
-
-#define EVENTDEV_INIT_FUNC_TRACE() DPAA_EVENTDEV_LOG(DEBUG, " >>")
-
-#define DPAA_EVENTDEV_DEBUG(fmt, args...) \
- DPAA_EVENTDEV_LOG(DEBUG, fmt, ## args)
-#define DPAA_EVENTDEV_ERR(fmt, args...) \
- DPAA_EVENTDEV_LOG(ERR, fmt, ## args)
-#define DPAA_EVENTDEV_INFO(fmt, args...) \
- DPAA_EVENTDEV_LOG(INFO, fmt, ## args)
-#define DPAA_EVENTDEV_WARN(fmt, args...) \
- DPAA_EVENTDEV_LOG(WARNING, fmt, ## args)
-
-/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, PMD, fmt, ## args)
-
#endif /* _DPAA_LOGS_H_ */
* Eventqueue = Channel Instance
* 1 Eventdev can have N Eventqueue
*/
+int dpaa_logtype_eventdev;
#define DISABLE_INTR_MODE "disable_intr"
RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA_PMD, vdev_eventdev_dpaa_pmd);
RTE_PMD_REGISTER_PARAM_STRING(EVENTDEV_NAME_DPAA_PMD,
DISABLE_INTR_MODE "=<int>");
+RTE_INIT(dpaa_event_init_log)
+{
+ dpaa_logtype_eventdev = rte_log_register("pmd.event.dpaa");
+ if (dpaa_logtype_eventdev >= 0)
+ rte_log_set_level(dpaa_logtype_eventdev, RTE_LOG_NOTICE);
+}
uint32_t nb_event_port_enqueue_depth;
uint32_t event_dev_cfg;
};
+
+#define DPAA_EVENTDEV_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, dpaa_logtype_eventdev, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define EVENTDEV_INIT_FUNC_TRACE() DPAA_EVENTDEV_LOG(DEBUG, " >>")
+
+#define DPAA_EVENTDEV_DEBUG(fmt, args...) \
+ DPAA_EVENTDEV_LOG(DEBUG, fmt, ## args)
+#define DPAA_EVENTDEV_ERR(fmt, args...) \
+ DPAA_EVENTDEV_LOG(ERR, fmt, ## args)
+#define DPAA_EVENTDEV_INFO(fmt, args...) \
+ DPAA_EVENTDEV_LOG(INFO, fmt, ## args)
+#define DPAA_EVENTDEV_WARN(fmt, args...) \
+ DPAA_EVENTDEV_LOG(WARNING, fmt, ## args)
+
#endif /* __DPAA_EVENTDEV_H__ */
= TAILQ_HEAD_INITIALIZER(rte_dpaa_memsegs);
struct dpaa_bp_info *rte_dpaa_bpid_info;
+int dpaa_logtype_mempool;
static int
dpaa_mbuf_create_pool(struct rte_mempool *mp)
};
MEMPOOL_REGISTER_OPS(dpaa_mpool_ops);
+
+RTE_INIT(dpaa_mp_init_log)
+{
+ dpaa_logtype_mempool = rte_log_register("mempool.dpaa");
+ if (dpaa_logtype_mempool >= 0)
+ rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE);
+}
#define DPAA_BPID_TO_POOL_INFO(__bpid) (&rte_dpaa_bpid_info[__bpid])
+/* Mempool related logs */
+
+#define DPAA_MEMPOOL_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>")
+
+#define DPAA_MEMPOOL_DPDEBUG(fmt, args...) \
+ RTE_LOG_DP(DEBUG, PMD, fmt, ## args)
+#define DPAA_MEMPOOL_DEBUG(fmt, args...) \
+ DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args)
+#define DPAA_MEMPOOL_ERR(fmt, args...) \
+ DPAA_MEMPOOL_LOG(ERR, fmt, ## args)
+#define DPAA_MEMPOOL_INFO(fmt, args...) \
+ DPAA_MEMPOOL_LOG(INFO, fmt, ## args)
+#define DPAA_MEMPOOL_WARN(fmt, args...) \
+ DPAA_MEMPOOL_LOG(WARNING, fmt, ## args)
+
#endif
#include <fsl_bman.h>
#include <fsl_fman.h>
+int dpaa_logtype_pmd;
+
/* Supported Rx offloads */
static uint64_t dev_rx_offloads_sup =
DEV_RX_OFFLOAD_JUMBO_FRAME |
temp1 = read(rxq->q_fd, &temp, sizeof(temp));
if (temp1 != sizeof(temp))
- DPAA_EVENTDEV_ERR("irq read error");
+ DPAA_PMD_ERR("irq read error");
qman_fq_portal_thread_irq(rxq->qp);
};
RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
+RTE_INIT(dpaa_net_init_log)
+{
+ dpaa_logtype_pmd = rte_log_register("pmd.net.dpaa");
+ if (dpaa_logtype_pmd >= 0)
+ rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE);
+}
const struct qm_dqrr_entry *dqrr,
void **bufs);
+/* PMD related logs */
+extern int dpaa_logtype_pmd;
+
+#define DPAA_PMD_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>")
+
+#define DPAA_PMD_DEBUG(fmt, args...) \
+ DPAA_PMD_LOG(DEBUG, fmt, ## args)
+#define DPAA_PMD_ERR(fmt, args...) \
+ DPAA_PMD_LOG(ERR, fmt, ## args)
+#define DPAA_PMD_INFO(fmt, args...) \
+ DPAA_PMD_LOG(INFO, fmt, ## args)
+#define DPAA_PMD_WARN(fmt, args...) \
+ DPAA_PMD_LOG(WARNING, fmt, ## args)
+
+/* DP Logs, toggled out at compile time if level lower than current level */
+#define DPAA_DP_LOG(level, fmt, args...) \
+ RTE_LOG_DP(level, PMD, fmt, ## args)
+
#endif