Received: with ECARTIS (v1.0.0; list netdev); Thu, 30 Dec 2004 08:11:33 -0800 (PST) Received: from iasrv1.idleaire.net (NS1.idleaire.net [65.220.16.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iBUGB5oo015325 for ; Thu, 30 Dec 2004 08:11:26 -0800 Received: by iasrv1.idleaire.net (Postfix, from userid 300) id F1F42236E88; Thu, 30 Dec 2004 11:16:53 -0500 (EST) Received: from corp4.idleaire.com (corp4.idleaire.com [10.1.66.36]) by iasrv1.idleaire.net (Postfix) with ESMTP id 9E03B236E5B; Thu, 30 Dec 2004 11:16:53 -0500 (EST) Received: from knox.voodoobox.net ([10.1.66.124]) by corp4.idleaire.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 30 Dec 2004 11:16:53 -0500 Subject: Re: [RFC 2.6.10 1/22] xfrm: Add direction information to xfrm_state From: Dave Dillow To: Jan-Benedict Glaw Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: <20041230094839.GX2460@lug-owl.de> References: <20041230035000.01@ori.thedillows.org> <20041230035000.10@ori.thedillows.org> <20041230094839.GX2460@lug-owl.de> Content-Type: text/plain Message-Id: <1104423409.23254.9.camel@dillow.idleaire.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 30 Dec 2004 11:16:49 -0500 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Dec 2004 16:16:53.0581 (UTC) FILETIME=[F9B9AFD0:01C4EE8A] X-Virus-Scanned: ClamAV 0.80/638/Tue Dec 21 14:41:34 2004 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 13249 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dave@thedillows.org Precedence: bulk X-list: netdev On Thu, 2004-12-30 at 04:48, Jan-Benedict Glaw wrote: > On Thu, 2004-12-30 03:48:34 -0500, David Dillow > wrote in message <20041230035000.10@ori.thedillows.org>: > > diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h > > --- a/include/net/xfrm.h 2004-12-30 01:12:08 -05:00 > > +++ b/include/net/xfrm.h 2004-12-30 01:12:08 -05:00 > > @@ -146,6 +146,9 @@ > > /* Private data of this transformer, format is opaque, > > * interpreted by xfrm_type methods. */ > > void *data; > > + > > + /* Intended direction of this state, used for offloading */ > > + int dir; > > }; > > > > enum { > > @@ -157,6 +160,12 @@ > > XFRM_STATE_DEAD > > }; > > > > +enum { > > + XFRM_STATE_DIR_UNKNOWN, > > + XFRM_STATE_DIR_IN, > > + XFRM_STATE_DIR_OUT, > > +}; > > Any specific reason to first define such a nice enum and then using int > in the struct? Just following the current style in net/xfrm.h, see xfrm_state.km.state and XFRM_STATE_*. Though, I probably should have used a u8; easily changed if it is an issue. -- Dave Dillow