From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 114A35593 for ; Fri, 1 Dec 2017 21:01:30 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2017 12:01:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,346,1508828400"; d="scan'208";a="155155490" Received: from txasoft-yocto.an.intel.com (HELO txasoft-yocto.an.intel.com.) ([10.123.72.111]) by orsmga004.jf.intel.com with ESMTP; 01 Dec 2017 12:01:30 -0800 From: Erik Gabriel Carrillo To: pbhagavatula@caviumnetworks.com Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com Date: Fri, 1 Dec 2017 14:00:56 -0600 Message-Id: <1512158458-22661-4-git-send-email-erik.g.carrillo@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1512158458-22661-1-git-send-email-erik.g.carrillo@intel.com> References: <1511890148-22295-1-git-send-email-erik.g.carrillo@intel.com> <1512158458-22661-1-git-send-email-erik.g.carrillo@intel.com> Subject: [dpdk-dev] [RFC PATCH v5 3/5] eventtimer: add config variable for adapter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2017 20:01:31 -0000 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 --- 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 CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER_DEBUG=n # 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 #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