From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 079B668BE for ; Thu, 11 Dec 2014 15:18:04 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Xz4Yj-0005hJ-Cl; Thu, 11 Dec 2014 09:17:54 -0500 Date: Thu, 11 Dec 2014 09:17:27 -0500 From: Neil Horman To: Thomas Monjalon Message-ID: <20141211141727.GC28213@hmsreliant.think-freely.org> References: <1415381289-43291-1-git-send-email-jyu@vmware.com> <20141211002838.GA24240@localhost.localdomain> <30845403.kPBAiWVWY3@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30845403.kPBAiWVWY3@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] lib: include rte_memory.h for __rte_cache_aligned 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: Thu, 11 Dec 2014 14:18:04 -0000 On Thu, Dec 11, 2014 at 01:36:54AM +0100, Thomas Monjalon wrote: > Hi Neil, > > 2014-12-10 19:28, Neil Horman: > > On Wed, Dec 10, 2014 at 07:09:03PM +0000, Jia Yu wrote: > > > Hi Neil, > > > > > > Moving __rte_cache_aligned right after struct keyword will help. On the > > > other hand, enforcing this rule for existing (100+) and future definitions > > > will be difficult. Itıs clearer and a good practice to include header file > > > explicitly. > > > > > You need to include the header file regardless of what you do. The advantage to > > placing the macro right after the struct keyword is that failure to include the > > header will result in a compiler error, rather than silent behavioral changes > > and run time breakage. > > > > You don't have to enforce putting the attribute after the struct keyword, I'd > > say just move them now to protect the current code. Subsequent patch authors > > will see the existing style and follow suit. Or they won't, and we'll point out > > the issue during review. > > It should be a different patch for next release cycle. > Let's apply this fix only for 1.8.0. > Why? Theres no harm in doing so now. Neil