Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6825946rdb; Fri, 15 Dec 2023 09:14:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHS7/ow0SO9IFSHSuEwJQarmsC/Ki5R2CQ97xC6W5yfI/Gd2dPin3MDdzKlfyfqHMkQTta1 X-Received: by 2002:a05:6a00:23c2:b0:6cd:e320:b0d5 with SMTP id g2-20020a056a0023c200b006cde320b0d5mr8226969pfc.12.1702660477621; Fri, 15 Dec 2023 09:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702660477; cv=none; d=google.com; s=arc-20160816; b=vqYLXjM1XJ84RJdXQWvu7B8r4EIjXGIIf4k7TkpX4LUJvW6unBq2enOOYIWxPr8Kl1 +rxPIz2gRoVyOfwd/hIxbGxZt14Szy2TTvFSkby7P/V5moI6ZjIE1jhzFiA0EOQ48v74 VhPsMngKw2Q7RHrHYLEQP/PpSzopVDvA0oYv+krG51GYIV6xr4phAcwaBl1w4raplmuJ iCbSKXbrXUyqlheJsn3danGCUjvuuAvUCvoim2yFkKnjF4Puu3FqPH6rAMEkTUfti7Ce GZq0WevYdeJhAgKCv+Jz70eybR0qSpcwSciO21WChKuys9OQDB2JCe3A5tkN8e/6Tkq7 8Juw== ARC-Message-Signature: i=1; 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=hccXJ/tMSuJL/qI6XmVbVx3Yyp9L6BDQI7DM1y19Tvc=; fh=/jtzt/OMiRfUf/HyCpd2gbQecls8mvrgQhoSfrfID6w=; b=m7cjP9pIvwDpExErI9/PcSpkL9YNS5WlazCV0RJIgZYA61VAbg12yJR6/uJubt55k6 bo47L79RAM1OAGOWDKNDPiCcrF8Ql4IPN4hCf/8T3iN+HdO40CG5znwz7GWrcMFKJHwA 4QVUcdvjeigE2mZNeTZd1Vr3DTruo29+tewLEAJa6iyXMUSVtd4SiGR4xMY19iS4PGhX yaKAJSITavR6PYi3hzMAXAYEcmEOXs8Ks8EGVFbJIvAXtIgwtDkq/sPAkPyBcueQr5aa OyB7FM7DOIqzi/qHeI9IPiVnn9d1saBIwi2BH3JVtma46NEH/I8mMmJSga0jOsPuBaLo 8kow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H1NRUxma; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-1373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l5-20020a62be05000000b006d28dec60cbsi67417pff.251.2023.12.15.09.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:14:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H1NRUxma; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-1373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1373-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3818E283B25 for ; Fri, 15 Dec 2023 17:14:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63480563A2; Fri, 15 Dec 2023 17:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="H1NRUxma"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tUXBTMv6" X-Original-To: linux-kernel@vger.kernel.org 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 58ACD46426; Fri, 15 Dec 2023 17:10:37 +0000 (UTC) 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=1702660236; 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=hccXJ/tMSuJL/qI6XmVbVx3Yyp9L6BDQI7DM1y19Tvc=; b=H1NRUxmaM4/3shLHnigobXH0+djwJ1RJjGPcIJDlF0N7BGrPMdnqPLHiELW8Hmlx1noC0i r1wj1L5ePShhZxc82oHWsH6Hw9DhpjoZLDGLaU8lR+VVLxHtWBk9567g8GWAZ/BOAjqTuZ nHIlJlGUKulxv4K5ZmLb4Gk6KO/F8bKZ8ya24TNtsI09icbM/d8III+vyi7PGeQIELym7F wSrjfAj6u3oZXkd3eX3oE+LERBTkt/OC7BBSHGzwEClzZpbU+TzxyLOj/Qt7Uhs4s4Xlnz U/nMajMYyWPC5h66bEfxOJoI4i9s6vEgWoFzcVZHEoGFOD0Kka/Y6RUnRFvwrA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702660236; 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=hccXJ/tMSuJL/qI6XmVbVx3Yyp9L6BDQI7DM1y19Tvc=; b=tUXBTMv6dK1TkctQDlxmz7vleUMV7iKdmqarsfLl2XSKRjSuNxKw9tqGuTSp2hU5RMl7XJ IAK0IVGYLLdl/1DA== 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 net-next 11/24] lwt: Don't disable migration prio invoking BPF. Date: Fri, 15 Dec 2023 18:07:30 +0100 Message-ID: <20231215171020.687342-12-bigeasy@linutronix.de> In-Reply-To: <20231215171020.687342-1-bigeasy@linutronix.de> References: <20231215171020.687342-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.43.0