From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 01:23:09 2003 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 1187916A4CE; Sun, 30 Nov 2003 01:23:09 -0800 (PST) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E5F743F93; Sun, 30 Nov 2003 01:23:05 -0800 (PST) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 2B32365319; Sun, 30 Nov 2003 09:23:04 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07868-01-2; Sun, 30 Nov 2003 09:23:03 +0000 (GMT) Received: from saboteur.dek.spc.org (unknown [82.147.19.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 73A2D6530D; Sun, 30 Nov 2003 09:23:03 +0000 (GMT) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 2F3D3C8; Sun, 30 Nov 2003 09:23:01 +0000 (GMT) Date: Sun, 30 Nov 2003 09:23:01 +0000 From: Bruce M Simpson To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20031130092301.GA98871@saboteur.dek.spc.org> Mail-Followup-To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, sam@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline cc: sam@freebsd.org Subject: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 09:23:09 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, As per Sam's suggestion, I've been working on refactoring ifconfig(8), which has grown increasingly large and unwieldy. Part of the effort has been to get a handle on all of the options we currently support; so I've written a YACC grammar for it. This is my first serious bit of work with YACC so I'd appreciate any feedback you can give. I've uploaded the grammar, makefile, and all the EPS files, here:- http://people.freebsd.org/~bms/dump/nifconfig/ (for browsing) http://people.freebsd.org/~bms/dump/nifconfig.tgz (tarball) I've also generated a PDF file you can view which shows you syntax diagrams for each part of the parse tree. This is here:- http://people.freebsd.org/~bms/dump/nifconfig/all.pdf I can't quite seem to persuade Ebnf2ps to generate a recursive unfolding of all productions from argv downwards, though, that would be most helpful. This involved rolling two ports, epsmerge and Ebnf2ps, to visualize the syntax graphically. I will commit these ports once the freeze as over as they're likely to be useful to a lot of people. Please let me know your thoughts on this. Thanks, BMS --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQE/ybb0ueUpAYYNtTsRAnr4AJ0cZTHuRjo+R2E8FRmi0avsjMemPQCdGMNw unxO7VBNq6BLgQJtO5ERFJQ= =O7CL -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY-- From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 04:12:50 2003 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 3DCB016A4D0 for ; Sun, 30 Nov 2003 04:12:50 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id D609043F75 for ; Sun, 30 Nov 2003 04:12:45 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 31712 invoked from network); 30 Nov 2003 11:10:50 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 30 Nov 2003 11:10:50 -0000 Message-ID: <3FC9DEBA.BD5AC227@freebsd.org> Date: Sun, 30 Nov 2003 13:12:42 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Bruce M Simpson References: <20031130092301.GA98871@saboteur.dek.spc.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 12:12:50 -0000 Bruce M Simpson wrote: > > Hi all, > > As per Sam's suggestion, I've been working on refactoring ifconfig(8), > which has grown increasingly large and unwieldy. Part of the effort has > been to get a handle on all of the options we currently support; so I've > written a YACC grammar for it. > > This is my first serious bit of work with YACC so I'd appreciate any > feedback you can give. > > I've uploaded the grammar, makefile, and all the EPS files, here:- > http://people.freebsd.org/~bms/dump/nifconfig/ (for browsing) > http://people.freebsd.org/~bms/dump/nifconfig.tgz (tarball) > > I've also generated a PDF file you can view which shows you syntax diagrams > for each part of the parse tree. This is here:- > http://people.freebsd.org/~bms/dump/nifconfig/all.pdf > > I can't quite seem to persuade Ebnf2ps to generate a recursive unfolding > of all productions from argv downwards, though, that would be most helpful. > > This involved rolling two ports, epsmerge and Ebnf2ps, to visualize the > syntax graphically. I will commit these ports once the freeze as over as > they're likely to be useful to a lot of people. > > Please let me know your thoughts on this. I think this refactoring of ifconfig is very good. I haven't read the yacc grammar as I have never worked with yacc before, so I can't comment on your implementation. What I've thinking about a lot is to make the networking system and ifconfig sort of class-based like newbus and geom. For example having a general ieee802-class for all interfaces which belong into that group (10/100/1000BaseTX, WirelessLAN, etc.) would be great. Then there are more specific sub-classes for media-types like 802.11 if they have properties which go further than the general ieee802 functions. For example the ieee802-class would implement general functionality which is available with all ieee802 media-types like VLAN, priority tagging, link authentication and so on. The 802.11-class would implement things like channel selection, operating mode, encryption keys and so on. Some functions in the general classes have direct representations in the interface namespace. For example I'd like to be able to specify a interface in a VLAN like this: ifconfig fxp0.2 inet ... which would clone fxp0 and put the cloned interface into VLAN number two. This works generally for all ieee802-class interfaces. Commands for 802.11 would only be available for WLAN interfaces. A channelized T1/E1 card like the LAN Media cards could be configured like this: ifconfig lmc0/1-32 which would take E1 channels one to thirty-two into this interface. When you have fractional bandwidth it would look like lmc0/1-4 for 256kbit. Or make a second interface with channels 5-8 with ifconfig lmc0/5-8. An overlap of channels is prohibited of course. It get's ever better with a T3/E3 interface ifconfig env0/5/1-4 which would select channels one to four out of the fifth E1 in the E3 pipe. Repeat that with OCx or STMx interfaces. However the interpretation of the command line is done by the class the interface is in. -- Andre From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 05:58:11 2003 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 6D48E16A4CE; Sun, 30 Nov 2003 05:58:11 -0800 (PST) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCDDA43F75; Sun, 30 Nov 2003 05:58:09 -0800 (PST) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 93296651FC; Sun, 30 Nov 2003 13:58:08 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09857-03; Sun, 30 Nov 2003 13:58:08 +0000 (GMT) Received: from saboteur.dek.spc.org (unknown [82.147.19.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 010DA651FA; Sun, 30 Nov 2003 13:58:08 +0000 (GMT) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 4AEFAC8; Sun, 30 Nov 2003 13:58:05 +0000 (GMT) Date: Sun, 30 Nov 2003 13:58:05 +0000 From: Bruce M Simpson To: Andre Oppermann Message-ID: <20031130135805.GA80639@saboteur.dek.spc.org> Mail-Followup-To: Andre Oppermann , freebsd-hackers@freebsd.org, sam@freebsd.org, freebsd-arch@freebsd.org References: <20031130092301.GA98871@saboteur.dek.spc.org> <3FC9DEBA.BD5AC227@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FC9DEBA.BD5AC227@freebsd.org> cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 13:58:11 -0000 On Sun, Nov 30, 2003 at 01:12:42PM +0100, Andre Oppermann wrote: > What I've thinking about a lot is to make the networking system and > ifconfig sort of class-based like newbus and geom. Look at: http://people.freebsd.org/~bms/dump/nifconfig/nifconfig-design.txt There is a pending change to if_gre to enable it to be easily classified in this way; ifconfig would simply query the interface for its if_type. This is one way to do it without having to change struct ifnet. We could add a new field, but avoiding changing the ABI is a Good Thing. BMS From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 11:23:33 2003 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 BF6F016A4CE; Sun, 30 Nov 2003 11:23:33 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BDF543FE0; Sun, 30 Nov 2003 11:23:30 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id hAUJKpMg067769; Sun, 30 Nov 2003 14:20:51 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hAUJKoET067766; Sun, 30 Nov 2003 14:20:51 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 30 Nov 2003 14:20:50 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Bruce M Simpson In-Reply-To: <20031130135805.GA80639@saboteur.dek.spc.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: Andre Oppermann cc: freebsd-arch@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 19:23:33 -0000 On Sun, 30 Nov 2003, Bruce M Simpson wrote: > On Sun, Nov 30, 2003 at 01:12:42PM +0100, Andre Oppermann wrote: > > What I've thinking about a lot is to make the networking system and > > ifconfig sort of class-based like newbus and geom. > > Look at: http://people.freebsd.org/~bms/dump/nifconfig/nifconfig-design.txt > > There is a pending change to if_gre to enable it to be easily classified > in this way; ifconfig would simply query the interface for its if_type. > This is one way to do it without having to change struct ifnet. We could > add a new field, but avoiding changing the ABI is a Good Thing. if_type seems like it will work for high level classes of interfaces, but something more fine-grained will be required for interfaces that implement multiple classes or subclasses (i.e., 802 generally, and also 802.11b). Or likewise, tap interfaces might implement 802 generally, but also if_tap-specific primitives. Do we need to probe by-name for capabilities using interface ioctls, or return a "list" of implemented interfaces/classes to allow things to be a bit more multidimensional? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 14:38:42 2003 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 AE0CF16A4D0; Sun, 30 Nov 2003 14:38:42 -0800 (PST) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9461A43FEC; Sun, 30 Nov 2003 14:38:35 -0800 (PST) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 7A3FA651EE; Sun, 30 Nov 2003 19:42:22 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13088-02; Sun, 30 Nov 2003 19:42:21 +0000 (GMT) Received: from saboteur.dek.spc.org (unknown [82.147.19.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id A1716651EB; Sun, 30 Nov 2003 19:42:21 +0000 (GMT) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id C5E7B1C; Sun, 30 Nov 2003 19:42:20 +0000 (GMT) Date: Sun, 30 Nov 2003 19:42:20 +0000 From: Bruce M Simpson To: Robert Watson Message-ID: <20031130194220.GB36456@saboteur.dek.spc.org> Mail-Followup-To: Robert Watson , freebsd-hackers@freebsd.org, sam@freebsd.org, Andre Oppermann , freebsd-arch@freebsd.org References: <20031130135805.GA80639@saboteur.dek.spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: Andre Oppermann cc: freebsd-arch@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 22:38:42 -0000 On Sun, Nov 30, 2003 at 02:20:50PM -0500, Robert Watson wrote: > if_type seems like it will work for high level classes of interfaces, but > something more fine-grained will be required for interfaces that implement > multiple classes or subclasses (i.e., 802 generally, and also 802.11b). The idea just now is we look at if_media if we need to get specific with physical interfaces. tap would seem to be missing from my list, actually; I note it's used to provide VMware support in the absence of Netgraph, amongst other things. > Or likewise, tap interfaces might implement 802 generally, but also > if_tap-specific primitives. Do we need to probe by-name for capabilities > using interface ioctls, or return a "list" of implemented > interfaces/classes to allow things to be a bit more multidimensional? That might work well, actually -- I already added a MIB to rtsock to deal with our lack of reporting multicast group memberships, I see no reason not to add one to enumerate loaded interface classes. OTOH, for the 'could load kld' case, this falls down, until the instance is created, either through cloning or completing ifattach() for a physical interface -- but if CREATE is a separate operation this isn't a problem, it is a problem if we want to say something like this in one go:- ifconfig gif0 create tunnel 1.2.3.4 5.6.7.8 10.0.0.1 10.0.0.2 Then you do need a means for the ifconfig instance to ask gif0 if it speaks 'tunnel-ese' once it's loaded. I have to find an abstraction to comfortably deal with this stacking of properties/methods, simple polymorphism (a la Java 'implements interface') springs to mind. BMS From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 14:43:48 2003 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 C489A16A4CE; Sun, 30 Nov 2003 14:43:48 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4387543FB1; Sun, 30 Nov 2003 14:43:47 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id hAUMf8Mg072069; Sun, 30 Nov 2003 17:41:08 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hAUMf8WI072066; Sun, 30 Nov 2003 17:41:08 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 30 Nov 2003 17:41:08 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Bruce M Simpson In-Reply-To: <20031130194220.GB36456@saboteur.dek.spc.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: Andre Oppermann cc: freebsd-arch@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 22:43:49 -0000 On Sun, 30 Nov 2003, Bruce M Simpson wrote: > On Sun, Nov 30, 2003 at 02:20:50PM -0500, Robert Watson wrote: > > if_type seems like it will work for high level classes of interfaces, but > > something more fine-grained will be required for interfaces that implement > > multiple classes or subclasses (i.e., 802 generally, and also 802.11b). > > The idea just now is we look at if_media if we need to get specific with > physical interfaces. > > tap would seem to be missing from my list, actually; I note it's used to > provide VMware support in the absence of Netgraph, amongst other things. if_tap is actually quite useful, and in the same general class of synthetic interfaces as if_tun. I've used both in building tunneling and topology-manipulation tools, as well as for debugging routing, etc. if_tap simulates an 802 device, and if_tun simulates a point-to-point device. VMware is the only application I know of using if_tap, although I have a fair amount of my own code that uses it. Userland ppp uses if_tun, as to some of the third party crypto tunneling tools. > > Or likewise, tap interfaces might implement 802 generally, but also > > if_tap-specific primitives. Do we need to probe by-name for capabilities > > using interface ioctls, or return a "list" of implemented > > interfaces/classes to allow things to be a bit more multidimensional? > > That might work well, actually -- I already added a MIB to rtsock to > deal with our lack of reporting multicast group memberships, I see no > reason not to add one to enumerate loaded interface classes. > > OTOH, for the 'could load kld' case, this falls down, until the instance > is created, either through cloning or completing ifattach() for a > physical interface -- but if CREATE is a separate operation this isn't a > problem, it is a problem if we want to say something like this in one > go:- > > ifconfig gif0 create tunnel 1.2.3.4 5.6.7.8 10.0.0.1 10.0.0.2 > > Then you do need a means for the ifconfig instance to ask gif0 if it > speaks 'tunnel-ese' once it's loaded. > > I have to find an abstraction to comfortably deal with this stacking of > properties/methods, simple polymorphism (a la Java 'implements > interface') springs to mind. I think that would be a reasonable approach, although it seems to me that both the "inheritance" and "implements" models might apply in looking at sets of protocol relationships. a tap interface is a synthetic interface, it implements synthetic interface controls, as well as implementing 802. However, it might be neat to hook up 802.11 to a tap-like interface sometime as well. Question: does 802.11 imply 802? If so, a notion of inheritence might be quite useful for driver implementors. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 15:29:10 2003 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 C00D116A4CE for ; Sun, 30 Nov 2003 15:29:10 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0FF543FBF for ; Sun, 30 Nov 2003 15:29:02 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 78094 invoked from network); 30 Nov 2003 22:27:07 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 30 Nov 2003 22:27:07 -0000 Message-ID: <3FCA7D3A.CA05EC36@freebsd.org> Date: Mon, 01 Dec 2003 00:28:58 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Bruce M Simpson cc: freebsd-arch@freebsd.org cc: sam@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Sun, 30 Nov 2003 23:29:10 -0000 Robert Watson wrote: > > On Sun, 30 Nov 2003, Bruce M Simpson wrote: > > I have to find an abstraction to comfortably deal with this stacking of > > properties/methods, simple polymorphism (a la Java 'implements > > interface') springs to mind. > > I think that would be a reasonable approach, although it seems to me that > both the "inheritance" and "implements" models might apply in looking at > sets of protocol relationships. a tap interface is a synthetic interface, > it implements synthetic interface controls, as well as implementing 802. > However, it might be neat to hook up 802.11 to a tap-like interface > sometime as well. Question: does 802.11 imply 802? If so, a notion of > inheritence might be quite useful for driver implementors. Yes, 802.11 implies 802. You can get a nice overview of ieee802 and its subclasses and media-types here: http://standards.ieee.org/getieee802/portfolio.html http://standards.ieee.org/getieee802/download/802-2001.pdf You've got the ieee802 base framework, the ieee802.1 bridging and management, the ieee802.2 logical link control and the various MAC and PHY types in 802.3 to 802.16 (with the exception of 802.10 which is an encryption layer for all 802 media). The most known and important of the 802.1 generic classes are 802.1d for bridging, 802.1q for virtual LAN's and 802.1X for port based access control. Those apply to all 802 subclasses be it Ethernet (802.3) or Wireless LAN (802.11). -- Andre From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 21:18:22 2003 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 4B35A16A4CE; Sun, 30 Nov 2003 21:18:22 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1031243FBF; Sun, 30 Nov 2003 21:18:17 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p2/8.12.9) with ESMTP id hB15I6gt007086; Sun, 30 Nov 2003 22:18:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 30 Nov 2003 22:17:57 -0700 (MST) Message-Id: <20031130.221757.99200343.imp@bsdimp.com> To: gurney_j@efn.org From: "M. Warner Losh" In-Reply-To: <20031130070704.GA64793@funkthat.com> References: <3FBE54D0.9000901@cronyx.ru> <20031130070704.GA64793@funkthat.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org cc: freebsd-current@freebsd.org cc: rik@cronyx.ru Subject: Re: MAJOR number 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: Mon, 01 Dec 2003 05:18:22 -0000 In message: <20031130070704.GA64793@funkthat.com> John-Mark Gurney writes: : There are still major numbers for a few devices that may are standard : (such as zero/null), but not common... I've already assigned him one. : > I've read that FreeBSD doesn't use them any more. : > But we may need it to not interfere with other device : > drivers in previous releases of FreeBSD. : : so, you are planning do do 4.x and earlier releases of your driver? Yes. Warner From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 03:07:11 2003 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 9F00316A4CE; Sun, 30 Nov 2003 03:07:11 -0800 (PST) Received: from VARK.homeunix.com (adsl-68-121-163-164.dsl.pltn13.pacbell.net [68.121.163.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 761C143FEA; Sun, 30 Nov 2003 03:07:10 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.9/8.12.9) with ESMTP id hAUB4gen034956; Sun, 30 Nov 2003 03:04:42 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.9/8.12.9/Submit) id hAUB4fe1034955; Sun, 30 Nov 2003 03:04:41 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Sun, 30 Nov 2003 03:04:41 -0800 From: David Schultz To: Jay Sern Liew Message-ID: <20031130110441.GA34017@VARK.homeunix.com> Mail-Followup-To: Jay Sern Liew , freebsd-threads@FreeBSD.ORG References: <20031129183810.M90959@pinnacle.schulte.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031129183810.M90959@pinnacle.schulte.org> X-Mailman-Approved-At: Mon, 01 Dec 2003 05:01:50 -0800 cc: freebsd-threads@FreeBSD.ORG Subject: Re: thread/process & memory management source code 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: Sun, 30 Nov 2003 11:07:11 -0000 [Redirected to threads@; please avoid spamming multiple lists.] On Sat, Nov 29, 2003, Jay Sern Liew wrote: > Can someone point to me the specific location in the FreeBSD kernel source > where the code for FreeBSD's thread/process & memory management are? > > Specifically, where the dispatcher and scheduler is implemented, > what kind of scheduling algorithms(short term, long term) are used, > where the dynamic storage allocation algorithm is implemented(I'll try > to figure the algorithm used from the code), etc. For short term scheduling, FreeBSD uses the standard Unix decay-usage priority scheduling. There is also an experimental scheduler called ULE, which is designed to work better on SMPs. ULE uses an ad hoc idea about how ``interactive'' a process is in order to make scheduling decisions. See kern_switch.c, sched_4bsd.c, sched_ule.c in src/sys/kern. Long term scheduling is less important than it used to be, but FreeBSD has a swapout daemon that kicks in when the system can't recover enough memory by paging alone. It will basically swap out every process it can that is idle and hasn't already been swapped out recently. Swapping in occurs according in the order of a priority that is based on the interactivity of the process, the time it has been swapped out, and its nice value. See src/sys/vm/vm_glue.c. The primary kernel memory allocator is a slab allocator. See src/sys/vm/uma_*.c, src/sys/kern/kern_malloc.c, and http://citeseer.nj.nec.com/bonwick94slab.html. From owner-freebsd-arch@FreeBSD.ORG Mon Dec 1 20:43:59 2003 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 6F14016A4CE for ; Mon, 1 Dec 2003 20:43:59 -0800 (PST) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A07D43F3F for ; Mon, 1 Dec 2003 20:43:56 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) hB24hu8u099177 for ; Mon, 1 Dec 2003 20:43:56 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost)hB24hueB099176 for freebsd-arch@freebsd.org; Mon, 1 Dec 2003 20:43:56 -0800 (PST) (envelope-from kargl) From: "Steven G. Kargl" Message-Id: <200312020443.hB24hueB099176@troutmask.apl.washington.edu> To: freebsd-arch@freebsd.org Date: Mon, 1 Dec 2003 20:43:55 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL99f (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Subject: C99 implementations of and 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: Tue, 02 Dec 2003 04:43:59 -0000 Is anyone currently working on an implementation of C99's and functionality? If so, do you have code you are willing to share with the project? -- Steve http://troutmask.apl.washington.edu/~kargl/ From owner-freebsd-arch@FreeBSD.ORG Mon Dec 1 22:07:51 2003 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 CA1B616A4CE; Mon, 1 Dec 2003 22:07:51 -0800 (PST) Received: from westhost42.westhost.net (westhost42.westhost.net [216.71.84.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94E2743F85; Mon, 1 Dec 2003 22:07:43 -0800 (PST) (envelope-from mini@freebsd.org) Received: from [10.0.1.18] (12-228-118-118.client.attbi.com [12.228.118.118]) by westhost42.westhost.net (8.11.6/8.11.6) with ESMTP id hB267gV00568; Tue, 2 Dec 2003 00:07:42 -0600 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Jonathan Mini Date: Mon, 1 Dec 2003 22:08:15 -0800 To: Robert Watson X-Mailer: Apple Mail (2.606) cc: freebsd-hackers@freebsd.org cc: sam@freebsd.org cc: freebsd-arch@freebsd.org cc: Andre Oppermann cc: Bruce M Simpson Subject: Re: ifconfig(8) refactoring -- YACC grammar now online 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: Tue, 02 Dec 2003 06:07:51 -0000 On Nov 30, 2003, at 2:41 PM, Robert Watson wrote: > if_tap is actually quite useful, and in the same general class of > synthetic interfaces as if_tun. I've used both in building tunneling > and > topology-manipulation tools, as well as for debugging routing, etc. > if_tap simulates an 802 device, and if_tun simulates a point-to-point > device. VMware is the only application I know of using if_tap, > although I > have a fair amount of my own code that uses it. Userland ppp uses > if_tun, > as to some of the third party crypto tunneling tools. F5 uses if_tap for management traffic, as our internal framework looks a lot more like an 802 environment than a point-to-point link. Both if_tap and if_tun are quite handy, given different types of projects. -- Jonathan Mini mini@freebsd.org http://www.freebsd.org From owner-freebsd-arch@FreeBSD.ORG Thu Dec 4 01:10:17 2003 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 97B2616A4CE for ; Thu, 4 Dec 2003 01:10:17 -0800 (PST) Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.157.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2F4343F93 for ; Thu, 4 Dec 2003 01:10:14 -0800 (PST) (envelope-from mark@grondar.org) Received: from storm.FreeBSD.org.uk (Ugrondar@localhost [127.0.0.1]) hB49ACHL056831; Thu, 4 Dec 2003 09:10:12 GMT (envelope-from mark@grondar.org) Received: (from Ugrondar@localhost)hB49ACg4056830; Thu, 4 Dec 2003 09:10:12 GMT (envelope-from mark@grondar.org) X-Authentication-Warning: storm.FreeBSD.org.uk: Ugrondar set sender to mark@grondar.org using -f Received: from grondar.org (localhost [127.0.0.1])hB499KDw028286; Thu, 4 Dec 2003 09:09:21 GMT (envelope-from mark@grondar.org) From: Mark Murray Message-Id: <200312040909.hB499KDw028286@grimreaper.grondar.org> To: "Steven G. Kargl" In-Reply-To: Your message of "Mon, 01 Dec 2003 20:43:55 PST." <200312020443.hB24hueB099176@troutmask.apl.washington.edu> Date: Thu, 04 Dec 2003 09:09:19 +0000 Sender: mark@grondar.org X-Spam-Status: No, hits=1.2 required=5.0 tests=EMAIL_ATTRIBUTION,FROM_NO_LOWER,IN_REP_TO version=2.55 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-arch@freebsd.org Subject: Re: C99 implementations of and 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, 04 Dec 2003 09:10:17 -0000 "Steven G. Kargl" writes: > Is anyone currently working on an implementation of C99's > and functionality? If so, do you have > code you are willing to share with the project? I have some stuff that I'll share early in the new year. :-) M -- Mark Murray iumop ap!sdn w,I idlaH