From owner-svn-src-all@FreeBSD.ORG Fri Jan 27 09:45:45 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BD44106566B; Fri, 27 Jan 2012 09:45:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id EFE818FC08; Fri, 27 Jan 2012 09:45:44 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q0R9jeLU014480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Jan 2012 20:45:41 +1100 Date: Fri, 27 Jan 2012 20:45:40 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alan Cox In-Reply-To: <4F21820B.8040000@rice.edu> Message-ID: <20120127203631.Q1604@besplex.bde.org> References: <201201260955.q0Q9tG1m075353@svn.freebsd.org> <4F21820B.8040000@rice.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r230572 - in head/sys/dev: ixgbe netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 09:45:45 -0000 On Thu, 26 Jan 2012, Alan Cox wrote: > On 01/26/2012 03:55, Luigi Rizzo wrote: >> Log: >> ... >> Netmap-related changes for ixgbe: >> ... >> +#define NKR_PENDINTR 0x1 // Pending interrupt. >> u_int nkr_num_slots; >> >> int nkr_hwofs; /* offset between NIC and netmap ring */ >> struct netmap_adapter *na; // debugging >> struct selinfo si; /* poll/select wait queue */ >> -}; >> +} __attribute__((__aligned__(64))); > > The machine-dependent param.h defines CACHE_LINE_SIZE for use in situations > like this. Also, the machine-independent cdefs.h defines __aligned() for use in situations like this. All cases that use CACHE_LINE_SIZE in an alignment statement spell the alignment statement correctly. The only hard-coded __attribute__() in a line matching CACHE_LINE_SIZE is for CVMX_CACHE_LINE_SIZE in contrib/octeon-sdk/cvmx-utils.h. Perhaps contrib'ed code needs to use hard-coded gccisms instead of hard-coded FreeBSDisms. Bruce