[v1,04/17] eventdev: replace library debug flag with global one
Checks
Commit Message
Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_EVENTDEV_DEBUG.
The old define is completely removed from source code and config.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
config/common_base | 1 -
lib/librte_eventdev/rte_event_eth_tx_adapter.h | 2 +-
lib/librte_eventdev/rte_event_timer_adapter.c | 6 +++---
lib/librte_eventdev/rte_event_timer_adapter.h | 6 +++---
lib/librte_eventdev/rte_eventdev.h | 4 ++--
lib/librte_eventdev/rte_eventdev_pmd.h | 2 +-
6 files changed, 10 insertions(+), 11 deletions(-)
Comments
> -----Original Message-----
> From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> Sent: Saturday, April 18, 2020 3:27 AM
> To: Thomas Monjalon <thomas@monjalon.net>; Nikhil Rao
> <nikhil.rao@intel.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Erik
> Gabriel Carrillo <erik.g.carrillo@intel.com>
> Cc: dev@dpdk.org
> Subject: [EXT] [PATCH v1 04/17] eventdev: replace library debug flag with
> global one
>
>
> Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_EVENTDEV_DEBUG.
> The old define is completely removed from source code and config.
May I know the rational for this change? Other subsystem like ethdev still have
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n.
If we decide to make RTE_DEBUG then please submit the patch for all subsystem
across the DPDK.
>
> Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> ---
> config/common_base | 1 -
> lib/librte_eventdev/rte_event_eth_tx_adapter.h | 2 +-
> lib/librte_eventdev/rte_event_timer_adapter.c | 6 +++---
> lib/librte_eventdev/rte_event_timer_adapter.h | 6 +++---
> lib/librte_eventdev/rte_eventdev.h | 4 ++--
> lib/librte_eventdev/rte_eventdev_pmd.h | 2 +-
> 6 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/config/common_base b/config/common_base index
> 16a8f09b6..96d5031d9 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -722,7 +722,6 @@ CONFIG_RTE_LIBRTE_PMD_ZLIB=n # Compile generic
> event device library # CONFIG_RTE_LIBRTE_EVENTDEV=y -
> CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n
> CONFIG_RTE_EVENT_MAX_DEVS=16
> CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64
> CONFIG_RTE_EVENT_TIMER_ADAPTER_NUM_MAX=32
> diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h
> b/lib/librte_eventdev/rte_event_eth_tx_adapter.h
> index 93b717af9..de13ca7f0 100644
> --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h
> +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h
> @@ -357,7 +357,7 @@ rte_event_eth_tx_adapter_enqueue(uint8_t dev_id, {
> const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> if (dev_id >= RTE_EVENT_MAX_DEVS ||
> !rte_eventdevs[dev_id].attached) {
> rte_errno = EINVAL;
> diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c
> b/lib/librte_eventdev/rte_event_timer_adapter.c
> index 161e21a68..02c27b91e 100644
> --- a/lib/librte_eventdev/rte_event_timer_adapter.c
> +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
> @@ -43,7 +43,7 @@ static const struct rte_event_timer_adapter_ops
> swtim_ops;
>
> #define EVTIM_LOG_ERR(...) EVTIM_LOG(ERR, evtim_logtype, __VA_ARGS__)
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> #define EVTIM_LOG_DBG(...) \
> EVTIM_LOG(DEBUG, evtim_logtype, __VA_ARGS__) #define
> EVTIM_BUF_LOG_DBG(...) \ @@ -1008,7 +1008,7 @@
> __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
> struct rte_timer *tim, *tims[nb_evtims];
> uint64_t cycles;
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> /* Check that the service is running. */
> if (rte_service_runstate_get(adapter->data->service_id) != 1) {
> rte_errno = EINVAL;
> @@ -1114,7 +1114,7 @@ swtim_cancel_burst(const struct
> rte_event_timer_adapter *adapter,
> uint64_t opaque;
> struct swtim *sw = swtim_pmd_priv(adapter);
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> /* Check that the service is running. */
> if (rte_service_runstate_get(adapter->data->service_id) != 1) {
> rte_errno = EINVAL;
> diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h
> b/lib/librte_eventdev/rte_event_timer_adapter.h
> index 7f6dc5c29..8e7e2b0e3 100644
> --- a/lib/librte_eventdev/rte_event_timer_adapter.h
> +++ b/lib/librte_eventdev/rte_event_timer_adapter.h
> @@ -575,7 +575,7 @@ rte_event_timer_arm_burst(const struct
> rte_event_timer_adapter *adapter,
> struct rte_event_timer **evtims,
> uint16_t nb_evtims)
> {
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
> FUNC_PTR_OR_ERR_RET(adapter->arm_burst, -EINVAL); #endif @@ -
> 618,7 +618,7 @@ rte_event_timer_arm_tmo_tick_burst(
> const uint64_t timeout_ticks,
> const uint16_t nb_evtims)
> {
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
> FUNC_PTR_OR_ERR_RET(adapter->arm_tmo_tick_burst, -EINVAL);
> #endif @@ -651,7 +651,7 @@ rte_event_timer_cancel_burst(const struct
> rte_event_timer_adapter *adapter,
> struct rte_event_timer **evtims,
> uint16_t nb_evtims)
> {
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
> FUNC_PTR_OR_ERR_RET(adapter->cancel_burst, -EINVAL); #endif diff -
> -git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 226f352ad..cb237fdd0 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -1332,7 +1332,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t
> port_id, {
> const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> if (dev_id >= RTE_EVENT_MAX_DEVS ||
> !rte_eventdevs[dev_id].attached) {
> rte_errno = EINVAL;
> return 0;
> @@ -1609,7 +1609,7 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t
> port_id, struct rte_event ev[], {
> struct rte_eventdev *dev = &rte_eventdevs[dev_id];
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> if (dev_id >= RTE_EVENT_MAX_DEVS ||
> !rte_eventdevs[dev_id].attached) {
> rte_errno = EINVAL;
> return 0;
> diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h
> b/lib/librte_eventdev/rte_eventdev_pmd.h
> index d118b9e5b..090cb4309 100644
> --- a/lib/librte_eventdev/rte_eventdev_pmd.h
> +++ b/lib/librte_eventdev/rte_eventdev_pmd.h
> @@ -34,7 +34,7 @@ extern "C" {
> RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,)
> "\n", \
> __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
>
> -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> +#ifdef RTE_DEBUG
> #define RTE_EDEV_LOG_DEBUG(...) \
> RTE_LOG(DEBUG, EVENTDEV, \
> RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,)
> "\n", \
> --
> 2.17.1
18/04/2020 11:41, Jerin Jacob Kollanukkaran:
> From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> > Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_EVENTDEV_DEBUG.
> > The old define is completely removed from source code and config.
>
>
> May I know the rational for this change?
You know the rationale, it was discussed several times in Technical Board:
we are limiting the number of compilation options, and meson config does
not propose them.
> Other subsystem like ethdev still have CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n.
No, look at the other patches in the series.
> If we decide to make RTE_DEBUG then please submit the patch for all subsystem
> across the DPDK.
Yes, this is what Lukasz did.
On Sat, Apr 18, 2020 at 3:23 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 18/04/2020 11:41, Jerin Jacob Kollanukkaran:
> > From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> > > Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_EVENTDEV_DEBUG.
> > > The old define is completely removed from source code and config.
> >
> >
> > May I know the rational for this change?
>
> You know the rationale, it was discussed several times in Technical Board:
If I already know the rationale, Why should I ask in ml?
> we are limiting the number of compilation options, and meson config does
> not propose them.
>
> > Other subsystem like ethdev still have CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n.
>
> No, look at the other patches in the series.
>
> > If we decide to make RTE_DEBUG then please submit the patch for all subsystem
> > across the DPDK.
>
> Yes, this is what Lukasz did.
I missed the series. I just thought it is a single email due to email
filters. My bad.
>
>
>
18/04/2020 12:05, Jerin Jacob:
> On Sat, Apr 18, 2020 at 3:23 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 18/04/2020 11:41, Jerin Jacob Kollanukkaran:
> > > From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> > > > Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_EVENTDEV_DEBUG.
> > > > The old define is completely removed from source code and config.
> > >
> > >
> > > May I know the rational for this change?
> >
> > You know the rationale, it was discussed several times in Technical Board:
>
> If I already know the rationale, Why should I ask in ml?
I meant you knew but you probably did not connect previous discussions
with this patch. That's why I explain below, no problem.
> > we are limiting the number of compilation options, and meson config does
> > not propose them.
> >
> > > Other subsystem like ethdev still have CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n.
> >
> > No, look at the other patches in the series.
> >
> > > If we decide to make RTE_DEBUG then please submit the patch for all subsystem
> > > across the DPDK.
> >
> > Yes, this is what Lukasz did.
>
> I missed the series. I just thought it is a single email due to email
> filters. My bad.
@@ -722,7 +722,6 @@ CONFIG_RTE_LIBRTE_PMD_ZLIB=n
# Compile generic event device library
#
CONFIG_RTE_LIBRTE_EVENTDEV=y
-CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n
CONFIG_RTE_EVENT_MAX_DEVS=16
CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64
CONFIG_RTE_EVENT_TIMER_ADAPTER_NUM_MAX=32
@@ -357,7 +357,7 @@ rte_event_eth_tx_adapter_enqueue(uint8_t dev_id,
{
const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS ||
!rte_eventdevs[dev_id].attached) {
rte_errno = EINVAL;
@@ -43,7 +43,7 @@ static const struct rte_event_timer_adapter_ops swtim_ops;
#define EVTIM_LOG_ERR(...) EVTIM_LOG(ERR, evtim_logtype, __VA_ARGS__)
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
#define EVTIM_LOG_DBG(...) \
EVTIM_LOG(DEBUG, evtim_logtype, __VA_ARGS__)
#define EVTIM_BUF_LOG_DBG(...) \
@@ -1008,7 +1008,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
struct rte_timer *tim, *tims[nb_evtims];
uint64_t cycles;
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
/* Check that the service is running. */
if (rte_service_runstate_get(adapter->data->service_id) != 1) {
rte_errno = EINVAL;
@@ -1114,7 +1114,7 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
uint64_t opaque;
struct swtim *sw = swtim_pmd_priv(adapter);
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
/* Check that the service is running. */
if (rte_service_runstate_get(adapter->data->service_id) != 1) {
rte_errno = EINVAL;
@@ -575,7 +575,7 @@ rte_event_timer_arm_burst(const struct rte_event_timer_adapter *adapter,
struct rte_event_timer **evtims,
uint16_t nb_evtims)
{
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
FUNC_PTR_OR_ERR_RET(adapter->arm_burst, -EINVAL);
#endif
@@ -618,7 +618,7 @@ rte_event_timer_arm_tmo_tick_burst(
const uint64_t timeout_ticks,
const uint16_t nb_evtims)
{
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
FUNC_PTR_OR_ERR_RET(adapter->arm_tmo_tick_burst, -EINVAL);
#endif
@@ -651,7 +651,7 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
struct rte_event_timer **evtims,
uint16_t nb_evtims)
{
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL);
FUNC_PTR_OR_ERR_RET(adapter->cancel_burst, -EINVAL);
#endif
@@ -1332,7 +1332,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
{
const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
rte_errno = EINVAL;
return 0;
@@ -1609,7 +1609,7 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[],
{
struct rte_eventdev *dev = &rte_eventdevs[dev_id];
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
rte_errno = EINVAL;
return 0;
@@ -34,7 +34,7 @@ extern "C" {
RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
__func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
+#ifdef RTE_DEBUG
#define RTE_EDEV_LOG_DEBUG(...) \
RTE_LOG(DEBUG, EVENTDEV, \
RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \