From owner-freebsd-arch@FreeBSD.ORG Thu Sep 2 19:51:03 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 E2B8E16A4CF; Thu, 2 Sep 2004 19:51:03 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEAA443D5E; Thu, 2 Sep 2004 19:51:03 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i82JpWVl011982; Thu, 2 Sep 2004 12:51:32 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i82JpWTw011981; Thu, 2 Sep 2004 12:51:32 -0700 Date: Thu, 2 Sep 2004 12:51:32 -0700 From: Brooks Davis To: Peter Wemm Message-ID: <20040902195132.GA10756@odin.ac.hmc.edu> References: <20040901193445.GC12483@odin.ac.hmc.edu> <20040902051415.GA23926@odin.ac.hmc.edu> <200409021212.18344.peter@wemm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <200409021212.18344.peter@wemm.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: arch@freebsd.org cc: Garance A Drosihn cc: Julian Elischer cc: freebsd-arch@freebsd.org 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:51:04 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 02, 2004 at 12:12:18PM -0700, Peter Wemm wrote: > 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 =3D> ifi_epoch change soon, but I need to > > verify my theory that I can use a time_t without changing the struct > > size. >=20 > There is only one minor gotcha on this one.. Alpha. sizeof(time_t) =3D= =3D=20 > sizeof(u_long) on all our platforms except alpha. (note I said sizeof,= =20 > not typeof). Yup I noticed that. > 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=20 > change */ >=20 > Actually, now that I look at it.. timeval begins with a 'long', so it'll= =20 > be aligned correctly on alpha anyway, even without adding ifi_timepad. = =20 > I personally like documenting hidden padding when there are abi issues=20 > though. I wrote a little test program and yes, alpha keeps the size the same due to padding (I thought it would, but figured the two minutes required to check were worth it. :-). I will use the explict pad though. That will hopefully keep people from being confused in the future. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBN3nEXY6L6fI4GtQRAlZaAKDPSLnZRIakXTAzJ5M9LK7iurUnZgCfTLiY HFRww+3S5GdCOzEpV5uwZoY= =GIam -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--