[dpdk-dev] [PATCH 5/7] Move EAL common functions

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jan 5 16:32:31 CET 2015


2014-12-25 10:33, Ravi Kerur:
> +#ifdef RTE_EXEC_ENV_BSDAPP
> +		const unsigned ncpus = get_ncpus();
> +
> +		lcore_config[lcore_id].detected = (lcore_id < ncpus);
> +#else /* RTE_EXEC_ENV_BSDAPP */
> +		lcore_config[lcore_id].detected = cpu_detected(lcore_id);
> +#endif /* RTE_EXEC_ENV_BSDAPP */

It would be nice to remove this ifdef by implementing cpu_detected() for BSD.

> +#ifdef RTE_EXEC_ENV_BSDAPP
> +		RTE_LOG(DEBUG, EAL, "Detected lcore %u\n",
> +				lcore_id);
> +#else /* RTE_EXEC_ENV_BSDAPP */
> +		RTE_LOG(DEBUG, EAL, "Detected lcore %u as "
> +				"core %u on socket %u\n",
> +				lcore_id, lcore_config[lcore_id].core_id,
> +				lcore_config[lcore_id].socket_id);
> +#endif /* RTE_EXEC_ENV_BSDAPP */

I think we should keep only the (full) Linux version
and remove this ifdef.
It can be done in a subsequent patch in the serie.

Thanks
-- 
Thomas


More information about the dev mailing list