From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 4/4] eal/x86: implement arch-specific TSC freq query Date: Fri, 13 Oct 2017 09:30:43 +0200 Message-ID: <1683017.mmorKbpdtt@xps> References: <20171013000247.4158-5-thomas@monjalon.net> <20171012204724.120d7b25@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: gowrishankar.m@linux.vnet.ibm.com, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org, sergio.gonzalez.monroy@intel.com, bruce.richardson@intel.com, dev@dpdk.org To: Stephen Hemminger Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 1B1C51B63A for ; Fri, 13 Oct 2017 09:30:45 +0200 (CEST) In-Reply-To: <20171012204724.120d7b25@xeon-e3> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/10/2017 05:47, Stephen Hemminger: > On Fri, 13 Oct 2017 02:02:47 +0200 > Thomas Monjalon wrote: > > > +static uint32_t > > +check_model_wsm_nhm(uint8_t model) > > +{ > > + switch (model) { > > + /* Westmere */ > > + case 0x25: > > + case 0x2C: > > + case 0x2F: > > + /* Nehalem */ > > + case 0x1E: > > + case 0x1F: > > + case 0x1A: > > + case 0x2E: > > + return 1; > > + } > > + > > + return 0; > > +} > > How about a table rather than switch? > Also bool rather than int? It is a matter of taste :) I plan to push it as is. It can be changed later if desired.