Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 2015 16:01:45 +0300
From:      Alexander V. Chernikov <melifaro@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>, FreeBSD Net <freebsd-net@freebsd.org>, Navdeep Parhar <np@freebsd.org>
Subject:   Re: Displaying the supported module types of a network adapter
Message-ID:  <1127061437051705@web4g.yandex.ru>
In-Reply-To: <CAOtMX2jpsLwaCpX7eO4fixmyWCSSOfVXEki6GiJ%2ByhrvrNOJDg@mail.gmail.com>
References:  <CAOtMX2jpsLwaCpX7eO4fixmyWCSSOfVXEki6GiJ%2ByhrvrNOJDg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
16.07.2015, 01:25, "Alan Somers" <asomers@freebsd.org>:
> 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
Well, it might be a bit tricky. There are basically 2 parts: physical constraints and logical ones.
E.g. first we have to specify what we could physically insert (gbic, rj45?, sfp/sfp+, qsfp+).
Here we can consider adopting values from ftp://ftp.seagate.com/sff/SFF-8024.PDF Table 4.1
Next step would be specifying what exact modules could be used. Examples could be:
* 1G sfp on 10G card (chip constraint)
* qsfp<>sfp hydra cables (chip constraint)
* QSFP-2-SFP+ (chip constraint)
* using SR/LR transceiver on card, sold as "Direct attached one" (Vendor SW constraint)

It looks like that bit masks from TABLE 6-17  SPECIFICATION COMPLIANCE CODES from
ftp://ftp.seagate.com/sff/SFF-8636.PDF can be adopted for the logical part.

so we could have something like

{
  u16 version;
  u16 cage_type;
  u32 spare;
  u64 module_type;
  u64 spare;
}

for the new ioctl.

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1127061437051705>