Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp861885lqt; Fri, 7 Jun 2024 00:13:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNHAEFflIWpxaI+sl2UVShtL2VqKdkR3zb3NxBcc6rlyal5n/dYU9P0W3EHodCSpWyEgyPyx653qPaJoIIw16oGd4LisH0g2L/iglvPQ== X-Google-Smtp-Source: AGHT+IFqR42NHlt6YVmUQc1aNLLnqIiYiPXyOC285+9GjCiMghZ3us1vuzx2H1mmogqS/E1Icgrw X-Received: by 2002:a50:875b:0:b0:579:c117:2e75 with SMTP id 4fb4d7f45d1cf-57c50919c1amr911128a12.18.1717744379861; Fri, 07 Jun 2024 00:12:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717744379; cv=pass; d=google.com; s=arc-20160816; b=SiwjfLJaqUmJy4nmAORTCyDfJTgOYYQyZdR6kOow4qj93VXRyX6HsOll2BVzCwjvtJ lSp3FKheWdraKZksCAtuxTIPU9g0Pd+HHg9jC9DzMLCSb/iUpEM8wHxvuKxbgpLSPjMU QIM/A/wp9mQ4Y8xONsryU8LAHhTvsGoRcunDGA1bEPXkhsBRwWP0UeI7vWUssZBs/Oy0 tBOOH+CdfUTBZHxWdJ4JZkteiXQoKdeNlGX3+OQ2zggH5ioLnUpEMH/JoP2z4LHTqw5A LOMZD/my3LpC42SEw67kkQlrY3s4QUfbhY/WUpia0H5QOXDcGiRugF8jKsaH9t03WwAB VjdQ== 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=0YzaWGKH4pdlOZgRx7nAozero4nCYBfUB40Jz5/zFVM=; fh=pdglhcY7hn43FRujNlflNhJmhVsdAI6S//OyMfKpxfg=; b=RyQRpCCx41jmhRYXp8y2uVo7A06Q8kyM/3NROSKOyU0/lW+Nj86ffSjf1I/hal25m4 aKyxA/J+hUdFS5E9YXFFFPABl/T82dQRn51kzaKKN/sLovIFyDczTbEWzLpDieRnftJT RUVICUCOByy5ueMCvCf13JcOWelsWjbnqEoN5Od4IsxxoBuAAAOaRQIOazWMFg+8+Loq YVRJx9PFfVTuUwqnY5xMUkoHbnN7lmXMEa4xiEDZOExaPXN+47NFpdAevXOlEsDVRf25 PxWoY4FchXnM3SZ2W1SoSOP3r/sW0vPu1WFpH5HI2kmYEOUMhwNw9a0Dw+s/xbkFP0fP FhXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="El/853dM"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=szSt6j+J; 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-205484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae25c0casi1525886a12.479.2024.06.07.00.12.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 00:12:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="El/853dM"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=szSt6j+J; 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-205484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205484-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8D1081F29B0B for ; Fri, 7 Jun 2024 07:07:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEF2F157A5A; Fri, 7 Jun 2024 07:04:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="El/853dM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="szSt6j+J" 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 06BBF155333; Fri, 7 Jun 2024 07:04:36 +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=1717743878; cv=none; b=itVkDfNBrLME3Vo6rQsyE4KUbfHCFlLMJALEd+UXwYHKc9fzoNYHhHCeh6vaoW1OUyLZ1ioR7oB9pQA1ZXIpguxGdjySta05pGIIDROD/mfbknvEfp9RuZniVJI/sbvcG2PBI0xYR62xaKiqTw87kImhujnnbRKgRW2qxPVB34Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717743878; c=relaxed/simple; bh=eD4dt4fw0aatk5xk1+CFhA4XLqiGzZDl6PGjHb3adRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A+lZ1BIbm587oKPVZOF5y0Sb5FEf0Eosoc6dicwyzZcwr4gI33kX82hjhN7prdPzKJ1BFMjCvaM2zUmOFZ+EIZw3ipRI6EotIb+WeFCxgjsZzCLWSlq5Knqte/9DUGvqIAEjYocv8FyhZtLZiFfQtOlA7Uy38C8m3165/hxLgbI= 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=El/853dM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=szSt6j+J; 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=1717743874; 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=0YzaWGKH4pdlOZgRx7nAozero4nCYBfUB40Jz5/zFVM=; b=El/853dMSIc6CvyTPHun/CuKs4C23uJ2sIb9gHZkWGN7+kJT66y/o/mf7HQQoyvipQBLey eQ6ATsldjcRPhcN9FFk1hCPlpV0KmERmJ9PgSwA1YHuxUSMcMr7LPTBM+t4MgHHbcjQoG0 Dld71D3/vRqSXXB0agQrQbZC+XgwBpt2OHzMjK3jxKiNA4U7SfFtm90t38NllVGa4t3drs v6UbFLZW1CfRbhvx9norMq0J9ekdpWV8zIjTEGDE5KyMwDU9Wl9vsUOklEhqCNUxVonxfw p2HbqXFzj9b9F9OIqIOz3mdaLjhGZ2t6/etKmw3wbXJaot7cJZMtMWLwprk/2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717743874; 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=0YzaWGKH4pdlOZgRx7nAozero4nCYBfUB40Jz5/zFVM=; b=szSt6j+J5bFpE+tTpbTT+JPtFiN6txotlT9NL4NL95kpuWvwwEg+yi86I3SneY7bom/ODa CvGbbGoYLt0CUqAA== 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 v5 net-next 09/15] dev: Remove PREEMPT_RT ifdefs from backlog_lock.*(). Date: Fri, 7 Jun 2024 08:53:12 +0200 Message-ID: <20240607070427.1379327-10-bigeasy@linutronix.de> In-Reply-To: <20240607070427.1379327-1-bigeasy@linutronix.de> References: <20240607070427.1379327-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 85fe8138f3e4e..a66e4e744bbb4 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