Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp754320lqb; Wed, 29 May 2024 09:31:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzMYta9a/z8N4mRGYR1+HOMURUSEWwIdYN08sD67nspg2MEExg0j8HzUP2Sdr+xYJf4It5JpXXaGA5Lcn/yClYr6h/pkTxbVVJfYChyg== X-Google-Smtp-Source: AGHT+IHE4MRlVJF0OAmTRVl/r/gG4Hg6rQiHeO0JNvNez0njNN6tTBeMalsFBn25Q3UKPDsQQV8d X-Received: by 2002:a05:620a:13cf:b0:792:aab3:45f4 with SMTP id af79cd13be357-794dfb71da9mr412208685a.8.1717000292054; Wed, 29 May 2024 09:31:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717000292; cv=pass; d=google.com; s=arc-20160816; b=AYFI4/7/JlFj18F7IDwIKnE2IdA9ZqlKQvclIMDJjk7i4rW8AYeUdhsZ3WWKJklS93 l/slpdBs374Te2IOGTAXbiCx+UNWkf/zX29v1v9fcfVPyW4RmP94vt7aEa4wP+9Xh41f XBu8by7rF7l7GV6t6h2eg9R41DTiSD0k6zR9sc5E4bQriRIn+JqRG75KzOUc+PsDzKBM yOMdXCQ3jNjEG0PO9znTiHvn2urtfdxZ++LoEU08Zhn+N9iP7b5Mv1L8M32fQ8Yz+nJn 5xRj/wxjWUw6C619PIROojkDqINxLDhsuH2ku/owy+tNDyO+SJYhG8wLnOzEKOw/Mzej UZ4g== 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=mRMHo6FEBd+e0N/0wwmt9BaEcwCnNTE8npQn9DDRWX4=; b=jlg5B58VGs6MsYMBbFiBnfINjmt6I0WO+mq0iz4QsLBYsQHgPzj3QH5b3kguiNRAvj jq82mMTXEiHRUNfpzqC5Sj57eU7fQQf2BVh65srE92/bC5bt4pwh4wzyGfMy1P1QUJZf wxIh9B9QcpV00vWbxLDvX+MpnmLYTwYjD1//D8hKWOpq4L+HS7ZJh5/fC10zQh1Zznw6 hfCTCu++AMGd4khb/4pJdNRpPLBjTmm578Is2cLmgFr4EGy3lFyDE5OgzttG9hzszGrH e4j4+no8iqVlwtBAdQ4xOpKAXjQFvkx/OrqvUcmLIVjk40RsCe5G3GiM2UUWxALgGypN up8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=T9AFMmLO; dkim=neutral (no key) header.i=@linutronix.de; 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-194453-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194453-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 af79cd13be357-794abd0a839si1267286785a.253.2024.05.29.09.31.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194453-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=T9AFMmLO; dkim=neutral (no key) header.i=@linutronix.de; 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-194453-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194453-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 C34B41C20938 for ; Wed, 29 May 2024 16:31:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55ED719DF71; Wed, 29 May 2024 16:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="T9AFMmLO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="T5N82QIl" 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 96CFE194C63; Wed, 29 May 2024 16:29:38 +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=1717000180; cv=none; b=oqRyLFJfsct/V49SYZ916/cHQ1ib97pFxTFHkWbe0qQRe4nXYHmjEtZhXPP7VqSHHxY1qsbhbHBkXauHWvtAWBiBZBjjbholOSRSThsavAKh6UNzt9QgwN4DnOSORSwpWVFqdt/GG1aWKRepGERTzIqC+hksAMq3XcNxGz9azGQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000180; c=relaxed/simple; bh=eD4dt4fw0aatk5xk1+CFhA4XLqiGzZDl6PGjHb3adRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S90+dTOFkDIYpzT17sm2hDY0lDnPMbNVD6sViz4hboUBp4QmZu4CDzoUHXAAVwB82lZo+OazUsQm8RdNJgG1y2U0Wy+bvU1voUArUzvK97CpdkhX1MFhQxVXr3JH+suSNJVKb8JpX9plCEmEVBZHdU2owaO9w5pZIP69G65yahA= 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=T9AFMmLO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=T5N82QIl; 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=1717000176; 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=T9AFMmLONOInuX5MJfFRMZu6WDgFhryOW/Py2vjdI0D0GBfDP5dP2ZQrZuTDqhZi5tgwt6 vDzB8Vq1Tk2lC2Xlhs6A4ZqsIBryyIg7i6VD5euS9l7uiHwiEuReCDRTOvP0GQmLYqCvDi +mz4og4AWSLG2gpKa8Bhg4MTHiYYvFRnQI1NdhUDr4+OruOiP6ltm86isEF2tn5L4RHaKE rawdWwYh844fLpbqIH57mjSMFrS0s4wGqi7v8ss9KB6ffJIM7rQ7qJ9/gaTyxNsWTnJedg WeQj8VpSNuWJnrUEH+6VyNL6nZb727UV5ef+UddolHI2KXLhYt15IPCtI4JmLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717000176; 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=T5N82QIl5kRvLxQdJCnBc/LwR5aYjwjOTivXE3vyZPU0nVcZtkHl2brwh35Huo42ojmZcs XuAD91f2/UcHL6Bw== To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , 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 v3 net-next 09/15] dev: Remove PREEMPT_RT ifdefs from backlog_lock.*(). Date: Wed, 29 May 2024 18:02:32 +0200 Message-ID: <20240529162927.403425-10-bigeasy@linutronix.de> In-Reply-To: <20240529162927.403425-1-bigeasy@linutronix.de> References: <20240529162927.403425-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