Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp589034lqp; Wed, 12 Jun 2024 10:05:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9jLT4mrjB1PDRm+ViG0422gIAGoqSf9yMsK6/fmbsirVwK2ptabVTfm6AimxweZDCv6XsJ0bH5mvr7kZA5R/IrXIEcw+25yaJt2d6YQ== X-Google-Smtp-Source: AGHT+IG05OlR04OA3OGLrpIzkt9SREcrycLb8j11zDlyfU/6hSYbzUuC16IKtz+k+IQGiCn5CiYO X-Received: by 2002:a05:620a:2a08:b0:795:16fa:5ed8 with SMTP id af79cd13be357-797f600c813mr259088585a.27.1718211940913; Wed, 12 Jun 2024 10:05:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718211940; cv=pass; d=google.com; s=arc-20160816; b=e/wT/zLWYpkyYXivHL5SwhX/YYIX5e+l2KJqZmqiFoIirtybTlaqvw5hNxYFOx0dC2 /prWE438+cGgaB3zyqDTmfbAuGMHAkNK/lX/CCU0zWl6jfsXI2TsUc2KHNY348b7DGlW +Za0aiWAGaCNRlrRmgaX7pMT1osDNPLEJHRbBwFD1dohaRV6QjccLukijhRy+FZkolGK QqR/d+ajaLw2vtX/wdfQAu9GtKU6TOT2Bb/WRZTxE3TZVAu8qnRtuPlOZp/apMzFe9Xc 1YI79e0qnWeXCw1UzvhegbI6g5qoRqW0DElvzAfCTPrm94tzNabRh+CHcPRwOoHOwvmi frog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=QHAA9JKkIO+I90WJT4X6Hovgce35PNbJ/xPvrfjbWUU=; fh=pdglhcY7hn43FRujNlflNhJmhVsdAI6S//OyMfKpxfg=; b=FbcA1BbeiIxyW/ZqO5/3Q2sYthVfgVvgYPi57t5eeR03eoX8222FL324B4d+KBOK8Q Q8wqSxdPPPEJIinwF1xeavU0DCiDrrWeqloNthBqALhSW+DiBLBHUPt8UoGwUk4JxrdR 7GL5dsCnhchCu6736MgZhik283C5koMOOmYF69VG07XIvd+S6mQOVT93CbE8Z+LGb8AA ZsIyTHnvERNDiAFlkjeaV5kb+0302cAcZsQOxylkB8aeGH7Og30tSj5fSIZRqZoyGLA7 r9FaThRbXrtAc8YY3rwctba6eZShsfntk1VDZvKYhbI31WAwQRE41Aa9p0rZYVEwVAuZ 1cUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0IAPGSi3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-211968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-44038a8638dsi165645951cf.182.2024.06.12.10.05.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 10:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0IAPGSi3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-211968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9C2431C20F85 for ; Wed, 12 Jun 2024 17:05:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 791311850B1; Wed, 12 Jun 2024 17:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0IAPGSi3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BFccWuo7" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 A654518307C; Wed, 12 Jun 2024 17:03:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718211806; cv=none; b=OeVXwNOsL6ovdCPK6ZBugyvZpN+WnYJaOYyeUQX/vrHmCzu90uheTBX+qdTnhqB/GM15ORsqG9YlSnb/C2UuYSGD1aXRgislU0W3LVISxRGPpUGK4BetYYjEOwqeDr8V5M4T+asykFv8dwaqOyy3Cv+tzl+NP73JuMlOaHdSZYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718211806; c=relaxed/simple; bh=+cemsJe985z4jsKXPhyNAjOVtSf1Tt7T/0jsg14mEe0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R5YJ3vKbGngxOUVDH/Jn1bwWhfqEprXg0FnDQAU3gxdzXOHkTcH+nKdmpql0gTxyBJc0m7zGwqzdc4w1Ro+08ncXKUmIS9acEx41oYp2ZERvi9h8SZhpEWbReoFiTpP9jpDWomUqjZFf+o2U7g7PUwHxof7z9Df9D18dbabXA6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0IAPGSi3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BFccWuo7; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718211797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QHAA9JKkIO+I90WJT4X6Hovgce35PNbJ/xPvrfjbWUU=; b=0IAPGSi3+2CucVDe243Q+KH+Xp68yCbCCzTOpTDh7rdwbQyq6Z0ikZAU1L2gUSDcuGln4p +qZduXOvituC6tOdoIvWIZQkWxMTzrCw0bFxTwRe7a2nswX3tZR3KEdt2qZA0974oCsVYC tjNzXo4Hncn0brD+xfTVqSKl3+O+6ijh7o3PSbPTW0IEWAVboPuD9VkWSzra+6CBa37wIM B4+AMgv0rKukOru2x7GNF2zb+qhHpQwRjicno16zEl0fEXsjwIfsF2DKrfpK684LjAm598 SDpAabAMLDb+KJJn2g8P5cdU93ATNe4yL0S0ekxKJ5DJOvBUR1eIUlo7HbyB3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718211797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QHAA9JKkIO+I90WJT4X6Hovgce35PNbJ/xPvrfjbWUU=; b=BFccWuo7pCzzWxG1C/jLtx330qlA4ImEv413lZxiTtvNuNuE2Pp+3MTckV03/+nvADVWYv 6sjteRzKctTQbkCA== To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , Daniel Bristot de Oliveira , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Paolo Abeni , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon , Sebastian Andrzej Siewior Subject: [PATCH v6 net-next 09/15] dev: Remove PREEMPT_RT ifdefs from backlog_lock.*(). Date: Wed, 12 Jun 2024 18:44:35 +0200 Message-ID: <20240612170303.3896084-10-bigeasy@linutronix.de> In-Reply-To: <20240612170303.3896084-1-bigeasy@linutronix.de> References: <20240612170303.3896084-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The backlog_napi locking (previously RPS) relies on explicit locking if either RPS or backlog NAPI is enabled. If both are disabled then locking was achieved by disabling interrupts except on PREEMPT_RT. PREEMPT_RT was excluded because the needed synchronisation was already provided local_bh_disable(). Since the introduction of backlog NAPI and making it mandatory for PREEMPT_RT the ifdef within backlog_lock.*() is obsolete and can be removed. Remove the ifdefs in backlog_lock.*(). Signed-off-by: Sebastian Andrzej Siewior --- net/core/dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index e62698c7a0e63..db6b6fc997e6d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -229,7 +229,7 @@ static inline void backlog_lock_irq_save(struct softnet= _data *sd, { if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) spin_lock_irqsave(&sd->input_pkt_queue.lock, *flags); - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) + else local_irq_save(*flags); } =20 @@ -237,7 +237,7 @@ static inline void backlog_lock_irq_disable(struct soft= net_data *sd) { if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) spin_lock_irq(&sd->input_pkt_queue.lock); - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) + else local_irq_disable(); } =20 @@ -246,7 +246,7 @@ static inline void backlog_unlock_irq_restore(struct so= ftnet_data *sd, { if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) spin_unlock_irqrestore(&sd->input_pkt_queue.lock, *flags); - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) + else local_irq_restore(*flags); } =20 @@ -254,7 +254,7 @@ static inline void backlog_unlock_irq_enable(struct sof= tnet_data *sd) { if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads()) spin_unlock_irq(&sd->input_pkt_queue.lock); - else if (!IS_ENABLED(CONFIG_PREEMPT_RT)) + else local_irq_enable(); } =20 --=20 2.45.1