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 22:14:45 +0100 Message-ID: <21834202.ss7NCRa1zk@xps13> References: <1415381289-43291-1-git-send-email-jyu@vmware.com> <30845403.kPBAiWVWY3@xps13> <20141211141727.GC28213@hmsreliant.think-freely.org> 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: <20141211141727.GC28213-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@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" 2014-12-11 09:17, Neil Horman: > On Thu, Dec 11, 2014 at 01:36:54AM +0100, Thomas Monjalon wrote: > > Hi Neil, > >=20 > > 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 = definitions > > > > will be difficult. It=B9s clearer and a good practice to includ= e header file > > > > explicitly. > > > >=20 > > > You need to include the header file regardless of what you do. T= he 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 behavi= oral changes > > > and run time breakage. > > >=20 > > > 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 p= atch authors > > > will see the existing style and follow suit. Or they won't, and = we'll point out > > > the issue during review. > >=20 > > It should be a different patch for next release cycle. > > Let's apply this fix only for 1.8.0. > >=20 > Why? Theres no harm in doing so now. It's a coding style good practice, not a bug fix. We are now integrating only bug fixes and docs. We have to put a limit to avoid last minutes bugs. --=20 Thomas