From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DYm4bVTnFO+F0jhp5RdqnDE8NB+NykTechNScGgWH/4=; b=WdXy/WQqv/xWDk+RUrrz567U3tgNeRh+KprN9acttS8ndUPqdU9ve2Y8j3fjgOM0EB H3ULP+gFIlEsd5MHLOVrSERXIdd6KbBTOZElyXKNlRVDUgfzAqSk7mi774eNh+raHIPN XlS8InPz/ktDmMgjQS2gPV2T8vDbzqfoZWWifhI+ZKditUdfH9m8cfdepBoNYox4r5MH kgj41O4p/D7RvVWrWwcpCiYSH9dVxdg7N1l2toOTXmA6Qt1C6xfXcHd43a93xgDhecxv 04OLoWCukGSRjewG+NxFodWgS300B90w8wGaxYAZXWgIONImXYSWBPyDhuIjCv5tGt8w ElkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DYm4bVTnFO+F0jhp5RdqnDE8NB+NykTechNScGgWH/4=; b=soMMUtJTLbY7vBUg2F7vGp/W27SDFtU2URhufiPBu0AW7GCplZ53myCS40cPzI4QFj rnEd1iAyVEslT7ldZPzqKi4ZCdz0Ix9GRsbfGvSMVzNIjV56O3qOcFssNNCNUvSsXb/8 1Py8waOWLy9m/W4ILnqQZ09IvBbvUL5VysxGLNo0MoSloz80pSfkJp+bprsH0rrb+Jxi gnlAhGEpJL3QWWQfa+LS3KKk01awjgt8cuFTrziE8wHyKK/hpRXyLtJ5dKg2MsoMyp3u wiomnpbfL00UgMZKs83vaK7GaZcQZ9o8Kzm3tnT3OUqU2FeTHVABZs2wVk+HPUyMuxtp GRvQ== X-Gm-Message-State: AMCzsaXHu7+SMoBr5TJ7TOEUapYzaeiW0iMdDtAa4cSS1I/DOOyg5dlA zVTk03ICqOmmLYbXoejbXDyujCWK1KU= X-Google-Smtp-Source: AOwi7QCetnMAGOgLrEHh6CprlQmp985SR2tkP4MokINFiEgOvtwxWoJ/wU7PewWY1JWrDjJx70ITvQ== X-Received: by 10.99.42.11 with SMTP id q11mr87983pgq.7.1507866452056; Thu, 12 Oct 2017 20:47:32 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id y1sm81450pgp.15.2017.10.12.20.47.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2017 20:47:31 -0700 (PDT) Date: Thu, 12 Oct 2017 20:47:24 -0700 From: Stephen Hemminger To: Thomas Monjalon 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 Message-ID: <20171012204724.120d7b25@xeon-e3> In-Reply-To: <20171013000247.4158-5-thomas@monjalon.net> 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 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 03:47:33 -0000 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?