From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 4/4] eal/x86: implement arch-specific TSC freq query Date: Thu, 12 Oct 2017 20:47:24 -0700 Message-ID: <20171012204724.120d7b25@xeon-e3> References: <20171013000247.4158-1-thomas@monjalon.net> <20171013000247.4158-5-thomas@monjalon.net> 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: Thomas Monjalon Return-path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id E69ED1B65A for ; Fri, 13 Oct 2017 05:47:32 +0200 (CEST) Received: by mail-pf0-f179.google.com with SMTP id z11so8015831pfk.4 for ; Thu, 12 Oct 2017 20:47:32 -0700 (PDT) In-Reply-To: <20171013000247.4158-5-thomas@monjalon.net> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?