Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp10044lqh; Fri, 3 May 2024 11:39:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXB5ViWKl4Anro/nixfrAEMWHw1JDoRzjC21MH/zBgXz5x2bqkHUhY2F8t45gAxaBRTttcTOZ7/oQMZ01qDCDTO9aGMfFMSYyoGi4prkQ== X-Google-Smtp-Source: AGHT+IFayJMtRvM5EC+NvsgxFsEW5IiwtKyCUhBNAlTuUGe1uH3ZBSeoTD7dOIDWFQ8zI25e44x0 X-Received: by 2002:a17:90a:de09:b0:2b4:35a9:65fc with SMTP id m9-20020a17090ade0900b002b435a965fcmr3882795pjv.17.1714761568105; Fri, 03 May 2024 11:39:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714761568; cv=pass; d=google.com; s=arc-20160816; b=chsBILWLhzTi40Z3WVZqFqQp5d2RG1nxQy1BYEap/Mb8ypW5RvaWjCLgFtSGaD5r+B wmhAJTibXO4dxyA40AYXw1xBfQcZT2en36lvRuRSt156SmTWkfPLuC/EE2mqPKVU9mwU 4XkX93TeYz1k65eIeS5YAY8UEu1Rmi4L/t4zOalOcOjP6IoqeXBfpZd8m/qAwctm/oNA xbDsr8Xq07jTPredAhiiCQOvbyEqf0MMTMsMpEOHRsEJJw9pgxM6t6cPo2phIALQK/3q /yuBwdxfoLLqNZLhsvZVNAyzBjNwdKDtbEaX6mKei2owEdQX6mJg05FzXVKPw65Cklff 1gVw== 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=hccXJ/tMSuJL/qI6XmVbVx3Yyp9L6BDQI7DM1y19Tvc=; fh=/jtzt/OMiRfUf/HyCpd2gbQecls8mvrgQhoSfrfID6w=; b=vY9yIkLG7Qdzd6ssyGlalQGRS45XOAQXWRUPVZLqFga2n1LVKNywgmYHuiQEWoJPlv twQT9F8cSJgxTllWeSWAB8315+DDng9FyrwXVF5rVEH1P773YliX6P3PAGdqfmyZehA1 GBKGiY9a3EWd1qeyJxRXK9j8mqRsbDCjDOLCUqCo8Sw0f+EUQKA9/5QGGuOSnFD7o4Sc rDJJf3LSB2orVtphYWOalE5bImULJwS9J7CJlMjMZObZTCJkK6fczJ7jIcYnruV5L/hr KO8Dse0oWYnRZUg1Vv702+81Exc7Y2l5aSQHSO9+NHqh/CtLQBgGXNizCMWmpmVoapAY ZUZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="frSEDg5/"; 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-168062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168062-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gd10-20020a17090b0fca00b002ad4890f36asi3570261pjb.173.2024.05.03.11.39.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="frSEDg5/"; 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-168062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168062-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 47AB4284BEB for ; Fri, 3 May 2024 18:32:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81D5115A4A0; Fri, 3 May 2024 18:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="frSEDg5/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rIyYwDGY" 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 81B23158D8B; Fri, 3 May 2024 18:30:11 +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=1714761013; cv=none; b=IGGyVzpqArLeJ7wJtsAbRreuZHqP4ioh/HLPew+v6G0ASQsm8BsdavcOaQj2zYk/7OYJP5Nto+UJXhd1ThQr3lArr4iFokpcyX/6HV9VVFmj5JTDRIqgt+CbBgUdOliICVxVZMJVoPY7AzWiymalZV5Lk0zq3yl7zTdSfkqUCNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714761013; c=relaxed/simple; bh=LVVqnyIbiCKyUaRvfyLa95e+IMRUFI5GejbEI60O2Mg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BxO88jCPoAthvv9rC1oiQ/f3s6SYN1kY9u7pVdws6G6L83/0lTwD2bK6neJcnoiq/eMs7dlJvWeotjk2pluDHeGCJAq7Cj33bTo/CLoL0cgFYKvas76lH5yVIzd2js4qVbzUoXDgSIcSnrmuC15FmvB+iu9+fDzxrZm5SOrCW5A= 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=frSEDg5/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rIyYwDGY; 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=1714761009; 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=frSEDg5/LwZG4mYodLbulmlP7vse6VIu+qtvGfppw5wQHXI2+dXANmQqF2YLLh90DwCDEH yItXWq4EC8E2Z1UZ5uHHk7iVkoX1sI8QiQfXVgVJAbabJ2ULyyLW9s2eilAdQAXEsq2BjO AL60RWkWNxvm1hIJzx5mLJUnqysH0WEebz4pqEz6cUJMarwRC1N+SB6oecpJpBKFqB20uv AzlTA8PxjkGs7q33UFsD3j0jm/LOVUzMQwaanf/DwoVAUJUYD/PnY5zgX2A0AJDTHuhD9a oTcSa5WHVfbyRapeJuv3GD4uQaP3WIoCC77sKscKjVe+rV/jF0SNxObMHezfqA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714761009; 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=rIyYwDGYOcqOApqkUA/imNmArMjG8d3+vT+Qdv/NJKsa+q0JpOVsFBCOJk1CtfQ7XoNIpX /lEBZB6Cdj3KaeDQ== 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/15] lwt: Don't disable migration prio invoking BPF. Date: Fri, 3 May 2024 20:25:15 +0200 Message-ID: <20240503182957.1042122-12-bigeasy@linutronix.de> In-Reply-To: <20240503182957.1042122-1-bigeasy@linutronix.de> References: <20240503182957.1042122-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