From owner-cvs-all@FreeBSD.ORG Fri Aug 13 19:25:43 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 A2ED316A4CE; Fri, 13 Aug 2004 19:25:43 +0000 (GMT) Received: from blake.polstra.com (blake.polstra.com [64.81.189.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFCD443D53; Fri, 13 Aug 2004 19:25:41 +0000 (GMT) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (dsl081-189-067.sea1.dsl.speakeasy.net [64.81.189.67]) by blake.polstra.com (8.12.11/8.12.11) with ESMTP id i7DJPZvL050011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Aug 2004 12:25:35 -0700 (PDT) (envelope-from jdp@strings.polstra.com) Received: (from jdp@localhost) by strings.polstra.com (8.12.11/8.12.11/Submit) id i7DJPZ5w010141; Fri, 13 Aug 2004 12:25:35 -0700 (PDT) (envelope-from jdp) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <411D04FE.70304@cronyx.ru> Date: Fri, 13 Aug 2004 12:25:35 -0700 (PDT) From: John Polstra To: Roman Kurakin X-Bogosity: No, tests=bogofilter, spamicity=0.216012, version=0.14.5 cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_tap.c 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: Fri, 13 Aug 2004 19:25:43 -0000 On 13-Aug-2004 Roman Kurakin wrote: > John Polstra wrote: >>On 13-Aug-2004 Roman Kurakin wrote: >>>John Polstra wrote: >>>>On 13-Aug-2004 Roman Kurakin wrote: >>>>>John Polstra wrote: >>>>> >>>>>>That's pretty much correct. IFF_UP is an administrative control >>>>>>that expresses the desired state of the interface. The driver never >>>>>>changes IFF_UP. IFF_RUNNING is the driver's idea of the _actual_ >>>>>> >>>>>PPP state machine can remove IFF_UP. For example if connection is not >>>>>persistent and link >>>>>was broken for any reason. >>>>> >>>>I call that a bug. >>>> >>>This is not a bug, this is feature of protocol. Some times link should >>>go down (or other >>>state from which it could go up only by administrator (or program) >>>intervention). >>> >>Sorry, but I disagree. PPP should clear IFF_RUNNING in that case, >>but should leave IFF_UP untouched. >> > But in that case we need some other way to bring line up again, since we > unable just > to ifconfig XXX up. This is possible to implement but very inconvenient. Actually (having thought about it some more), PPP probably shouldn't even clear IFF_RUNNING in that case. IFF_RUNNING is not supposed to reflect whether the link is active or not. It just reflects whether the driver software is capable of functioning. For example, Ethernet drivers don't change IFF_RUNNING if the link goes away. I don't know for sure how PPP ought to handle the case you're describing. It should mark the link as down (not active) but leave IFF_RUNNING set. Then it should either retry periodically to establish an active link; or it should let the user do that manually via "ifconfig ppp0 down; ifconfig ppp0 up". > Could you describe why is so bad that some administrative action > could be canceled due to protection or some other reasons by device > state machine? Especially if users have a choice to allow this > action or not. If users have a choice this action could be treated > on behalf of administrator and thus like administrative action. Well, it is standard practice to separate administrative controls from driver status bits. That's how all the relevant IEEE standards describe things, for instance. The standards define separate variables, for example "adminEnable" and "operEnable" to reflect the administratively requested state and the actual state, respectively. The first is changed only by management actions, and the second is changed only by the software/hardware/whatever. John