From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BC76420CDF; Fri, 13 Oct 2017 03:30:44 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 13 Oct 2017 03:30:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=GmI1PUJiWPJqcnSEY+uJ51rmnM VzzUOk5yQrEA46FXY=; b=nDuq20px3wEdQ3zhWwJKArg7szrXQzmM8Oya++CMQS j3haKlBL2BeigqzwckrvcoahWldElUT/9Wq0/opnU7uJPw/6fx7ntlx1kdMbrc43 4pzTG+lz5DQiCU46ewejkNGGXfAn+j8k7+MJX4E+/nD0qmKX7WZ/TgmWmydPOZrO w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=GmI1PU JiWPJqcnSEY+uJ51rmnMVzzUOk5yQrEA46FXY=; b=GFxGh2hhozigFG4MMSxjFN Q2IwpMpO/vNrCj9PMsaIUwNTel5l7W0t2ttGcF5YPLbvyhtJNnWXd+hoUlYn2Flj p1P/oJjpaS94HW6Q7LfZYbCrWW9a+Q+5T5cHKYwAOD2NHSvQWe/vNpsdF6QOcnUG lTldruJhQTivEIyw5Q7hu6lQGidT8giyvv3+kwMuS2SLYbWezYn9KWp8/rgzXQif VCoiZK2pRbALWyl3RI9NboDM7xBp9S4SmFz6zINa6OjG5NnJLEmthrKUQJRIK2Yy WSDtsM7PxBTuo+Onav/3nttTAxKif8uagoWdGb7h7X2zMkwwqPc45AgFfejpDaIA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C0FE24739; Fri, 13 Oct 2017 03:30:44 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger 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 Date: Fri, 13 Oct 2017 09:30:43 +0200 Message-ID: <1683017.mmorKbpdtt@xps> In-Reply-To: <20171012204724.120d7b25@xeon-e3> References: <20171013000247.4158-5-thomas@monjalon.net> <20171012204724.120d7b25@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 07:30:46 -0000 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.