From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 63A755ABA for ; Mon, 9 Mar 2015 14:33:27 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 09 Mar 2015 06:33:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,367,1422950400"; d="scan'208";a="677294490" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.26]) by fmsmga001.fm.intel.com with SMTP; 09 Mar 2015 06:33:24 -0700 Received: by (sSMTP sendmail emulation); Mon, 09 Mar 2015 13:33:23 +0025 Date: Mon, 9 Mar 2015 13:33:23 +0000 From: Bruce Richardson To: Stephen Hemminger Message-ID: <20150309133323.GB7256@bricha3-MOBL3> References: <1425695004-29605-1-git-send-email-stephen@networkplumber.org> <1425695004-29605-3-git-send-email-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425695004-29605-3-git-send-email-stephen@networkplumber.org> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 2/5] ixgbe: make register maps const X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2015 13:33:27 -0000 On Fri, Mar 06, 2015 at 06:23:21PM -0800, Stephen Hemminger wrote: > These are const data structures, just put them in txt segment > rather than having compiler emit code to set them up on the stack. > > Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > index e6aec8f..8706c1e 100644 > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > @@ -860,14 +860,14 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) > { > uint64_t pkt_flags; > > - static uint64_t ip_pkt_types_map[16] = { > + static const uint64_t ip_pkt_types_map[16] = { > 0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT, > PKT_RX_IPV6_HDR, 0, 0, 0, > PKT_RX_IPV6_HDR_EXT, 0, 0, 0, > PKT_RX_IPV6_HDR_EXT, 0, 0, 0, > }; > > - static uint64_t ip_rss_types_map[16] = { > + static const uint64_t ip_rss_types_map[16] = { > 0, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, > 0, PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH, > PKT_RX_RSS_HASH, 0, 0, 0, > -- > 2.1.4 >