From owner-freebsd-arch@FreeBSD.ORG Tue Dec 9 09:06:08 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 33640F60; Tue, 9 Dec 2014 09:06:08 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6F245E5; Tue, 9 Dec 2014 09:06:07 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id z10so192700pdj.0 for ; Tue, 09 Dec 2014 01:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:cc:content-type; bh=LocTVtiW5mvtcmdCS9wizVH/iXgfoffJlWaH1uZ36pM=; b=owfazaW75P3+qvrxO3zaTYyKX5cM324aWt1I0KHOD46C38WesrNNBYsQvrCM6BNOsX zpl9ddEjpL1D+cnRLiC+ViVOyo4DBPowjm6aaKAe2UIL7mC5VrOBQe2eMh5Xv0859h+K ItFlXbYNX455kCBYsROdwpwrZqViOn7kQzKV80P4m38C0oTy2otHbnw1eZLZ2q78HyxF KaBq4zp9cmc8gVRfitNYO9+WBd3nxtMEmI/ay6IuTpym/6NS0gOTAZ6v7ClGTKpcMg0v SBqWdNJrKh7vOs+KsPoEnCotFN//G2L00GHpCMK2dHlqLriTTYCA8YP8BhaJCOECjpAN KXdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erj.cc; s=ericroxx; h=mime-version:sender:from:date:message-id:subject:to:cc:content-type; bh=LocTVtiW5mvtcmdCS9wizVH/iXgfoffJlWaH1uZ36pM=; b=Ttmo4CmvgQJkdqGzw9fXY/z0LAQ+kLU7XI4YV/OGoyDDQnepYKuyff6jSR4qT7Ay7K yDz12ci8U8Kih/sHY22UDczv9FVTtgOiFyBsXLoYG4KQ7WWceheLE1/0H9WO/ucYT7p8 KEVdk85ocBeZFQUuF68Ytb08xF1u/CYAbWhGQ= X-Received: by 10.70.22.227 with SMTP id h3mr29091912pdf.160.1418115967312; Tue, 09 Dec 2014 01:06:07 -0800 (PST) MIME-Version: 1.0 Sender: ricera10@gmail.com Received: by 10.70.89.209 with HTTP; Tue, 9 Dec 2014 01:05:27 -0800 (PST) From: Eric Joyner Date: Tue, 9 Dec 2014 01:05:27 -0800 X-Google-Sender-Auth: 75VpiSZ0ZB-pRgX27TGWJKywKSE Message-ID: Subject: Adding new media types to if_media.h To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Adrian Chadd , Jack F 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: Tue, 09 Dec 2014 09:06:08 -0000 This is a continuation of a discussion from off the list: ixgbe needs to support devices with media types that aren't in if_media.h; for now those are 10GBaseKR, 10GBaseKX4, and 1000baseKX. Immediately, we're running into the issue that there is no room for all of these types under the IFM_ETHER category; there's only room for two more (and per John Baldwin, only one more if one of those two unused types is to be used for a reserved type). Long term, there are going to be tons of media types for future ethernet speeds like 25G, 50G, 100G, and etc, and ixl already supports media types that aren't in if_media.h, either. So, something needs to change. Does anyone have any thoughts on what should happen? I've thought of a few things, but I don't have an adequate grasp of what the pros/cons of each are: 1. Add a new media category (like IFM_ETHER) and change kernel code to treat it like the existing IFM_ETHER. This creates ~28 new media types we can use, but it may just be delaying the inevitable for a short time. 2. Extend media value from 32-bits to 64-bits. I don't have a good idea of what the consequences are of this on architectures that aren't amd64. 3. (Initially suggested by Adrian) would be to create a new media type struct (instead of using an int value) or adding an extra value to the existing ifmedia/ifmedia_entry struct for this. This sounds like the best solution to me, but I don't know how much effort it would take to implement -- does ifconfig need a lot of changing to handle this? Thoughts? Any previous discussions worth looking at? - Eric