Page MenuHomeFreeBSD

ifconfig: fix a bug where most optics on 100G and faster NICs are not properly reported
ClosedPublic

Authored by gallatin on Mon, Feb 24, 10:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 1, 7:16 PM
Unknown Object (File)
Tue, Feb 25, 7:27 PM
Subscribers

Details

Summary

This fixes a bug where optics on 100G and faster NICs were not properly reported.
The problem is that we pull the string from the correct table in ifconfig_sfp_physical_spec only when sfp_eth_1040g contains the SFP_ETH_1040G_EXTENDED bit. However, we never save that bit when it is encountered. This change records that bit into sfp_eth_1040g, thereby allowing us to later select the appropriate ID string.

This should cause most 100G interfaces to stop being identified as "unknown" and to start being identified as what they really are. Here is an example from a machine with a Chelsio T6 and SR4 and DR1 optics:

# ifconfig -v > /tmp/old
# /tmp/ifconfig -v > /tmp/new
# diff /tmp/old /tmp/new | grep plugged
< 	plugged: QSFP28 Unknown (MPO 1x12 Parallel Optic)
> 	plugged: QSFP28 100GBASE-SR4 or 25GBASE-SR (MPO 1x12 Parallel Optic)
< 	plugged: QSFP28 Unknown (LC)
> 	plugged: QSFP28 100GBASE-DR (LC)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

gallatin created this revision.
gallatin edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mon, Feb 24, 11:08 PM