From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 5/7] Move EAL common functions Date: Mon, 05 Jan 2015 16:32:31 +0100 Message-ID: <3150215.2ptpoNPSEN@xps13> References: <1419521597-31978-1-git-send-email-rkerur@gmail.com> <1419521597-31978-6-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-6-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 > + 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