From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: lib: include rte_memory.h for __rte_cache_aligned Date: Thu, 11 Dec 2014 01:36:54 +0100 Message-ID: <30845403.kPBAiWVWY3@xps13> References: <1415381289-43291-1-git-send-email-jyu@vmware.com> <20141211002838.GA24240@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Neil Horman Return-path: In-Reply-To: <20141211002838.GA24240-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Neil, 2014-12-10 19:28, Neil Horman: > On Wed, Dec 10, 2014 at 07:09:03PM +0000, Jia Yu wrote: > > Hi Neil, > >=20 > > Moving __rte_cache_aligned right after struct keyword will help. On= the > > other hand, enforcing this rule for existing (100+) and future defi= nitions > > will be difficult. It=B9s clearer and a good practice to include he= ader file > > explicitly. > >=20 > You need to include the header file regardless of what you do. The a= dvantage to > placing the macro right after the struct keyword is that failure to i= nclude the > header will result in a compiler error, rather than silent behavioral= changes > and run time breakage. >=20 > You don't have to enforce putting the attribute after the struct keyw= ord, 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'l= l 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. --=20 Thomas