From owner-freebsd-arch@FreeBSD.ORG Thu Sep 2 00:14:34 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 E108E16A4D1; Thu, 2 Sep 2004 00:14:34 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B151A43D2F; Thu, 2 Sep 2004 00:14:34 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id A9E3D7A3E1; Wed, 1 Sep 2004 17:14:34 -0700 (PDT) Message-ID: <413665EA.30003@elischer.org> Date: Wed, 01 Sep 2004 17:14:34 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Brooks Davis References: <20040901193445.GC12483@odin.ac.hmc.edu> <41364415.9040708@elischer.org> <20040902000637.GA4120@odin.ac.hmc.edu> In-Reply-To: <20040902000637.GA4120@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 02 Sep 2004 00:14:35 -0000 Brooks Davis wrote: >On Wed, Sep 01, 2004 at 02:50:13PM -0700, Julian Elischer wrote: > > >>Brooks Davis wrote: >> >> >> >>>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. >>> >>> >>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 >>seconds count that would last >>at least 68 years if expressed as a count from boot time. >> >> > >I dug into the RFCs and found that ifCounterDiscontinuityTime is of type >TimeStamp which is a TimeTick with the epoch of sysUpTime. The >resolution of a TimeTick is 1/100s. Thus, given our choice of counters, >struct timeval is most appropriate. However, in this case, meeting the >letter of the rule is arguably unnecessary. > >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. > - After 5.3 is released, declare that upgrades to 6.0 from releases > other then 4.x (x>=11) and 5.y (y>=3) require special handling and > allow if_data to grow as demand requires. > - If additional precision is deemed necessary at some future date, > add a second ifi_epoch_tv. > sounds ok to me except that it should actually work from 4.x and 5.2 for a while.. say 6 months or so.. a lot of people run along the -current branch but don't upgrade every day.. after 6 months or so probably most of them will have moved onto something that can cope. Are there consumers of this info other than ifconfig? netstat? natd? route? etc? > >-- Brooks > > >