Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2012 20:45:40 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Alan Cox <alc@rice.edu>
Cc:        svn-src-head@FreeBSD.org, Luigi Rizzo <luigi@FreeBSD.org>, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org
Subject:   Re: svn commit: r230572 - in head/sys/dev: ixgbe netmap
Message-ID:  <20120127203631.Q1604@besplex.bde.org>
In-Reply-To: <4F21820B.8040000@rice.edu>
References:  <201201260955.q0Q9tG1m075353@svn.freebsd.org> <4F21820B.8040000@rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120127203631.Q1604>