🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #9575

[PATCH iwl-net 1/6] ice: don't wait out a reset in ice_dcbnl_devreset()

#9575
From: Przemek Kitszel
Date: Mon, 02 Nov 2026 10:50
40 lines
10821 bytes
ice_dcbnl_devreset() spins on ice_is_reset_in_progress() while holding RTNL,
taken by dcb_doit(), and pf->tc_mutex, taken by its dcbnl caller. The reset
rebuild needs RTNL in ice_ena_vsi() and pf->tc_mutex in ice_dcb_rebuild(),
both called from ice_rebuild(). So the waiter keeps the reset from ever
finishing, and thus keeps waiting.

Nothing is gained by the wait anyway: a reset in flight normally rebuilds
the DCB config and reopens the netdev on its own, which is all the
ifdown/ifup here is for. Bail out instead.

The reset bits are cleared only after ice_rebuild() returns, so a call can
still see them set after the rebuild has finished, and skip the ifdown/ifup.
That is harmless: ice_pf_dcb_cfg() has already reconfigured the VSIs, only
the stack-level notifications of the bounce are lost.

Fixes: b94b013eb626 ("ice: Implement DCBNL support")
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
index bb5cc0a2ba69..9cdb9581fdc3 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
@@ -15,8 +15,9 @@ static void ice_dcbnl_devreset(struct net_device *netdev)
 {
 	struct ice_pf *pf = ice_netdev_to_pf(netdev);
 
-	while (ice_is_reset_in_progress(pf->state))
-		usleep_range(1000, 2000);
+	/* waiting for a reset in flight would block it on the locks we hold */
+	if (ice_is_reset_in_progress(pf->state))
+		return;
 
 	dev_close(netdev);
 	netdev_state_change(netdev);
-- 
2.54.0
Technical Details
Message-ID: <20261102105346.30739-2-przemyslaw.kitszel@intel.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354588-linux-kernel-netdev=dewy.ru
References: <20261102105346.30739-1-przemyslaw.kitszel@intel.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354588-linux-kernel-netdev=dewy.ru
From: przemyslaw.kitszel@intel.com (Przemek Kitszel)
Newsgroups: linux.kernel.netdev
Subject: [PATCH iwl-net 1/6] ice: don't wait out a reset in ice_dcbnl_devreset()
Date: Mon,  2 Nov 2026 11:50:16 +0100
Organization: Usenet Network
Message-ID: <20261102105346.30739-2-przemyslaw.kitszel@intel.com>
References: <20261102105346.30739-1-przemyslaw.kitszel@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2904387"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:03bRobZ3hpu75Y9eVpcjvouJxlc= sha256:kAxL6y+hrA4ZmxY0Q49cH/jVFoO9OPkXt5MohX8DoWc=
	sha1:ZxrD4saybxm1TfjKOuwWspodCu4= sha256:3meTXPUIjVycWGEERl+gxqEypc98tMSA5Y24obNymc0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id D8A6E1124AB; Mon,  2 Nov 2026 13:48:25 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=intel.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id RpWF5SQ0h3uW;
	Mon,  2 Nov 2026 13:48:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-354588-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=intel.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 4B9A8112453; Mon,  2 Nov 2026 13:48:14 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 629FF606D0B; Mon,  2 Nov 2026 10:46:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793616398;
	b=OuLeeHD7MjERgMZ2mB33e5kPOrk0Usz14KQFrpWZ4hZfG6P24dXuKlFuqydEtdwlXNL/
	 KK1i02KjvwppDd3xErZL3opdzmgetUz5uYEZgjYl2CxZgEPFZhpitUS3OeYvJAZAfM2CW
	 +O/igPOzsAvpBCbUMFTZkJkZbmcnRosTYgSECZJEvqedU7U2u2pyFJYcC94btweIDEd5q
	 q/d++ai/2j1YxJTRTiqaW6OlmvtrPUKP8USMd8/6Mwh8FuEcoXhuWMF9Q81hlOmzdQwSH
	 IPf1v5SI3RLlUm0CySqQvpUyw4kt5Nu3TWdovIPJ5nD4YSoJAyTCmMQkwgjLpa4FHaQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793616398;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-IronPort-AV:X-IronPort-AV:
	 Received:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:
	 Received:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=0de0W6jxw8KtscxBWkG1yp2WbDEIeVe8u254gNP5E2o=;
	b=nzyt1wLY3/UX46W2dvQfBTvE4BR8WUx6PzwmoaLkdGpB0nZIZ3aBk7RrrrAoWRCDl7ET
	 Z/cFmuKEbGV38+777uinXxM+E0mnbeUSMxB6+A8Cj1j4senJ90DVo3bz/Lz5EZBZBJvH+
	 RCQoKn70O/QHhAaVW+xhocKnr644z3qot+VGZqpacDjs1qJDHO2MeWzLL7NSGmezjps3t
	 Q/iMA9imC1RjVMJL+/T8QUvYUT21rksAHvHLw+kVpTO9Xr8ZMnVu3oiWdwCovRekequrB
	 KCot324i8laB9tqNdj/SaVS7+kK4VJVzCfhmoapTF9bRNiI5UuQ5gc+y5Q6mSO6PE7Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cgxm+ilw;
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id F19D8606A33A;
	Mon,  2 Nov 2026 10:46:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cgxm+ilw
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.15
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793616397;
	b=Ti2y2IuEM8ahB5zRt/e4YuqKOn/oIdbh3myfHFllnoVUiLA46KY4Js8j41OGYIwJ2KYN
	 14EMl/RybIz+11I5Tk/zXk93utp5RpAnR/w/TIzsTn/CRt+ZQhWe3fgh2yKLTJJTcCO/j
	 Dqd6oyWR0kJzwM4r7Gs1r65/Xt2bF3hK75lvwVrLFDtE/lFrAATpqHwu1tGRGUOxqXcXO
	 whMyGdprXL8LXByqrr3Jdqle57Ka9+7uMdxe3uQzlOQKULCu7RYMK80ExtSF63YP8zWO7
	 /4cC1IdQ2jHM7+JEJWS/xUBbLHiO35fvxWYMxk2hgHpPaaMNRaRJsLPCvMJCn63etXQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793616397;
	h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID:
	 X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID:
	 X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=0de0W6jxw8KtscxBWkG1yp2WbDEIeVe8u254gNP5E2o=;
	b=ck4y2nTTnHctb+Vec/T/JujeaP4bcTwXCoxz78tihH/7FOgW3t53WnbVS975ASBGpnqG
	 PoXFBF+ikmhqNpEXWDvyEg7zn+dZCUbGG9IZqAzb4Jluojts6jjSJvKx5l9mHXxGVMqyF
	 8NLnOSwQOzN8FADxrdTwprbTWXhHf/AlnA14PXWm3IDoNZW8T19EH4BCMFdAgbelpfZVZ
	 p5gOVU9EUSKA7W57OT2r9r4AXRch6O+zSHflhBBQfyrzWzAUXjYedMSQ+TUdLJovd5knu
	 yVjvUwimUorjL1WlIO3DduNHCEo7m2pgvuX9bxQZ9ZNfxC7+oPgzS65cRWrnNBd4+Vw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cgxm+ilw;
	arc=none smtp.remote-ip=192.198.163.15
X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05977606A329
	for <netdev@vger.kernel.org>; Mon,  2 Nov 2026 10:46:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05977606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1793616396; x=1825152396;
  h=from:to:cc:subject:date:message-id:in-reply-to:
   references:mime-version:content-transfer-encoding;
  bh=cW+Movk1Z1ls6/YMIHhoUPIB2qHu/pPsMjpsRhMTgpk=;
  b=cgxm+ilwBapPV7UtlOwiC7DIZRefd4t34yF0v4Mw3gdPNwGsrEnaxa+q
   p3Rf8l7QH4mNUhJY0TVuvr8vRWXqZpXlxE/RaMjrr2iXO0uJrDoqZfUuA
   yPgDbL4TSsuU0nfVYxWqHuIOURDCRWmXTFXvk3re1B3N7nht+/xnL9+Yu
   yKUhPY31Q/HylD7XQuwGw7MzvGv0utihIQ/N8y6OCZa7/oC/Ghoul81dt
   5VKebGyTRNSCGz7PqIPv5YUrCNfeKY0laiRb9IlBcZSIagjJUXJfuqFCD
   uPaBifwhw+AjEWtSKPwwrPSTsAwuKCsW36gKgWvnrOarcZ8bYmA6orxvs
   A==;
X-CSE-ConnectionGUID: tzjHPn7qQr2XAbyw7sNnIw==
X-CSE-MsgGUID: S0VkugOwQ3aRTdoiIwXgZA==
X-IronPort-AV: E=McAfee;i="6800,10657,11953"; a="2305019"
X-IronPort-AV: E=Sophos;i="6.27,191,1787036400"; 
   d="scan'208";a="2305019"
X-Received: from orviesa004.jf.intel.com ([10.64.159.144])
  by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2026 02:46:31 -0800
X-CSE-ConnectionGUID: E20Jtrf3Tz2N8/ujoxdMtQ==
X-CSE-MsgGUID: XGQpi2oeSFywndy8YLvBoA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.27,191,1787036400"; 
   d="scan'208";a="6012003"
X-Received: from irvmail002.ir.intel.com ([10.43.11.120])
  by orviesa004.jf.intel.com with ESMTP; 02 Nov 2026 02:46:30 -0800
X-Received: from pkitszel-desk1.igk.intel.com (pkitszel-desk1.igk.intel.com [10.217.184.18])
	by irvmail002.ir.intel.com (Postfix) with ESMTP id 64FB92876A;
	Mon,  2 Nov 2026 10:46:28 +0000 (GMT)
X-Cc: netdev@vger.kernel.org,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
X-Mailer: git-send-email 2.54.0
X-In-Reply-To: <20261102105346.30739-1-przemyslaw.kitszel@intel.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list