From nobody Fri Sep 12 00:39:39 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 4cNFth1jm2z67dVN; Fri, 12 Sep 2025 00:39:40 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cNFth1F7mz3Nkk; Fri, 12 Sep 2025 00:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757637580; 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=JYuqb8oZRatnPeN1KRIGHPBWRvlf+GyznPXPPPNeckQ=; b=wM5oQ4Z6TjN2SQeeamQjWudOimyv55RV12mhmAKt0rcmuS5FQKsrMGiexIn7dcGqXI3AgR 99uKVKph6L5Q/ryRrbfYJdf7asaZUdUTpk3g57FmXGfhgWyLXvO3lKK7NWegUJH2XB+WAi fYVV7OOZP+wjkpjv2UrGCw9nx51Zwf8VtHkod1W73kyM0uaztvBbJk3dHyGDCrejxBxvsQ SZTGhRw1D5pH8pKuaXdyV+3qEGs0YFfWnuGLuL14WfwYvp1RO3B2lWwDnZdIK/lb9oV2xx 6z2ux1UDcajyM2PUIlLplWcwzcF6M2K1cg9wb6mct/JZDqZo3xL/6v1tXJtLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757637580; 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=JYuqb8oZRatnPeN1KRIGHPBWRvlf+GyznPXPPPNeckQ=; b=QXy+USxh8bPFXzSbgfigkbodbpJM/phoUGecLVLnQxQkFyXqMq7wy6h8oXhB2MKii80AAx /VvdsRGYotwIrIC2ahVL+41Xft8pRoTh0pzGOZuZB0KMUHTnYpx2VDbEob1QBMDRRecKDe wEs2W3wId3UDTBL1jtihpHxrbaStRov902rtUybkzIVAKaPi8kr8Ppx3owG+Cith31kyQ8 DPxKa24Xor0jG1DGPyP7EhEc3JfgmHfLKlQOHkDCK/jMDeRA4S24IWsRtxQdF8z+yMHJWv rs5RajefcWPGtjG6GYQcAx+nG60QCBGkK/LWEwU9ER9UIh8uHmNsYBm+XJjNyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757637580; a=rsa-sha256; cv=none; b=Lpv2jfwJgdVV/WcOSKT0Z5oJrAOiFMpKvHBJNhWB3soclrYyfcOqCJ1fMl3Xeypyg/Ghbi XIQhXyJSpsyOnPeVkLG1YoJhM7BCPyrYYfBgaKrzFZJCSWCOr899meBeR2JxWNJucKB8qR gjaL99Gsv7k1Cz4L4mBgEPHDmVUJbQJ0Due/orRdzC2OuASBg5xsrWb/XWtRVHJH9nr8J7 Z4WPie80eR6t5+TZ7HHIiUI/JZaiSfvorODh/bYGf6JlhkKywYmiV5sxdeNLf8B3bpy+he En8P6O/s85niKRcBcJquhVnCmh/b+XYvVhtbrvygTQqnikRQwTpbiMCR7lJMTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cNFth0lR4zVXY; Fri, 12 Sep 2025 00:39:40 +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 58C0de2j040373; Fri, 12 Sep 2025 00:39:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58C0ddS3040370; Fri, 12 Sep 2025 00:39:39 GMT (envelope-from git) Date: Fri, 12 Sep 2025 00:39:39 GMT Message-Id: <202509120039.58C0ddS3040370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 5a85a5ed44d2 - stable/13 - ixgbe: Fix incomplete speed coverage in link status logging 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5a85a5ed44d2fffb155f812be28f2dea3c09e83c Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5a85a5ed44d2fffb155f812be28f2dea3c09e83c commit 5a85a5ed44d2fffb155f812be28f2dea3c09e83c Author: Yogesh Bhosale AuthorDate: 2025-09-09 17:01:04 +0000 Commit: Kevin Bowling CommitDate: 2025-09-12 00:39:17 +0000 ixgbe: Fix incomplete speed coverage in link status logging Originally ixgbe_if_update_admin_status() only handled 1G and 10G speeds, causing any other speeds to display as "1 Gbps" in link status logs. This issue is fixed by adding link speed to string conversion logic through the introduction of a helper function, ixgbe_link_speed_to_str(), which corrects the misleading logs to reflect accurate link speeds. Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com PR: 288960 Reported by: Mike Belanger - QNX Differential Revision: https://reviews.freebsd.org/D52442 (cherry picked from commit 46347b3619757e3d683a87ca03efaf2ae242335f) --- sys/dev/ixgbe/if_ix.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 641689d3e065..d20eecab6ca0 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -174,6 +174,7 @@ static int ixgbe_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int, int); static void ixgbe_if_queues_free(if_ctx_t); static void ixgbe_if_timer(if_ctx_t, uint16_t); +static const char *ixgbe_link_speed_to_str(u32 link_speed); static void ixgbe_if_update_admin_status(if_ctx_t); static void ixgbe_if_vlan_register(if_ctx_t, u16); static void ixgbe_if_vlan_unregister(if_ctx_t, u16); @@ -3858,6 +3859,33 @@ ixgbe_if_stop(if_ctx_t ctx) return; } /* ixgbe_if_stop */ +/************************************************************************ + * ixgbe_link_speed_to_str - Convert link speed to string + * + * Helper function to convert link speed constants to human-readable + * string representations in Gbps. + ************************************************************************/ +static const char * +ixgbe_link_speed_to_str(u32 link_speed) +{ + switch (link_speed) { + case IXGBE_LINK_SPEED_10GB_FULL: + return "10 Gbps"; + case IXGBE_LINK_SPEED_5GB_FULL: + return "5 Gbps"; + case IXGBE_LINK_SPEED_2_5GB_FULL: + return "2.5 Gbps"; + case IXGBE_LINK_SPEED_1GB_FULL: + return "1 Gbps"; + case IXGBE_LINK_SPEED_100_FULL: + return "100 Mbps"; + case IXGBE_LINK_SPEED_10_FULL: + return "10 Mbps"; + default: + return "Unknown"; + } +} /* ixgbe_link_speed_to_str */ + /************************************************************************ * ixgbe_update_link_status - Update OS on link state * @@ -3874,9 +3902,9 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) if (sc->link_up) { 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"); + device_printf(dev, + "Link is up %s Full Duplex\n", + ixgbe_link_speed_to_str(sc->link_speed)); sc->link_active = true; /* Update any Flow Control changes */ ixgbe_fc_enable(&sc->hw);