From nobody Sun Jun 29 20:53:00 2025 X-Original-To: dev-commits-src-main@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 4bVhMJ35QYz60g4Z; Sun, 29 Jun 2025 20:53:00 +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 4bVhMJ1QCwz3T39; Sun, 29 Jun 2025 20:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751230380; 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=2htHJyvSzjCwinpZi8BlmKurdYl1sJuD8rOUDz/qXAU=; b=XGLpMfaUaGgikdQ21sQ41ITrRfm8yOtQ3PUJAb2KvApwbBlyiOgbRjkP/gcLc/ebR88S1a dtDxHHz/71n5OZS2RSTUWm9FelS7/n9Fh8sNI1Ko8GAe1AG2KoMvvF6mjzIc75lbPRoBN1 rEXtOKSCTJQPDkJRSDxotmtpESwM1fkz1knsgoss+BhOnPTpeL2ULlOy7jz8mcMo6Jtmws xDlVeDNsnmXnzAFa9gMvS61EwgXDLYL6glmTLGNKRJFFco1Q1mzikQxwVCVBXO3aE3KqUj jr4a7jYtBjogm5W0/lfCR+Yi4lKTcMiy940PjeqWgNeEp3fPCF/BXICZYBm7mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751230380; 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=2htHJyvSzjCwinpZi8BlmKurdYl1sJuD8rOUDz/qXAU=; b=WvouIkRMsbEYKKR0U6vRbf30DyOlbv3DpzivqflHcdie4D60wqy15iGngIhkSgoMOuYfAV mzdrXeJjPR7YFo+yzt4Lkv1f3w3a1znz36ba0V0HH5ygfbLJxI5c9MTJifSwz9bj0ZXa0q RAVqltYSSDWgSKKp85uESowqPDDAYHI8rJ42huXL4N+ku//Ivcsk0gQU/l2+SGBmxIe8o/ N2A71YlqdudqAjjXA7dPwMDE2bTWGuSIVOjwTIbla7p9UnO3xXXregEJAm0uKJMG5rvFTu 0JQUwgVE3fQw84PZHd6Dim5aBFLtarAufs8Qbi2VFlBNqGOJhpu3fwOO+YnXUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751230380; a=rsa-sha256; cv=none; b=UQy6eRklMMrGeFp4rxxU/Vh+IXjiVtp9erp7koZGz/PEJgo5ki7gu6jQJhJA1lOQWTM/c7 blmS23Nlv7Dv6eiSK9XwF9ohfRQuA12J1/lT7XgUJs155a+hudNpghjMfWabAgGUBgM3Pd JhLOn2/MvyNwqmwwuMzRmaXQQQ5h2GNgjLJO3awlUUL0Rwnm/9P0XiQk9heSQc0IgrFgH+ ByRu3reBQYX9X69vuXEU0vO7chSa8UCUvTXuQostKxSJ9BDamxtMVLMRLPcX7h3hIgvDvH pFTPfwULhkSdhBQ8J2TCjiuN7eemUmInsh11weabPyxyeX2aSr2QFUAAokbnww== 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 4bVhMJ0zw6zbp2; Sun, 29 Jun 2025 20:53:00 +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 55TKr01p098324; Sun, 29 Jun 2025 20:53:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55TKr0Ol098321; Sun, 29 Jun 2025 20:53:00 GMT (envelope-from git) Date: Sun, 29 Jun 2025 20:53:00 GMT Message-Id: <202506292053.55TKr0Ol098321@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: 20e15e905c58 - main - mlx5: Decrease FW init timeout from 120 seconds to 5 seconds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 20e15e905c58e9e2020b2c3e40caa2e8406e5827 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=20e15e905c58e9e2020b2c3e40caa2e8406e5827 commit 20e15e905c58e9e2020b2c3e40caa2e8406e5827 Author: Andrew Gallatin AuthorDate: 2025-06-29 20:51:50 +0000 Commit: Andrew Gallatin CommitDate: 2025-06-29 20:51:50 +0000 mlx5: Decrease FW init timeout from 120 seconds to 5 seconds When encountering a failed NIC, the mlx5 driver will wait up to 120 secs for the firmware to respond. This timeout is absurdly huge, and leads to boot times of 40 minutes to over an hour on our servers when a NIC fails. This is because the driver will attempt to attach to the failed NIC multiple times (once for each driver loaded after mlx5), and wait 2 minutes on each attempt. This happens because the mlx5 driver is still the best match for the device. This delay then triggers watchdog timeouts in our environment, rendering servers with a failed NIC entirely unbootable without manual intervention. Note that FW_INIT_WARN_MESSAGE_INTERVAL must also be decreased, as it must be less than the init timeout. Reviewed by: kib (initial version, before reducing warn interval) Sponsored by: Netflix --- sys/dev/mlx5/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/device.h b/sys/dev/mlx5/device.h index e6d46507a5d2..3e2c4f15a5cc 100644 --- a/sys/dev/mlx5/device.h +++ b/sys/dev/mlx5/device.h @@ -32,8 +32,8 @@ #define FW_INIT_TIMEOUT_MILI 2000 #define FW_INIT_WAIT_MS 2 -#define FW_PRE_INIT_TIMEOUT_MILI 120000 -#define FW_INIT_WARN_MESSAGE_INTERVAL 20000 +#define FW_PRE_INIT_TIMEOUT_MILI 5000 +#define FW_INIT_WARN_MESSAGE_INTERVAL 2000 #if defined(__LITTLE_ENDIAN) #define MLX5_SET_HOST_ENDIANNESS 0