Date: Tue, 25 Feb 2025 19:26:31 GMT From: Andrew Gallatin <gallatin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 709348c21351 - main - ifconfig: fix reporting optics on most 100g interfaces Message-ID: <202502251926.51PJQVQm011523@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=709348c21351a783ff0025519d1f7cf884771077 commit 709348c21351a783ff0025519d1f7cf884771077 Author: Andrew Gallatin <gallatin@FreeBSD.org> AuthorDate: 2025-02-25 19:17:14 +0000 Commit: Andrew Gallatin <gallatin@FreeBSD.org> CommitDate: 2025-02-25 19:26:07 +0000 ifconfig: fix reporting optics on most 100g interfaces 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 were never saving that bit when it was encountered. This change records that bit into sfp_eth_1040g, allowing us to later select the appropriate ID string. This should cause most 100G interfaces to stop being identified as "unknown" in the "plugged" output of ifconfig -v, and to start being identified as what they really are. Example output from a Chelsio T6 with SR4 optics in one port and DR1 optics in another: Before: plugged: QSFP28 Unknown (MPO 1x12 Parallel Optic) plugged: QSFP28 Unknown (LC) After: plugged: QSFP28 100GBASE-SR4 or 25GBASE-SR (MPO 1x12 Parallel Optic) plugged: QSFP28 100GBASE-DR (LC) Reviewed by: kbowling, np Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49127 MFC after: 7 days --- lib/libifconfig/libifconfig_sfp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libifconfig/libifconfig_sfp.c b/lib/libifconfig/libifconfig_sfp.c index 17f130606765..8292135d3e47 100644 --- a/lib/libifconfig/libifconfig_sfp.c +++ b/lib/libifconfig/libifconfig_sfp.c @@ -181,6 +181,7 @@ get_qsfp_info(struct i2c_info *ii, struct ifconfig_sfp_info *sfp) if (code & SFF_8636_EXT_COMPLIANCE) { read_i2c(ii, SFF_8436_BASE, SFF_8436_OPTIONS_START, 1, &sfp->sfp_eth_ext); + sfp->sfp_eth_1040g = code; } else { /* Check 10/40G Ethernet class only */ sfp->sfp_eth_1040g =
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502251926.51PJQVQm011523>