From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 7245C569A for ; Mon, 5 Jan 2015 16:49:56 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id k14so27999737wgh.15 for ; Mon, 05 Jan 2015 07:49:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=29OvzleMZrFyQNpW1FdSmbN2gmRYS/6Vp3fKFFvxG2I=; b=R1wvCPlzBm4eekOynQKz+JsTwdLCWD7hnLmnruya1+LUes5MGm0x1W/yy57jsVXuHp wlG3aS86bKAOjiesX/NXmnw+QpWEf4bNW/sV2RR3bqEDQtIKkLBZ9bJWcR9lNjXCsqHy ZPmi/Es4pi2qBUJeXoLiGRiYLVMznU8+Dpdmp+lxOZ5Zj8ZQO8FOk2dC97xqeAITlOC9 grK5ninXmQqXl0o8jdXvkXmO3Hc/9I9hO1cR/clNZ4afwuobNpJU7LcAmwGnm2r0Tpn0 uunHjYuSCOd7fso6sKTRHUtsCQrPT/2tJTijt9DX4m3ljetdBTROCCl2rStqG594Ddmp Auew== X-Gm-Message-State: ALoCoQmEwuwP0pBiB2RRwbCOCuiEmfVxiXbDAWLyBqgpd0fZ/0uzfPtLSXb7J6jy2AfO2Fci6eBB X-Received: by 10.180.98.197 with SMTP id ek5mr27107764wib.35.1420472996251; Mon, 05 Jan 2015 07:49:56 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id x2sm75891207wjx.9.2015.01.05.07.49.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 07:49:55 -0800 (PST) From: Thomas Monjalon To: Ravi Kerur Date: Mon, 05 Jan 2015 16:49:33 +0100 Message-ID: <1909847.Pe2vrEvq2S@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.6-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <1419521597-31978-7-git-send-email-rkerur@gmail.com> References: <1419521597-31978-1-git-send-email-rkerur@gmail.com> <1419521597-31978-7-git-send-email-rkerur@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 6/7] Move EAL common functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 15:49:56 -0000 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