From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 17:19:05 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E4A41065675; Tue, 13 Dec 2011 17:19:05 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 499E68FC1B; Tue, 13 Dec 2011 17:19:05 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 2D0FD5EF34; Tue, 13 Dec 2011 18:19:04 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> Date: Tue, 13 Dec 2011 18:19:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <725DC34F-2A68-43E2-BE05-3AC76D07F8B5@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1251.1) Cc: Adrian Chadd , freebsd-embedded@FreeBSD.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 17:19:05 -0000 Am 13.12.2011 um 16:41 schrieb Warner Losh: >> I'm using sbin/ifconfig/if_media.c unchanged except for exporting = some of the low level functions for printing and parsing media and = mediaopt. I'm not certain where this code would go to be shared = efficiently. Also, wherever it goes ifconfig still needs to be = buildable for /rescue. >=20 > Unless the code is huge, I'd like to see it in ifconfig as well from a = usability standpoint. Why require yet another application to do this? = We put all the wireless stuff into ifconfig. >=20 > If the infrastructure really is getting in the way, I'd like to look = at ways to make ifconfig more flexible and less in the way. I'm fine with rolling all this into ifconfig, but please note that the = switch configuration has very little to do with the systems ethernet = interfaces. It just so happens that usually one of the systems ethernet = interfaces is also connected to the switch. The PHYs connected to the = switch are completely separate from any interface ifconfig manages*. I = just wanted to simplify my own work by trying to use the existing miibus = code. The commands and the output from my prototype configuration utility are = intentionally similar to ifconfig, but the ioctls go through a separate = cdev, not through the socket ioctl. I believe it would be = counterintuitive to try and fit the switch configuration through the = interface configuration interface, as there is very little overlap = beyond the PHY stuff. If we want to integrate the switch configuration into ifconfig, the = first question from a usability perspective would be how to identify the = switch and it's various configurable entities (ports, vlans, queues, = etc.), since that namespace would be distinct from the ifnet namespace. Stefan * On some switch chip models, one of the built-in PHYs is exposed = through a separate MII, and can be used as any discrete PHY would be = used. But that has little to do with the switch itself. --=20 Stefan Bethke Fon +49 151 14070811