Displaying the supported module types of a network adapter

Alexander V. Chernikov melifaro at freebsd.org
Thu Jul 16 13:01:52 UTC 2015


16.07.2015, 01:25, "Alan Somers" <asomers at 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


More information about the freebsd-net mailing list