From owner-freebsd-arch@FreeBSD.ORG Wed Sep 1 22:20:16 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 17A8916A4CE; Wed, 1 Sep 2004 22:20:16 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF2F843D3F; Wed, 1 Sep 2004 22:20:15 +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 i81MKdIH017484; Wed, 1 Sep 2004 15:20:39 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i81MKdRV017483; Wed, 1 Sep 2004 15:20:39 -0700 Date: Wed, 1 Sep 2004 15:20:38 -0700 From: Brooks Davis To: Julian Elischer Message-ID: <20040901222038.GA12783@odin.ac.hmc.edu> References: <20040901193445.GC12483@odin.ac.hmc.edu> <41364415.9040708@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <41364415.9040708@elischer.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: scottl@freebsd.org cc: julian@freebsd.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: Wed, 01 Sep 2004 22:20:16 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 01, 2004 at 02:50:13PM -0700, Julian Elischer wrote: >=20 > >My recent commit to net/if.h adding ifi_epoch to struct if_data had > >unintended consequences. Specifically, because of the way ifconfig > >uses RTM_IFINFO routing socket messages via sysctl to obtain interface > >information, the value of sizeof(struct if_data) must be the same in the > >kernel and userland. I have committed a fix from Peter which allows > >ifconfig to handle growth of struct if_data. Unfortunately, this does > >not fix old ifconfigs with new kernels. >=20 > What is the reason that ifi_epoch needs to be accurate the microsecond? > you have a u)long just next door that is unused that could hold a=20 > seconds count that would last > at least 68 years if expressed as a count from boot time. It probably doesn't need to be, but that only puts off the problem by using the last remaining space. I initially used struct timeval because that's what ifi_lastchange used. If we decied to go this route, I'd be inclined to turn that variable into a time_t since it's the right width or smaller on all architectures (I believe struct padding will take care of the extra space on alpha, but we'll need to check). Bumping time_t to 64-bit on 32-bit arches will break the ABI will break due to ifi_lastchange so that's not a consideration. -- 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 --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD4DBQFBNks2XY6L6fI4GtQRAu2jAJURVRLTW9u5ODbbdxmDUtQ0zbJVAJ0StXxx HDy8pjG59+bWD9plZ4hK/w== =YZWG -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH--