event/octeontx: implement dynamic logging
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
7d6321de8d
commit
6ff1717841
@ -565,7 +565,6 @@ CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n
|
||||
# Compile PMD for octeontx sso event device
|
||||
#
|
||||
CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y
|
||||
CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n
|
||||
|
||||
#
|
||||
# Compile librte_ring
|
||||
|
@ -14,4 +14,3 @@ CONFIG_RTE_MAX_LCORE=96
|
||||
# Compile PMD for octeontx sso event device
|
||||
#
|
||||
CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y
|
||||
CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n
|
||||
|
@ -18,6 +18,17 @@
|
||||
|
||||
#include "ssovf_evdev.h"
|
||||
|
||||
int otx_logtype_ssovf;
|
||||
|
||||
RTE_INIT(otx_ssovf_init_log);
|
||||
static void
|
||||
otx_ssovf_init_log(void)
|
||||
{
|
||||
otx_logtype_ssovf = rte_log_register("pmd.otx.eventdev");
|
||||
if (otx_logtype_ssovf >= 0)
|
||||
rte_log_set_level(otx_logtype_ssovf, RTE_LOG_NOTICE);
|
||||
}
|
||||
|
||||
/* SSOPF Mailbox messages */
|
||||
|
||||
struct ssovf_mbox_dev_info {
|
||||
|
@ -13,22 +13,15 @@
|
||||
|
||||
#define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx
|
||||
|
||||
#ifdef RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG
|
||||
#define ssovf_log_info(fmt, args...) \
|
||||
RTE_LOG(INFO, EVENTDEV, "[%s] %s() " fmt "\n", \
|
||||
RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
|
||||
#define ssovf_log_dbg(fmt, args...) \
|
||||
RTE_LOG(DEBUG, EVENTDEV, "[%s] %s() " fmt "\n", \
|
||||
RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
|
||||
#else
|
||||
#define ssovf_log_info(fmt, args...)
|
||||
#define ssovf_log_dbg(fmt, args...)
|
||||
#endif
|
||||
#define SSOVF_LOG(level, fmt, args...) \
|
||||
rte_log(RTE_LOG_ ## level, otx_logtype_ssovf, \
|
||||
"[%s] %s() " fmt "\n", \
|
||||
RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
|
||||
|
||||
#define ssovf_log_info(fmt, ...) SSOVF_LOG(INFO, fmt, ##__VA_ARGS__)
|
||||
#define ssovf_log_dbg(fmt, ...) SSOVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
|
||||
#define ssovf_log_err(fmt, ...) SSOVF_LOG(ERR, fmt, ##__VA_ARGS__)
|
||||
#define ssovf_func_trace ssovf_log_dbg
|
||||
#define ssovf_log_err(fmt, args...) \
|
||||
RTE_LOG(ERR, EVENTDEV, "[%s] %s() " fmt "\n", \
|
||||
RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
|
||||
|
||||
#define SSO_MAX_VHGRP (64)
|
||||
#define SSO_MAX_VHWS (32)
|
||||
@ -152,6 +145,8 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev)
|
||||
return eventdev->data->dev_private;
|
||||
}
|
||||
|
||||
extern int otx_logtype_ssovf;
|
||||
|
||||
uint16_t ssows_enq(void *port, const struct rte_event *ev);
|
||||
uint16_t ssows_enq_burst(void *port,
|
||||
const struct rte_event ev[], uint16_t nb_events);
|
||||
|
Loading…
x
Reference in New Issue
Block a user