Thanks, Jerin. I'll make the changes suggested below and the changes suggested for the preceding patch in the next version of the series that is posted.
Regards, Gabriel > -----Original Message----- > From: Jerin Jacob [mailto:jerin.ja...@caviumnetworks.com] > Sent: Wednesday, December 6, 2017 9:42 AM > To: Carrillo, Erik G <erik.g.carri...@intel.com> > Cc: pbhagavat...@caviumnetworks.com; dev@dpdk.org; > nipun.gu...@nxp.com; hemant.agra...@nxp.com > Subject: Re: [RFC PATCH v5 3/5] eventtimer: add config variable for adapter > > -----Original Message----- > > Date: Fri, 1 Dec 2017 14:00:56 -0600 > > From: Erik Gabriel Carrillo <erik.g.carri...@intel.com> > > To: pbhagavat...@caviumnetworks.com > > CC: dev@dpdk.org, jerin.ja...@caviumnetworks.com, > nipun.gu...@nxp.com, > > hemant.agra...@nxp.com > > Subject: [RFC PATCH v5 3/5] eventtimer: add config variable for > > adapter > > X-Mailer: git-send-email 1.7.10 > > > > This commit introduces a configuration variable that can be used to > > enable or disable compilation of the event timer adapter. > > > > Signed-off-by: Erik Gabriel Carrillo <erik.g.carri...@intel.com> > > --- > > config/common_base | 1 + > > drivers/event/sw/sw_evdev.c | 4 ++++ > > lib/librte_eventdev/Makefile | 6 +++--- > > lib/librte_eventdev/rte_eventdev_pmd.h | 6 ++++++ > > 4 files changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/config/common_base b/config/common_base index > > 91a2f0f..09d2a62 100644 > > --- a/config/common_base > > +++ b/config/common_base > > @@ -574,6 +574,7 @@ 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_LIBRTE_EVENTDEV_TIMER_ADAPTER=y > > IMO, We can remove this option to remove conditional compilation code > introduced in this patch. > > > CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER_DEBUG=n > > How about reusing CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG to support the > above comment. Rx adapter does the same thing, IMO, It is worth to follow > that. > > > > > # > > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > > index 94da675..69050cf 100644 > > --- a/drivers/event/sw/sw_evdev.c > > +++ b/drivers/event/sw/sw_evdev.c > > @@ -435,6 +435,7 @@ sw_eth_rx_adapter_caps_get(const struct > rte_eventdev *dev, > > return 0; > > } > > > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > static int > > sw_timer_adapter_caps_get(const struct rte_eventdev *dev, > > uint64_t flags, > > @@ -450,6 +451,7 @@ sw_timer_adapter_caps_get(const struct > > rte_eventdev *dev, > > > > return 0; > > } > > +#endif > > > > static void > > sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info > > *info) @@ -771,7 +773,9 @@ sw_probe(struct rte_vdev_device *vdev) > > > > .eth_rx_adapter_caps_get = > sw_eth_rx_adapter_caps_get, > > > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > .timer_adapter_caps_get = > sw_timer_adapter_caps_get, > > +#endif > > > > .xstats_get = sw_xstats_get, > > .xstats_get_names = sw_xstats_get_names, diff --git > > a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile index > > f3f05c2..2e47fa5 100644 > > --- a/lib/librte_eventdev/Makefile > > +++ b/lib/librte_eventdev/Makefile > > @@ -45,7 +45,7 @@ LDLIBS += -lrte_eal -lrte_ring -lrte_ethdev > > -lrte_hash SRCS-y += rte_eventdev.c SRCS-y += rte_event_ring.c > > SRCS-y += rte_event_eth_rx_adapter.c -SRCS-y += > > rte_event_timer_adapter.c > > +SRCS-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER) += > > +rte_event_timer_adapter.c > > > > # export include files > > SYMLINK-y-include += rte_eventdev.h > > @@ -54,8 +54,8 @@ SYMLINK-y-include += rte_eventdev_pmd_pci.h > > SYMLINK-y-include += rte_eventdev_pmd_vdev.h SYMLINK-y-include += > > rte_event_ring.h SYMLINK-y-include += rte_event_eth_rx_adapter.h > > -SYMLINK-y-include += rte_event_timer_adapter.h -SYMLINK-y-include += > > rte_event_timer_adapter_pmd.h > > +SYMLINK-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER)-include > += > > +rte_event_timer_adapter.h > > +SYMLINK-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER)-include > += > > +rte_event_timer_adapter_pmd.h > > > > # versioning export map > > EXPORT_MAP := rte_eventdev_version.map diff --git > > a/lib/librte_eventdev/rte_eventdev_pmd.h > > b/lib/librte_eventdev/rte_eventdev_pmd.h > > index 321aef2..91e1f47 100644 > > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > > @@ -52,7 +52,9 @@ extern "C" { > > #include <rte_malloc.h> > > > > #include "rte_eventdev.h" > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > #include "rte_event_timer_adapter_pmd.h" > > +#endif > > > > /* Logging Macros */ > > #define RTE_EDEV_LOG_ERR(...) \ > > @@ -467,6 +469,7 @@ typedef int > (*eventdev_eth_rx_adapter_caps_get_t) > > > > struct rte_event_eth_rx_adapter_queue_conf *queue_conf; > > > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > /** > > * Retrieve the event device's timer adapter capabilities, as well as the > > ops > > * structure that an event timer adapter should call through to enter > > the @@ -497,6 +500,7 @@ typedef int > (*eventdev_timer_adapter_caps_get_t)( > > uint64_t flags, > > uint32_t *caps, > > const struct rte_event_timer_adapter_ops > **ops); > > +#endif > > > > /** > > * Add ethernet Rx queues to event device. This callback is invoked > > if @@ -683,8 +687,10 @@ struct rte_eventdev_ops { > > eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset; > > /**< Reset ethernet Rx stats */ > > > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > eventdev_timer_adapter_caps_get_t timer_adapter_caps_get; > > /**< Get timer adapter capabilities */ > > +#endif > > }; > > > > /** > > -- > > 2.6.4 > >