From nobody Sun Feb 8 18:32:49 2026 Received: from outbound.baidu.com (mx24.baidu.com [111.206.215.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA88B31B124; Thu, 5 Feb 2026 06:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.206.215.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770271222; cv=none; b=DTToJJ3Hkx+AjeNWNRExGkI39Ug9qoFBclnzKwDGy2jzaqP9VZrlHQ5mkRge5QXE4PRSwgKuRzCAwa1DlwLt6wZ1l9EBiX66OLrFF73O2ayNea/d3Uo531vkzdEt7lZrzUtiUpAIyKMtqzdLPmCYDSdygAFML+1uezC7Qw3OJnI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770271222; c=relaxed/simple; bh=Bw9eIbyon0C0UsRm+N00FGah8CbfZsuR6jLXJsYCFS4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=rmf2wvzDHJ4YyOEs425iaHK0uGERtN+bdjLo4asrria3ECBVeXlqChnoBZYTlzwbnzreVZzdZ0C/SalVMqgiyo0pRl31/RPHeJ7xNAoAoQAWxqOh3dz9BDKm1mazJ/yqQR4sDtP9mFXVJsQsvEaQfjAZ5fkBhf7aPjhU+DWqv4Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; arc=none smtp.client-ip=111.206.215.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com From: lirongqing To: Jakub Kicinski , Simon Horman , Andrew Lunn , "David S . Miller" , Eric Dumazet , Paolo Abeni , Li RongQing , , , Subject: [PATCH][net-next] nfp: flower: use GFP_KERNEL in idr_preload Date: Thu, 5 Feb 2026 00:59:33 -0500 Message-ID: <20260205055933.3939-1-lirongqing@baidu.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: bjhj-exc11.internal.baidu.com (172.31.3.21) To bjkjy-exc3.internal.baidu.com (172.31.50.47) X-FEAS-Client-IP: 172.31.50.47 X-FE-Policy-ID: 52:10:53:SYSTEM Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Li RongQing idr_preload() is called in a sleepable context before acquiring a spinlock. Change the allocation flag from GFP_ATOMIC to GFP_KERNEL to allow direct reclaim and improve allocation success rate under memory pressure. Signed-off-by: Li RongQing --- drivers/net/ethernet/netronome/nfp/flower/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.c b/drivers/net= /ethernet/netronome/nfp/flower/main.c index 83eaa5a..8f232c6 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/main.c +++ b/drivers/net/ethernet/netronome/nfp/flower/main.c @@ -63,7 +63,7 @@ nfp_flower_get_internal_port_id(struct nfp_app *app, stru= ct net_device *netdev) if (id > 0) return id; =20 - idr_preload(GFP_ATOMIC); + idr_preload(GFP_KERNEL); spin_lock_bh(&priv->internal_ports.lock); id =3D idr_alloc(&priv->internal_ports.port_ids, netdev, NFP_MIN_INT_PORT_ID, NFP_MAX_INT_PORT_ID, GFP_ATOMIC); --=20 2.9.4