From owner-freebsd-arch@FreeBSD.ORG Thu Sep 2 19:12:18 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC22516A4CE; Thu, 2 Sep 2004 19:12:18 +0000 (GMT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id B29AD43D31; Thu, 2 Sep 2004 19:12:18 +0000 (GMT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id A3EB88803; Thu, 2 Sep 2004 12:12:18 -0700 (PDT) From: Peter Wemm To: freebsd-arch@freebsd.org Date: Thu, 2 Sep 2004 12:12:18 -0700 User-Agent: KMail/1.6.2 References: <20040901193445.GC12483@odin.ac.hmc.edu> <20040902051415.GA23926@odin.ac.hmc.edu> In-Reply-To: <20040902051415.GA23926@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409021212.18344.peter@wemm.org> cc: arch@freebsd.org cc: Garance A Drosihn cc: Julian Elischer Subject: Re: if_data size issues X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2004 19:12:19 -0000 On Wednesday 01 September 2004 10:14 pm, Brooks Davis wrote: > On Wed, Sep 01, 2004 at 09:49:45PM -0400, Garance A Drosihn wrote: > > In a later message, Brooks Davis wrote: > > >Given the pain this change is causing and the limited impact of > > >reducing the precision of ifi_epoch, I propose the following: > > > > > > - Back out the ifi_epoch addition. > > > - MT5 and MT4 Peter's size change. > > > - Turn ifi_unused into ifi_epoch. > > > > Given the time-constraints in that we want a solution "right now", > > these seem like good ideas. > > I've done the backout and will submit Peter's change for MT5 on the > 4th. I'll do the ifi_unused => ifi_epoch change soon, but I need to > verify my theory that I can use a time_t without changing the struct > size. There is only one minor gotcha on this one.. Alpha. sizeof(time_t) == sizeof(u_long) on all our platforms except alpha. (note I said sizeof, not typeof). An additional pad would be needed on alpha to compensate. eg: u_long ifi_hwassist; /* HW offload capabilities */ time_t ifi_epoch; #ifdef __alpha__ u_int ifi_timepad; /* time_t is int, not long on alpha */ #endif struct timeval ifi_lastchange; /* time of last administrative change */ Actually, now that I look at it.. timeval begins with a 'long', so it'll be aligned correctly on alpha anyway, even without adding ifi_timepad. I personally like documenting hidden padding when there are abi issues though. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5