From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 6/7] Move EAL common functions Date: Mon, 05 Jan 2015 16:49:33 +0100 Message-ID: <1909847.Pe2vrEvq2S@xps13> References: <1419521597-31978-1-git-send-email-rkerur@gmail.com> <1419521597-31978-7-git-send-email-rkerur@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Ravi Kerur Return-path: In-Reply-To: <1419521597-31978-7-git-send-email-rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-12-25 10:33, Ravi Kerur: > +#ifdef RTE_EXEC_ENV_BSDAPP > + if (set_tsc_freq_from_sysctl() < 0) > +#else /* RTE_EXEC_ENV_BSDAPP */ > + if (set_tsc_freq_from_clock() < 0) > +#endif /* RTE_EXEC_ENV_BSDAPP */ In case there is only 1 line in ifdef, it's clearer to not comment #else and #endif. > --- a/lib/librte_eal/common/eal_externs.h > +++ b/lib/librte_eal/common/eal_externs.h > @@ -39,4 +39,7 @@ extern struct rte_config rte_config; > extern int mem_cfg_fd; > extern rte_usage_hook_t rte_application_usage_hook; > > +/* Extern declarations defined in eal_common_timer.c */ > +extern uint64_t eal_tsc_resolution_hz; > + Why is this extern needed? It would be nicer to have functions returning resolution after probing. Then it's stored in linuxapp or bsdapp and retrieved with the existing function rte_get_tsc_hz(). Thanks -- Thomas