The branch main has been updated by gallatin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=709348c21351a783ff0025519d1f7cf884771077

commit 709348c21351a783ff0025519d1f7cf884771077
Author:     Andrew Gallatin <galla...@freebsd.org>
AuthorDate: 2025-02-25 19:17:14 +0000
Commit:     Andrew Gallatin <galla...@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 =

Reply via email to