From owner-freebsd-net@freebsd.org Wed Jul 15 22:25:53 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5C279A385D for ; Wed, 15 Jul 2015 22:25:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 905B41225; Wed, 15 Jul 2015 22:25:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by oihq81 with SMTP id q81so38651163oih.2; Wed, 15 Jul 2015 15:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=/km6WZboF0P6hgB3cBHmFYCuzwxl2JXeeLc/cvpLNIg=; b=g+nmIoXOmY6FzxfBrluI84CYSmWDDADiUWt1sETxNhlirCkuyduSi6a0P9T1P6quvs 5/w5Bk2SxD+OgKO5uMSytaUNMZnd7dlkBc+doRcY/BOibQjBIEbe+Z5rIaPXCICYKkyA +dITf0/5COfwDv34WGrVl61XOfbgYQ+aOBvjXP/DNLIxoxs0fik0upbyY7fzCU5iD1qe DSxg3kn5NJEgEcvdNC3KxMc9uLRQz09kqS3kwn93JFi0xcjK2zX67B0AN/Ix/p8K3S3R QbgL5Wu1YxCv79zIDh5rMppf8lUuiCgoIjZXntjVx6eJU28vNxAwVciTn9kVJoRIVxX7 R9tw== MIME-Version: 1.0 X-Received: by 10.182.65.164 with SMTP id y4mr5701769obs.65.1436999152860; Wed, 15 Jul 2015 15:25:52 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.202.71.135 with HTTP; Wed, 15 Jul 2015 15:25:52 -0700 (PDT) Date: Wed, 15 Jul 2015 16:25:52 -0600 X-Google-Sender-Auth: PWvrsZoxLCOn4Ug7T3DBuDUKaRY Message-ID: Subject: Displaying the supported module types of a network adapter From: Alan Somers To: FreeBSD Net , Navdeep Parhar , "Alexander V. Chernikov" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 22:25:53 -0000 SIOCGIFMEDIA will return the list of supported media types and the current media type of a network interface. But for NICs with pluggable modules (SFP+, QSFP, etc), it would also be useful to know the allowed module type. I can't find any way to determine that using the standard tools. cxgbe(4) is aware of the module type allowed by the card, but doesn't expose that information to userspace. I can add a simple sysctl to do so, but it would be better to add a standard ioctl that can be used by all network drivers. Besides cxgbe(4), can any other network drivers support this? If so, would anybody else be interested? If so, should I add it to the "ifconfig -v" output? -Alan