Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp196374lqb; Tue, 4 Jun 2024 08:47:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRPrHUJBD++tvF+WnAD9jH7ymOx308kO5MNVlWjZdztbFk7tNtgWEvDpvK1YlKNqT8Hizspitnvg3C1OypQlCh/fAwBoPJ956qK9J5TA== X-Google-Smtp-Source: AGHT+IH3JVNwN/QwC1qvnVY8nALJ9Cegr92VoMSrVBzobfN6Yw0dJCiGI+igTxzIVUIGRIh1TMqe X-Received: by 2002:a50:d4db:0:b0:57a:242e:806b with SMTP id 4fb4d7f45d1cf-57a8b6acd8emr17947a12.18.1717516027943; Tue, 04 Jun 2024 08:47:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717516027; cv=pass; d=google.com; s=arc-20160816; b=mN4KmdbzyQeSL2hGkVgbOrrC4XrJ87xZpu16LKcoprw1/0ZXJSdeVyDupYYtN1acGb 3nAm/IhCHm0bUE1rJh9x5hBf9ALvot783J4lvw1BQ6CEfGzwApXgtcLUXlJWkZECnGzc WMeA+bYfWy1cJ5j1hsHxZWgbEC1olEnqtECBn74XjnLRZJ99fzXkNQsjo4YN+GERv6cg UvlF8Pk/UtTtubj4+k/8hsKCiOx1/dHtsxelk+vzUHUamyRcBgIU3GXI+C2Ph2bPEdhr eTb92fQfs27f913vxWFsGf0p/DZcycMQ/OkF87LcIacqeMaIAuva232UoKWFGhSXZfjF 1GHA== 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=ASGkM+nON62XMZ7m41bEfOssjt1cD1bQbrVV62sV/kbj9SzQCcx4BwoTQGgobg8HI+ v/3YY1egILu4+BLLODRL2h3Aronuxpdb69uT9EaAAGbCCwwd+tyCq3/KC5hRkDNZszTy rG5gPnFZogr5wBkOikAdjMML/4wJzxWMN1HrH/QD0T/1JgqeVFBjNRTmu0XkacU56zMK cJ/DRA45ORTCuIllPBQVlIxOuZEcJWBJvjJlXIwvTQtT/heMBD1E+OY5kuScN4Eunu2F Q1ioTeFWrEsqrvvMAbouZynRa2eclgfpSLsAT5V+jchN5gcOp818yxndYizI2ZLjl72l wOJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=z1zD58wg; 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-200986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200986-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-57a875db0fcsi430034a12.656.2024.06.04.08.47.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200986-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=z1zD58wg; 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-200986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200986-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 A68561F2357B for ; Tue, 4 Jun 2024 15:47:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58A7B144303; Tue, 4 Jun 2024 15:44:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="z1zD58wg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="FwMBvCAf" 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 05FEA148314; Tue, 4 Jun 2024 15:44:52 +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=1717515893; cv=none; b=t/xNXVCDfcjurNYQuuZQjRKTXVQt5Or2WXo7oqbmD5O0h7qH9sGUSuCzMZlMfuUl0vY7VHsI97mm6GLK6c+re/t+kWxYAj+fL37645qbcX+YgFLI31aehCudCinCi4rche9Yt1j9NXWRWKvYeRnGCopdtkThcBwM4d0Azi4VjrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717515893; c=relaxed/simple; bh=eD4dt4fw0aatk5xk1+CFhA4XLqiGzZDl6PGjHb3adRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TSXA4K4vWOO4ufAp+JqXgASs6t0gkU5QPuG/Fa/6rLu7F90RhIfl+7w9iCNjYP8T+yrkTZ+c2v6BVPVABCY3j3ycWeHjQ5mtmfzqISoIwTSdKG+pCRiUUBJ3PAzmQcyU07XGojDYbZSIjbw7UHq1UcTJXCNZ4fk7ZdYJ4tm9ezA= 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=z1zD58wg; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=FwMBvCAf; 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=1717515890; 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=z1zD58wgDp/B9bAoECyJgRwYqrPA7v5I6bbFPAkqt3Diy4d3fKsiohyWxDo40b9WjCT7Jl IqNi0ysE1HdocbGYtDDhYmTf0eEU5Dtp1cCjcmtK3mhX5wI3YLH70Fu5xkFi1nxe4q2bW8 +n+SksrzgE/mrbE75rz1fVSoScF/VQD/phXwW59z891Vbpq7iQAPWGF8t3faPtQCWd8zI+ GdAWpfZh+GUp2z9v10nRqDyrfGckWPYzjQmMMpq/U94pA7teyofbkyj/ZvxRuaqO2DOgD3 OdzVqT+9+WWGKRvL+TSjFM9QwZJ9eyILIimbaOIAdmkQvB+rsJ1AzvERgBFTeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717515890; 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=FwMBvCAfwBIvOI9xgKntmhP/zfKri5pOv/2ig/IdSp85vHr3XU+Nu9ndZXca0tVSr2hyVu acAUPRuuhli4b0BQ== 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 v4 net-next 08/14] dev: Remove PREEMPT_RT ifdefs from backlog_lock.*(). Date: Tue, 4 Jun 2024 17:24:15 +0200 Message-ID: <20240604154425.878636-9-bigeasy@linutronix.de> In-Reply-To: <20240604154425.878636-1-bigeasy@linutronix.de> References: <20240604154425.878636-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