From owner-freebsd-arch@FreeBSD.ORG Fri Dec 12 20:31:14 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F0F9471; Fri, 12 Dec 2014 20:31:14 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64970E5A; Fri, 12 Dec 2014 20:31:14 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 48B88B913; Fri, 12 Dec 2014 15:31:13 -0500 (EST) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Adding new media types to if_media.h Date: Fri, 12 Dec 2014 15:31:06 -0500 Message-ID: <2116096.l1vR0RuKRU@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201412121439.sBCEdVRU071168@mail.karels.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Dec 2014 15:31:13 -0500 (EST) Cc: Adrian Chadd , Mike Karels , Rui Paulo , "freebsd-net@freebsd.org" , Eric Joyner , Jack Vogel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2014 20:31:14 -0000 On Friday, December 12, 2014 12:26:24 PM Jack Vogel wrote: > I think I'd go along with Mike, keeping it simpler seems like a good idea. > > Jack If the userland ABI impact isn't too broad I think this is fine. Mike, do you know off hand how many user-facing things would be affected? > On Fri, Dec 12, 2014 at 6:39 AM, Mike Karels wrote: > > > Any other thoughts, or should I start looking at seeing what I can take > > > copy from net80211? > > > > > > Also adding -net, since this is pretty relevant. > > > > I had the same reaction as Adrian initially, as an int with numerous > > fields > > seems really messy. However, I don't think we have the challenges of > > 802.11, > > and the only real problem is that the subtype field has run out of bits. > > And both ifconfig and the drivers are cast in the form of a scalar "media > > word", with parameters to ifmedia_add like IFM_ETHER | IFM_1000_T | > > IFM_FDX > > (assuming that all the bits are in a scalar). > > > > Instead, I would propose that we simply change the media word from 32 bits > > to 64, and move the subtype from its current location to a new field (e.g. > > 16 bits) in the new space. I believe this can be KPI compatible, and it > > is relatively easy to provide a backward-compatible ABI. There should be > > a reserved subtype for "other" that can be encoded in the existing field > > for use when the subtype can't fit in the old field. This seems much > > easier, > > can be KPI compatible, and will make it much easier to backport drivers. > > A backport could simply define the new subtypes as "other", and the KPI > > would still be compatible. > > > > Thoughts? > > > > Mike -- John Baldwin