Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp754920lqb; Wed, 29 May 2024 09:32:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVrKA8A+RReaz8599SMqx+Yi51MR1AIT0HlKO7Tb3MGIQVXgz5EUtZnSCGC/k/lNihXAY9+u6iEyNLJ04AXWe0pn9LzcQiTSlH9gM+Ow== X-Google-Smtp-Source: AGHT+IEcWSEunQ4lvHUNq0uiTyKTiyjUxA+knMSLTf7/8LeoJu4zcWmh4fuBPuekXBiQAsjX8n2i X-Received: by 2002:a17:906:97c3:b0:a63:2698:2163 with SMTP id a640c23a62f3a-a632698220bmr694708466b.7.1717000342770; Wed, 29 May 2024 09:32:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717000342; cv=pass; d=google.com; s=arc-20160816; b=O4Igi5KYgVUFxquNGKq2NUJPblJfT8Cxr8gbbm6FI6n0aqzyjRETsoX3OVJRet9nfO KgxkZJ5ko6UmBpG/5+5z/8bx27yR3713OhPtzqhLv8n7npKlTbT917daJtpZqsEOU1TR uPGb5FWI0PujTp2UaKs+vZ2Vl/7aNLw2ZmvWCiHFbJdAXHnHOXZJwowJJnwdo0faOn6y wGAaXDr95iXOjq0AFrTi9uSvCp+i7aU6ZTgB1GNsgBa6DRf2p7tPq55rWkCJzwFOoP/N 3AmcDcMpGJ+4zoteMWz3QgV9Ey9YJwxvh40mrbNy/dI9cind7J9UnX8t6psRUOuxXQL3 6S0w== 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=9Rw/2cnJ+Iso5XuGakDzbFuKdfRtLkLToskmRVbIvD0=; fh=/jtzt/OMiRfUf/HyCpd2gbQecls8mvrgQhoSfrfID6w=; b=jK56MW8aCBlwl60Lv0q8oCulsCgC3LTwzClMeimwQAHfZ1i9enhZgMXY3SxhvINHku v+m5wRqeG8Osjw8x89SVz9OZbXOmBgcPj4Nhoh7vT8tKq/jQmyDYLPyaVgSLJdIjJObQ NpX+BVBLEiwl1Wv01QwW0dlVzc8WF/EC+YxFJFg1FrN+I23HdgLPZpDlHF3A1NwHyW2l cR8h8tmO7Rn+Tm/+UPeL+9vfBJOxTV0nQGcAI04Q6iy1dkl80jmvRCX8Iku84xhmSJDA ZhIpegTTtedmntkyo4tf3u28YhNidQHWHprU4PjkXlYsj8Rjzr2ZxzCaN9ZI9jUwoy2I ZvZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MdCObOG+; 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-194457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194457-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a634ac0e4b7si195118366b.170.2024.05.29.09.32.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MdCObOG+; 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-194457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194457-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 49B081F26EC2 for ; Wed, 29 May 2024 16:32:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C01B01A38E0; Wed, 29 May 2024 16:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MdCObOG+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VE8oE+W4" 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 461CA194C86; Wed, 29 May 2024 16:29:39 +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=1717000181; cv=none; b=NjJn7wQe7OkVYqRK6wdye1JGMxqOfkkxVFCjAn+yfzS/Giczbu+VPDVyDSlsWkmZl3Wa5aQfpRFd9CtC/IWjfX+VjQ5MMIIG0qXQoQwoMKcOwBmD+sgPuHmFcrWs3zRYfaMGLQ0WLA2tBHLhqA3l5Rxdp6wF+FGPC3F+a4TAjBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000181; c=relaxed/simple; bh=DjKGXeuA0iicBNAujBOCeL9L9FyYM7749w3HflY304w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lxd7E0HYBtmf9H2gYM1fKDEfbBaZawhBvy+t/QP4DaHA0wVlnIQQCos5jI1lnx5VZd3EdXOXej6StHStPti0byS8bJj0+JNLoOFSjFcV3vheP4khG7WDi3mgklfGYf0UXBsGlAiLB9cABSE1GetXqD3UR1btJa7o5T3w/nKuRkA= 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=MdCObOG+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VE8oE+W4; 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=1717000177; 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=9Rw/2cnJ+Iso5XuGakDzbFuKdfRtLkLToskmRVbIvD0=; b=MdCObOG+J/GpwjR5rYtHkSzuz41aPalaWZJm0fU7js6GXsmPRbpXmUklx5l6mOPMFDFDDY 4f+vJsxRV+DmTHakYeiWMC8MNjtWyJD24+VJPSvxUmUPA+9iMMhTmIZBHcH8fchS13X9w9 mnikWbVIvpVYdR504JtlV4abVPhkMyxV15IOdz7QqREAILK7PilW+s4/sTNWq2r1FxiTF3 9GfrYSEVqeaF8mjVR3SB8gr79MpP96YcV0jzNtcZ7R2ylEoCO8PK+VJxJYtIRSU5nTxvvh Dv2W6tG8PSiQ2G31lgjVtDBnFNmkTBcmIbGr9E7cJ/1xMvkaAeJcltBzhi1oEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717000177; 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=9Rw/2cnJ+Iso5XuGakDzbFuKdfRtLkLToskmRVbIvD0=; b=VE8oE+W46TJ0618sV/A6MaCiq4c3qaPd5tApxKGvROyTXUFd5PmqpDNPnDukaYDZPQmdwm 2DbYUyP/8Rop+bCQ== 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 , bpf@vger.kernel.org Subject: [PATCH v3 net-next 11/15] lwt: Don't disable migration prio invoking BPF. Date: Wed, 29 May 2024 18:02:34 +0200 Message-ID: <20240529162927.403425-12-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 There is no need to explicitly disable migration if bottom halves are also disabled. Disabling BH implies disabling migration. Remove migrate_disable() and rely solely on disabling BH to remain on the same CPU. Cc: bpf@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- net/core/lwt_bpf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/core/lwt_bpf.c b/net/core/lwt_bpf.c index 4a0797f0a154b..a94943681e5aa 100644 --- a/net/core/lwt_bpf.c +++ b/net/core/lwt_bpf.c @@ -40,10 +40,9 @@ static int run_lwt_bpf(struct sk_buff *skb, struct bpf_l= wt_prog *lwt, { int ret; =20 - /* Migration disable and BH disable are needed to protect per-cpu - * redirect_info between BPF prog and skb_do_redirect(). + /* Disabling BH is needed to protect per-CPU bpf_redirect_info between + * BPF prog and skb_do_redirect(). */ - migrate_disable(); local_bh_disable(); bpf_compute_data_pointers(skb); ret =3D bpf_prog_run_save_cb(lwt->prog, skb); @@ -78,7 +77,6 @@ static int run_lwt_bpf(struct sk_buff *skb, struct bpf_lw= t_prog *lwt, } =20 local_bh_enable(); - migrate_enable(); =20 return ret; } --=20 2.45.1