From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com
 [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 7C68A593A
 for <dev@dpdk.org>; Mon,  5 Jan 2015 16:32:54 +0100 (CET)
Received: by mail-wi0-f172.google.com with SMTP id n3so3512539wiv.17
 for <dev@dpdk.org>; Mon, 05 Jan 2015 07:32:54 -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=VeAq5WpI2uS5AKziPALpuZsrK0H3dliHEErdj+3tSHA=;
 b=etzA0KoVxq/VQeP6XGdvBiaYgDFy+yOYDNeJUO32oQllLn5rl0zZb7hmEjI0kMWCSD
 gol5pe79Zyoehq9hxFhjRonmg3o/79RrWkVKuQJffBYwKj89f0GDs48gaA//6hclMN20
 g8bKkM/ecEe1EFXLCXbFLoQGOMr+TfWB8P6Opjdtt4EyoNnD+2XMdS+sZAai3En7hbLA
 AIQQX9/Wwj9YWLxqc4R5xoG00nn06pUOwY/JsLdcGyTCIL+pSXEHLZFxYVoO3ks+IUmn
 8DznEWs0f1EpRVZF3CQxxyAPkyp4DZNmTS/VnKdqBeblJCZMBZlJW2CWHlJcDmGO6LH4
 QtWQ==
X-Gm-Message-State: ALoCoQmnQAy81LNpBlxpAvWG5F9viEGhBUEs81UD/n673zfJeiPNHrC1hqw3ClTy4YA9MxbR1WWt
X-Received: by 10.180.74.236 with SMTP id x12mr27131948wiv.40.1420471973929;
 Mon, 05 Jan 2015 07:32:53 -0800 (PST)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id i3sm56774510wjw.2.2015.01.05.07.32.52
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 05 Jan 2015 07:32:53 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Ravi Kerur <rkerur@gmail.com>
Date: Mon, 05 Jan 2015 16:32:31 +0100
Message-ID: <3150215.2ptpoNPSEN@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-6-git-send-email-rkerur@gmail.com>
References: <1419521597-31978-1-git-send-email-rkerur@gmail.com>
 <1419521597-31978-6-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 5/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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Jan 2015 15:32:54 -0000

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