From owner-cvs-all@FreeBSD.ORG Sun Dec 12 20:52:59 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0D4016A4CE; Sun, 12 Dec 2004 20:52:59 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83D5043D45; Sun, 12 Dec 2004 20:52:59 +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 iBCKrLX5029809; Sun, 12 Dec 2004 12:53:21 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id iBCKrL09029808; Sun, 12 Dec 2004 12:53:21 -0800 Date: Sun, 12 Dec 2004 12:53:21 -0800 From: Brooks Davis To: Ken Smith Message-ID: <20041212205321.GA28802@odin.ac.hmc.edu> References: <200412122012.iBCKCou6068020@repoman.freebsd.org> <20041212204111.GB5503@electra.cse.Buffalo.EDU> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <20041212204111.GB5503@electra.cse.Buffalo.EDU> 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: cvs-src@FreeBSD.org cc: Brooks Davis cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c src/sys/net if.c if.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2004 20:52:59 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 12, 2004 at 03:41:11PM -0500, Ken Smith wrote: > On Sun, Dec 12, 2004 at 08:12:50PM +0000, Brooks Davis wrote: > > brooks 2004-12-12 20:12:50 UTC > >=20 > > FreeBSD src repository > >=20 > > Modified files: (Branch: RELENG_4) > > sbin/ifconfig ifconfig.c=20 > > sys/net if.c if.h=20 > > Log: > > MFC the addition of ifi_datalen to struct if_data and ifconfig support > > for it. The change to struct if_data differs slightly from the one in > > 5.3 in that a pad is added after ifi_xmitquota rather then adding > > ifi_link_state before ifi_recvquota. This is necessicary to maintain > > the 4.x ABI. > > =20 > > Revision Changes Path > > 1.51.2.23 +4 -1 src/sbin/ifconfig/ifconfig.c > > 1.85.2.28 +2 -0 src/sys/net/if.c > > 1.58.2.12 +2 -0 src/sys/net/if.h >=20 > In if.h you are adding new fields that didn't exist before: >=20 > #ifndef _NET_IF_H_ > @@ -97,6 +97,8 @@ struct if_data { > u_char ifi_hdrlen; /* media header length */ > u_char ifi_recvquota; /* polling quota for receive intrs */ > u_char ifi_xmitquota; /* polling quota for xmit intrs */ > + u_char ifi_do_no_use; /* pad for ifi_datalen's position */ > + u_char ifi_datalen; /* length of this data struct */ > u_long ifi_mtu; /* maximum transmission unit */ > u_long ifi_metric; /* routing metric (external only) */ > u_long ifi_baudrate; /* linespeed */ >=20 > So any already compiled executables that use the if_data structure would > be looking for ifi_mtu/ifi_metric/ifi_baudrate in the wrong place after > this change. Are you absolutely sure this is not breaking ABI? ifi_mtu, etc remain in the same location because the two new variables fill in the hidden padding required to align ifi_mtu. I've verified that old and new ifconfigs work with old and new kernels. The change will allow 4.11 ifconfigs to work with 6.x if we add fields to struct if_data (fairly probable). -- 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 --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBvK+/XY6L6fI4GtQRAiAGAJsEXvLVnqQAHhc80Bs0Qegot5pLuQCgmDjK W3wDYVxEy9AmmYUBBhMzV2A= =WdjF -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK--