Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp196357lqb; Tue, 4 Jun 2024 08:47:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOPg0L/66TTz8Xn0MH762r++dFu/uZ8cOTzKVkfEIK4Caj+abxmeykTCH3T62OX9qvp2MSnYPQ6k9ACspD6QyYNmX5vHEt9T5qNu7BSQ== X-Google-Smtp-Source: AGHT+IHr4mg0+fY6v66xnX0A29sg8nBhCXN23yPJpddbge1hMeUdKN0EIVBwW3wdAyxlbMPbXGtc X-Received: by 2002:a05:651c:2223:b0:2e7:2c84:4f65 with SMTP id 38308e7fff4ca-2ea94f5a5a9mr125621021fa.0.1717516026980; Tue, 04 Jun 2024 08:47:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717516026; cv=pass; d=google.com; s=arc-20160816; b=Tys5AZF0ghk4nMX7hBEReXFcFBQG4TaqE9JkVGQUtweEsytC6rOjkkGO6VvxqhwXqr fY3qHS+VG43hYa/3AMdHOuaEC/BVCOrZ0xg55Nf4cKH/Vuk7brTxWc3Wy/D4ox1K7l2c q1h2aCx4MJUj9PEucTDRccsl+cvpc2IJviTMw/9SsOlbSoFp+K2aDzl888dR5I3ISW/7 OVyT/KeVOHhR6YkJs2iUHV+PNctkuMYN8+vxQzEU/QmQ/WWPy2Yb9sjeNQEzFLoeM84O aKA4Nt8MZhGE9K/Enct8XdNERI1tQzPRzEZ7XYx74QbVBuAzBTCdIBkff9r2hyb7ywFQ ucng== 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=g66QnWDj0ZOHJsXkJ3eadheWKj+Pa4UYPKAMl5hFPRA=; b=NAE/r+a4JGDErPYf2/IjlvsGrH612CH03uE2Mx8UokMV9ab8byPRKDjLDrLD73hmrY l0K0h6t6zk5qkFiWVC3jCp6BKQKlNT5Csmrso19CGguJjToc3GJdNTUsmcWavJX3z+1c pBYABm3Jc8KCcIiagkP7cUy8EJcdmRX5PTlGF8d4vcbqzwBydWz5WGUSaavYX6yiPx88 tYq60Nv1iQgpnOTkIrWsX07RaCtl8waJjbM0XIux5lJqXStYhQy/LtwxnNKZ2flhIog0 87xUHxTK+vr46Nqqd342AVVmm/hWGub38XpDkAoIp69IYYe70yxV8bNTnYmvf/xzWOY2 P73g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FYT7j3u9; 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-200988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200988-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-57a31c75bf7si5110437a12.362.2024.06.04.08.47.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200988-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=FYT7j3u9; 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-200988-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200988-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 AABED1F23548 for ; Tue, 4 Jun 2024 15:47:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58AD914A09C; 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="FYT7j3u9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="/BQgWl+s" 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 5CCE514882D; 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=jiQw2J+bKFh7aKx4vQKiIuzo3mi9Yw/WjDunv/bEJAArr3CJkmjkRP2WrAuWjninQmdW+oI3MEXmJu36KSPH6eauqPCFLC88YQpLjXWbvdy0zhE47hCpFrSmzYOP2DeTysC5ehsQgzCm65KOBG4lX27a5jNRRgx7USDfM4GskEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717515893; c=relaxed/simple; bh=DjKGXeuA0iicBNAujBOCeL9L9FyYM7749w3HflY304w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BtSI4UAHQGX7SWBqbMwxJ9QLcBIzkoWd9d8gahj5EYv90NaZI5d8BPLf68tw94wqqi0T4yJZI74rnWCT4iPm3/sHb+UsNshGa6s7KluxA+nGAZFXWgzdeeWLPVQADrhyv/G7wFYHy4Fonk3POZCm8RopWloJ9Q4DhWe/3dAT0hw= 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=FYT7j3u9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=/BQgWl+s; 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=1717515891; 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=FYT7j3u92/i/8Sx5Il3T/W0XVW6jIWM1wYgSXZ7mfNf/BJeMypkehw315AjK10/XSPcIB1 ZZB5C3R6hfSBVYNTGWXArPhobIrd2gYlZiGBpGiIBagon3+ZeWhcXgkdKLWZxS7iT444DN vJtPwzzu+GdkB6EMW2eyP/sQoSRb0d6QO6glh9K2D2xUBxXCvnLYYEdP4BJ7wIWgdCGcVL rvfXz94a7kbctm+6UeGLIeMb5rqzODKK7hAmyRdc3BB9A/WXJJk1XRGBYkwMLW0oXWWgzL y6HXaLlp5FBRvYPWK/R7SMPkVboQX6s8aByaIxZ47m7DCH2paiPs1OWZeKgBfw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717515891; 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=/BQgWl+suUnNiTzeLCG70TbsQSCwhuBBw2P8hNvXUUE/1I9+NEsbcLVf7A0AZWgHhCIJ0h cOuMvLJB4TyKgnAA== 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 , bpf@vger.kernel.org Subject: [PATCH v4 net-next 10/14] lwt: Don't disable migration prio invoking BPF. Date: Tue, 4 Jun 2024 17:24:17 +0200 Message-ID: <20240604154425.878636-11-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 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