Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp859727lqt; Fri, 7 Jun 2024 00:07:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+YKQAd7Giyfcv/QWSgMf4ddWjvTZCMidxJHKS96QDDTwjGODBQFjUaDjAhSo55tGSftxLWw2o/LSJpu65WgNdeAByZlJnVGzFSvwmuA== X-Google-Smtp-Source: AGHT+IG1hETv+TVpIvB9Mo5Td4BAh71xKuEC2+E+q4QmyY+4xu1E64zZT6cc2oGE0ZNfpeIk0x2R X-Received: by 2002:a05:6830:4390:b0:6f0:616f:f186 with SMTP id 46e09a7af769-6f9572c957cmr2031097a34.29.1717744042212; Fri, 07 Jun 2024 00:07:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717744042; cv=pass; d=google.com; s=arc-20160816; b=Q+1mcR9v1+nYs8my66+QXkr5SuVNnRfxy9fIugy85tM9GMzJuuA8aHu7ijSjpqGe2D pXVBW18oq08jjjVv8B4dXVCFoN4y94EoJK0+Kjt47TpJcf3vhslnVEAkzPq/bA/ZIZ13 HZT5bSGAyT0SWAz94uRqAugTwv2DuCvZYa9lUz0YXS8JLdRtd7tkm+pdMF1dI+/kMaMS Mj8nGCcNQt+XcVv0hnHcOzHrhIKWBe3dQh3zXNySwCJArWrS/MPE1pNaejAapkH2+1I7 N4TFQau0cYTFrUo6ya8y3CWt6YJgcSsrTfehcViiHujVsW3qCGL6igDLFm4YiDgw2W3D Jkuw== 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=EhR1jVkCu2Y+ouvj9zkevPooP1sO17F7GB3DUjFJNIE97JvlNM5WdTCQrXNh0W1Arr gSjKL52oYiLW28+EOp+S3b0vtzSA4kIEw+kbdLz9W3acGTEFm/KBgXBrCmaeNvJ6T1Uz YtXeCY2ZT3jLp8sliSQfaFFnyS1S8SCpB3s2niKaSmjgeJ+YceKSo+Y8+BPFl7ZpS7Ly IeSjeZzANaJ8ZtigRBDBapLpcwmvH8qjkg92MJd85UgMc0urxQLZwLK52eYH7T2FXh7S tiRjvC6PQaVVaf1pCfs9kMmvGTPd/pyK5GCaD47dU7xQVipwdK2GeSymR7VmmX4ip/hT N7Sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B5HLJwEv; 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-205482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205482-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b7cf35si32246451cf.727.2024.06.07.00.07.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 00:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B5HLJwEv; 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-205482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205482-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 087A11C26CF4 for ; Fri, 7 Jun 2024 07:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A850515667E; Fri, 7 Jun 2024 07:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="B5HLJwEv"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="++wmqx7Y" 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 0985B155342; Fri, 7 Jun 2024 07:04:37 +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=1717743878; cv=none; b=obyL9p65U4tn6xp+hT/Ma02Feqcp9N8tnadOVf2+4S4SXG3dUOzcklc3lWCjqt80RCW6s3cWK1qmSJveyJQsHqpijDkq1V9+Cdfw9YRMJ6gubIV+d37dEHC6ni87waXK03Fpi7iFHPm3Si5mwgveH+d3agATRdLqXHoMBtGj5ws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717743878; c=relaxed/simple; bh=DjKGXeuA0iicBNAujBOCeL9L9FyYM7749w3HflY304w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WEWp0C9JJDSrPPqtIip1ulj7FrZvUPLhFcSrxME/iUzxI2F7C5DSkpZcE6mjLXBYCTAf2DokyZTmcDhnba5yTyhbUiqTsNr54LiLZiKC4x1H8lmAVtjdAhOu6x+gbVQ0chglFFx++sY38WsOizcFfkHIRfJ5UOezCcSRB84hzlg= 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=B5HLJwEv; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=++wmqx7Y; 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=1717743875; 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=B5HLJwEvbdDL67cuRIMH83NhrazvRRXf+GheNgAmOm55GFKplqHb+BbUEsCBGCDzSoB6Er QydhiOZLFgZ3Hipkfky6VhwXvko44Hx6c+wPRT4pkn2ncJLL9ohv9N11zECApg8ASZbS0e b68/B+285+0wlsvcsfTMRH8kL7I5WNeyfayOAn4U1lX9/uXVOv9W5qz7Z5hEiC5EjkcQQi /GjqOWYbiHBXYuq0qDXhnH6laZh1kJQGmgmt9Ngc9yX103XQ7slpJn8xHyeULjMdWiRxKb CBLL01qb8GSsWpr+c3jCQo0SvOA7PLTLYVuE7E2iOHIqI2P8q45Jfq+jEGIJZw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717743875; 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=++wmqx7YYOcpm43Q2FciC5wWxVvP11ecY2irqKPWzmX6ZuP6Ox+DFcX/JvxKtrmnP43oSi befjcvacY4waRuCw== 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 v5 net-next 11/15] lwt: Don't disable migration prio invoking BPF. Date: Fri, 7 Jun 2024 08:53:14 +0200 Message-ID: <20240607070427.1379327-12-bigeasy@linutronix.de> In-Reply-To: <20240607070427.1379327-1-bigeasy@linutronix.de> References: <20240607070427.1379327-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