From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] eal: add architecture specific rte_cpuflags.c files Date: Tue, 02 Feb 2016 11:20:21 +0100 Message-ID: <1729554.7VcsXzVtRs@xps13> References: <5530206.lovNufpa2q@xps13> <1453983623-20709-1-git-send-email-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Jan Viktorin To: Ferruh Yigit Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 6D0F995C8 for ; Tue, 2 Feb 2016 11:21:33 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id p63so110366338wmp.1 for ; Tue, 02 Feb 2016 02:21:33 -0800 (PST) In-Reply-To: <1453983623-20709-1-git-send-email-ferruh.yigit@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-01-28 12:20, Ferruh Yigit: > Move cpu_feature_table array from arch specific rte_cpuflags.h files to > new arch specific rte_cpuflags.c files. > > Main motivation is to escape from static variable declarations in > header files. cpu_feature_table has many copies in final binary, even > exist in some object files that does not use this variable at all. > > And this can be a sample to create architecture specific source files > and move some functions which are not performance sensitive from > architecture header files to source files. > > v2: > * rebased for DPDK2.3 (16.04) > * added arm arch > * renamed cpu_feature_table[] to rte_cpu_feature_table[] Applied, thanks. Now that we have some .c files for rte_cpuflags, I think some code may be changed. The function rte_cpu_get_features() and the struct feature_entry are really specific to each arch and used only by rte_cpu_get_flag_enabled(). So they can be moved in .c and be more specific (leaf/subleaf is unused for some archs). Then there is no reason to keep rte_cpu_get_flag_enabled() inline.