From nobody Tue Feb 25 19:26:31 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z2SJm2G5cz5njs8; Tue, 25 Feb 2025 19:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z2SJl1ZPpz44k7; Tue, 25 Feb 2025 19:26:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740511591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Td6VhVmD4I3rSben+7gnN/MaoazpvjPNfZuWAepreDU=; b=OjXwcHd+W+BcqSEGGRryj1wjtCSTw6PF8WIUECC6HAIpk0rpcXQNdNSOhOn1y/0MY8lTTO 9Akc1IySTfyvfNj7RZWZ8MEOLspRAEVS+0FntyjjUjjXlrWjsPprmRI5/dVuOROi2BFxNg p7gCvhUnYlvHhNnZPEcogwcptQoVgHzT29d9GyE1XvO8XK6iuKn+SU5TgepGG4aS5IIOQS AoPoCRt46tiGQyTRYCPuNdPQkD5OvYgiEakTMc1uLoCSBMr8vKYqoJ1vrK0S+jx9wDrSEL wZu4c/wywxEU3GIm8Y2pEFRkpeNwUuffl0FDe/FixhOZWScuPXZMTB6PLA+ZtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740511591; a=rsa-sha256; cv=none; b=Pi5X0gfGxyksqW4xX01QAIahu9cYpaf3/T2p3W+4B2q2PwKAtn02CXD0MYVkl8r1up4TEn adDUOsXovK8d6ZOiHSagrYmTarVXL5JJ9a9Qw9ZN+oY8N7H4z0dA5Kz5IOjJ1WH8C/Q+Zm LiFFmV9zFc2f2wJjvJcIpQCWbGVZCrf+N/daHTXSQYhSEi298uMoI0Tlky1k3N9DzudAFi rO91Z0Ck9PB6asexLuN6N8G64U5Q+5ERD2fQtcOUdnVtmO1qXWXtfWzqxtPqT566HTBh0E kCqykGTlooHqr2MKtr/nM7qpZGTUUWT1dQaIQYqz/Cx7qkJe7nqNhLafM5Jr6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740511591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Td6VhVmD4I3rSben+7gnN/MaoazpvjPNfZuWAepreDU=; b=TTEcL3ey2KM2Ip3e0kAPyxtZisWPOSnaxf9IzLPKVqIR+WHBdl5+VyYaGxEqTpZgO8HOnn hiVf8kf/2+DmzJqVi63J9RnLgMV4dkAev6mkKE2jV0eYNP6A0GldKw7UGpFN4dirsDVPph Za94G4fpx1ATNP4geuj4zQmk3PNYfytABYNZaiEy/j4XB37Cea8gwUiRERL2LUOu0XvzpJ pE5wKkybZzGHAniAbxdPYCkSXcGA5lj3AgqJ3GpagNiaiHYSnGLe6X6yN2QlxvtM1KERZ9 aimRqNjZVHSezfZpa63RTnEMieRyEWBIiK/51VfpKqbGiugAk4dcbKu12Nd3OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z2SJl18w1zg98; Tue, 25 Feb 2025 19:26:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51PJQVqG011526; Tue, 25 Feb 2025 19:26:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51PJQVQm011523; Tue, 25 Feb 2025 19:26:31 GMT (envelope-from git) Date: Tue, 25 Feb 2025 19:26:31 GMT Message-Id: <202502251926.51PJQVQm011523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 709348c21351 - main - ifconfig: fix reporting optics on most 100g interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 709348c21351a783ff0025519d1f7cf884771077 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=709348c21351a783ff0025519d1f7cf884771077 commit 709348c21351a783ff0025519d1f7cf884771077 Author: Andrew Gallatin AuthorDate: 2025-02-25 19:17:14 +0000 Commit: Andrew Gallatin 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 =