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 D13AB293B for ; Wed, 6 Dec 2017 21:01:30 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 12:01:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,369,1508828400"; d="scan'208";a="10238004" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 06 Dec 2017 12:01:29 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 12:01:29 -0800 Received: from fmsmsx115.amr.corp.intel.com ([169.254.4.116]) by FMSMSX112.amr.corp.intel.com ([169.254.5.121]) with mapi id 14.03.0319.002; Wed, 6 Dec 2017 12:01:28 -0800 From: "Carrillo, Erik G" To: Jerin Jacob CC: "pbhagavatula@caviumnetworks.com" , "dev@dpdk.org" , "nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" Thread-Topic: [RFC PATCH v5 3/5] eventtimer: add config variable for adapter Thread-Index: AQHTbqjM4lzZFpf9vEKoWEgvjYbh5KM2vDeQ Date: Wed, 6 Dec 2017 20:01:28 +0000 Message-ID: References: <1511890148-22295-1-git-send-email-erik.g.carrillo@intel.com> <1512158458-22661-1-git-send-email-erik.g.carrillo@intel.com> <1512158458-22661-4-git-send-email-erik.g.carrillo@intel.com> <20171206154139.GC1591@jerin> In-Reply-To: <20171206154139.GC1591@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDkwYjEzMTktNTk0ZC00OTNlLWFlNjgtM2YwYzJmNDYyNmUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJwamJYaDlvY1VyZDJpYVB1UVJNZjdXVWJ1NTdZZmRrNmREQ3hWSGRQNVBKMTA5NElSUWE1ZWtaK2ZFMDYySUhBIn0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Wed, 06 Dec 2017 20:01:31 -0000 Thanks, Jerin. I'll make the changes suggested below and the changes sugge= sted for the preceding patch in the next version of the series that is post= ed. Regards, Gabriel > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Wednesday, December 6, 2017 9:42 AM > To: Carrillo, Erik G > Cc: pbhagavatula@caviumnetworks.com; dev@dpdk.org; > nipun.gupta@nxp.com; hemant.agrawal@nxp.com > Subject: Re: [RFC PATCH v5 3/5] eventtimer: add config variable for adapt= er >=20 > -----Original Message----- > > Date: Fri, 1 Dec 2017 14:00:56 -0600 > > From: Erik Gabriel Carrillo > > To: pbhagavatula@caviumnetworks.com > > CC: dev@dpdk.org, jerin.jacob@caviumnetworks.com, > nipun.gupta@nxp.com, > > hemant.agrawal@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 > > --- > > 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=3Dy > > CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=3Dn > > CONFIG_RTE_EVENT_MAX_DEVS=3D16 > > CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=3D64 > > +CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER=3Dy >=20 > IMO, We can remove this option to remove conditional compilation code > introduced in this patch. >=20 > > CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER_DEBUG=3Dn >=20 > 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. >=20 > > > > # > > 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 =3D > sw_eth_rx_adapter_caps_get, > > > > +#ifdef RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER > > .timer_adapter_caps_get =3D > sw_timer_adapter_caps_get, > > +#endif > > > > .xstats_get =3D sw_xstats_get, > > .xstats_get_names =3D 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 +=3D -lrte_eal -lrte_ring -lrte_ethdev > > -lrte_hash SRCS-y +=3D rte_eventdev.c SRCS-y +=3D rte_event_ring.c > > SRCS-y +=3D rte_event_eth_rx_adapter.c -SRCS-y +=3D > > rte_event_timer_adapter.c > > +SRCS-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER) +=3D > > +rte_event_timer_adapter.c > > > > # export include files > > SYMLINK-y-include +=3D rte_eventdev.h > > @@ -54,8 +54,8 @@ SYMLINK-y-include +=3D rte_eventdev_pmd_pci.h > > SYMLINK-y-include +=3D rte_eventdev_pmd_vdev.h SYMLINK-y-include +=3D > > rte_event_ring.h SYMLINK-y-include +=3D rte_event_eth_rx_adapter.h > > -SYMLINK-y-include +=3D rte_event_timer_adapter.h -SYMLINK-y-include += =3D > > rte_event_timer_adapter_pmd.h > > +SYMLINK-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER)-include > +=3D > > +rte_event_timer_adapter.h > > +SYMLINK-$(CONFIG_RTE_LIBRTE_EVENTDEV_TIMER_ADAPTER)-include > +=3D > > +rte_event_timer_adapter_pmd.h > > > > # versioning export map > > EXPORT_MAP :=3D 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 > >