Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp589631lqp; Wed, 12 Jun 2024 10:06:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmULwFewYFzhRpsB8eovQXKAa6ey/DEY+MLv3zmSF77CUrPMoMbCwtCLeurIenXDQuJxZQwtT5ulSx7h8WEUXx+sdeNz6q+MB9g47h2A== X-Google-Smtp-Source: AGHT+IF+Qc9VMvA9GasH8GQ97A5l77VAghcVvHRyEDCvOaDeIbpCRorv3ZrggnOt5tCpNILLe5Js X-Received: by 2002:a2e:84ca:0:b0:2eb:e471:dc42 with SMTP id 38308e7fff4ca-2ebfc9329b0mr18963521fa.31.1718211985305; Wed, 12 Jun 2024 10:06:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718211985; cv=pass; d=google.com; s=arc-20160816; b=Ka+wUiI2oCHZd3eyLQrFu3GgyUZDehTJ9EfitYupt+ofZ3KulPuSxGTL06I7XV9pQm pYL43buI356V4bFVfam748bc24XqMV7GAcDWyOcP4nMeFSxTrW9UCsQzYMnOdcQXc543 hwMforXGZqDobgNw/WmnPaPc7YjbUDTaVTZsS4ZpO/fZwD3RU6gPYHZrizXC6OdxN/vz a8nwQVPD7tA2hpozNGb+ZSc/cmrsuiPF0uKgNu0r6//Nojmt+a2VYqRUMLO8gm/HmxDe dGxXZYi8D04AfgbWySUDyeZteT1N+MgP5lt0oM4UmT+jkA1fkSV5fXqm+KpwjUqJzAj8 YNWQ== 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=qVz6zOOy3+pB1BkGqEdmDIfpQYvSTxkEugnUEzk0Ir7BfZk2GsW9U1DADthxW1OXy1 EtCXY4S48m0Ze3Of/SvRr01x6ofpvPllXU9Wi2uIwn3fI2J4lyggPmuK9PcAYc10XvWT Y5WUoux2qBMUTDQntUUDA65nJ5rX2j+DMYRfBWcYRQR+q6OlhXH/s7FEHwrU9AJvTDV0 bJAJueBhH/4nIUayUxCkfAeCQtrmXg+YfyK33Es6obsy3tCSqA2kTyiDPI/Ju1IuJ+ba 5pYNCZNSztTA0uaP6751xytZcyS7YJ9wGo0Y8DiSlfphz1xkHDF8ZCATokArRN4aIvkd S6Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zlz2kndY; 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-211971-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211971-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 4fb4d7f45d1cf-57cac15a512si866626a12.435.2024.06.12.10.06.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 10:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211971-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=zlz2kndY; 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-211971-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211971-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 08B1E1F233DF for ; Wed, 12 Jun 2024 17:06:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A452186E5F; Wed, 12 Jun 2024 17:03:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zlz2kndY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qGMkRatw" 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 A2C231836D3; Wed, 12 Jun 2024 17:03:25 +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=1718211807; cv=none; b=E06DfrINn7Z3g1GQPIfYqF6lknJlY/n7HC7EQ21iwsw6hOLY374wxOn/mjrkF95jbS3eUIIA8Yo4FDRMKmkEioHP8exP3yp9raunT6fWs7Yvm9orNHJSt7FipTFv1pwY1Bj1AVc3QWErkCGzPqLQHifgx1Q0SI9ywO86Q3gCFZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718211807; c=relaxed/simple; bh=DjKGXeuA0iicBNAujBOCeL9L9FyYM7749w3HflY304w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hmVWCaW7qXxwD5aMLeXN66/HFkiQzN44G3ZFPbWs9oLlxANtNBKCmeCED4bEi588uQSyOwK+L71dBtz9fwcq8lwYHe2BOpPtQhfzkl1bSktUcnvabKyM59Jd3MC+FLoXc3OwTkAtLMjXtXf8+1J0qGNlQD3O5oP6x+HAZerl4Xk= 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=zlz2kndY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qGMkRatw; 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=1718211798; 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=zlz2kndYk0cGnExFiLFFFsJfFORTVTEtlYosk/JAK+4+91hHTHsnPxTLQWzcFkK23KYBek jwIn0g/bsPc1ykU+Dq06BLtPbVpXnRfve4JOm4ENbLk1IzkSkfwk5jTvW139MTiqMeKfUz H8g6ZAW94ku3jM2YqXz1MjqneHMq3tSSH8R2M8uWCFKQijYWrBwKgrQ0u/9xNoqyhviqyd eCTb3AfRG1mO5YJNqt7WF9nloFHHNcYhMMYv1mIEIwd2KT9ssBmexsrP/XNG+iGLQfbAU7 2ft2cNVBifhygb36V9GGh+kTVPyi+Rykjoyjkp763ZAMAO3Zj/lMqWbLOkj6Sg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718211798; 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=qGMkRatwWIFvk1SlmnTOLN21KY5kH34Sa2+TEbKYeLZBf9lCfui2gfJJoD1I+GMSB5TUd/ w3B3OYroyowYw3Aw== 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 v6 net-next 11/15] lwt: Don't disable migration prio invoking BPF. Date: Wed, 12 Jun 2024 18:44:37 +0200 Message-ID: <20240612170303.3896084-12-bigeasy@linutronix.de> In-Reply-To: <20240612170303.3896084-1-bigeasy@linutronix.de> References: <20240612170303.3896084-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