From owner-freebsd-arch@FreeBSD.ORG Thu Feb 26 14:21:49 2015 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 124D819C; Thu, 26 Feb 2015 14:21:49 +0000 (UTC) Received: from mail.karels.net (mail.karels.net [63.231.190.5]) by mx1.freebsd.org (Postfix) with ESMTP id 97314C33; Thu, 26 Feb 2015 14:21:48 +0000 (UTC) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.14.7/8.14.7) with ESMTP id t1QELflw056051; Thu, 26 Feb 2015 08:21:42 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <201502261421.t1QELflw056051@mail.karels.net> To: Hans Petter Selasky From: Mike Karels Reply-to: mike@karels.net Subject: Re: Adding new media types to if_media.h In-reply-to: Your message of Thu, 26 Feb 2015 10:39:02 +0100. <54EEE9B6.6090106@selasky.org> Date: Thu, 26 Feb 2015 08:21:41 -0600 Cc: "freebsd-net@freebsd.org" , Eric Joyner , Gleb Smirnoff , Jack Vogel , "freebsd-arch@freebsd.org" 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: Thu, 26 Feb 2015 14:21:49 -0000 > I'm doing some work for Mellanox and we need some 100GBase types for > coming hardware products too. > I think we are not using the 32-bits of "ifm_media" well enough. > Has it been discussed to add more bits to "IFM_NMASK" and have more > ethernet types like IFM_ETHER_0, IFM_ETHER_1, IFM_ETHER_2, IFM_ETHER_3 .... > Currently 5 IFM types are defined. If 2 more bits can be added to > IFM_NMASK we have 5 bits total giving us 2**5 = 32 IFM types. Then it > should be possible to define "(32 - 5) * 32 = 864" more ethernet types, > which I think should be enough for now - or we add even one more bit to > IFM_NMASK ? Did you have specific bits in mind? I'm fairly sure they are all assigned to something now. The adjacent bits are used for the subtype/variant and options. Most of the options are used, maybe not all. I haven't checked whether the "instance" field is still used, though. It was for MII PHY numbers, I believe. If we had more bits, it seems better to put them directly into the subtype field rather than the type field. Mike