git: a884921abbaf - main - ixv: Report multigigabit link speeds
Kevin Bowling <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a79fd55.397a1.46a5d423__21392.7433405601$1786379656$gmane$org@gitrepo.freebsd.org> |
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a884921abbaf52ff862a32ff6806bf071974faa6 commit a884921abbaf52ff862a32ff6806bf071974faa6 Author: Kevin Bowling <[email protected]> AuthorDate: 2026-08-10 15:11:01 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-08-10 16:33:12 +0000 ixv: Report multigigabit link speeds The VF link-status path can receive 2.5 and 5 Gb/s speed bits from X550-family PFs, but media reporting has no cases for them. The bootverbose message also assumes every non-10-Gb/s link is 1 Gb/s. Expose the corresponding ifmedia subtypes and derive the diagnostic speed through the shared link-speed conversion helper. MFC after: 2 weeks --- sys/dev/ixgbe/if_ixv.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index 3e1c275d2979..6e6d99fa058d 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -982,6 +982,12 @@ ixv_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) ifmr->ifm_status |= IFM_ACTIVE; switch (sc->link_speed) { + case IXGBE_LINK_SPEED_5GB_FULL: + ifmr->ifm_active |= IFM_5000_T | IFM_FDX; + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + ifmr->ifm_active |= IFM_2500_T | IFM_FDX; + break; case IXGBE_LINK_SPEED_1GB_FULL: ifmr->ifm_active |= IFM_1000_T | IFM_FDX; break; @@ -1250,6 +1256,7 @@ ixv_if_update_admin_status(if_ctx_t ctx) device_t dev = iflib_get_dev(ctx); if_t ifp = iflib_get_ifp(ctx); s32 status; + uint64_t baudrate; if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0 || atomic_load_acq_32(&sc->vf_mbx_ready) == 0) { @@ -1274,10 +1281,13 @@ ixv_if_update_admin_status(if_ctx_t ctx) if (sc->link_up && sc->link_enabled) { if (sc->link_active == false) { - if (bootverbose) - device_printf(dev, "Link is up %d Gbps %s \n", - ((sc->link_speed == 128) ? 10 : 1), - "Full Duplex"); + if (bootverbose) { + baudrate = ixgbe_link_speed_to_baudrate( + sc->link_speed); + device_printf(dev, + "Link is up %ju Mbps Full Duplex\n", + (uintmax_t)(baudrate / IF_Mbps(1))); + } sc->link_active = true; iflib_link_state_change(ctx, LINK_STATE_UP, ixgbe_link_speed_to_baudrate(sc->link_speed));