[dpdk-dev] [PATCH v9 2/3] Move common functions in eal_timer.c

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jul 27 01:32:18 CEST 2015


2015-07-25 12:36, Ravi Kerur:
> +static void
> +set_tsc_freq_fallback(void)
> +{
> +	RTE_LOG(WARNING, EAL, "WARNING: clock_gettime cannot use "
> +		"CLOCK_MONOTONIC_RAW and HPET is not available"

Not generic enough for BSD.
We can say "TSC frequency estimated roughly"

> +		" - clock timings may be less accurate.\n");
> +	/* assume that the sleep(1) will sleep for 1 second */
[...]
> +/**
> + * This function sets TSC frequency from sysctl

It is not the style of the file to start with "This function..."

> + * for BSD and from clock for Linux.
> + * Is a wrapper function for BSD which will
> + * internally call set_tsc_freq_from_sysctl.

This sentence is an implementation detail.



More information about the dev mailing list