🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16535

Re: [PATCH bpf-next] bpf, tcx: Skip RCU synchronization when the entry was newly created

#16535
From: Qi Wu
Date: Sun, 15 Nov 2026 04:41
29 lines
9999 bytes
On Sat, 14 Nov 2026 19:06:55 +0000, Alexei Starovoitov wrote:
> Lets do the same in bpf_mprog. A new bundle starts with
> get_completed_synchronize_rcu(). Then there is no need for the
> 'created' check. netkit needs no special case either.

Thanks. Recording the poll state in bpf_mprog_commit() and waiting in
bpf_mprog_peer() before the peer is overwritten makes sense, and it
covers the clsact-first and netkit cases the created check misses.
I'll implement it this way, test it and send v2.

> synchronize_net() is expedited under RTNL.
> Should tcx_entry_sync() and netkit_entry_sync() use it?

For individual detach, using synchronize_net() looks reasonable.

For bulk uninstall, I will also investigate batching the updates and
waiting once, as the synchronize_rcu_expedited() documentation recommends.
There are already synchronize_net() calls around the teardown loop, but
reusing one requires checking the notifier and ndo_uninit() ordering
before concluding that the per-device waits can be removed.

I will keep v2 focused on the bpf_mprog polling change and evaluate the
teardown changes separately.

> Way too long. That's 100+ lines of commit log for a two line change.
> Keep the problem, the idea and one table of numbers.

Will do.
Technical Details
Message-ID: <20261115044146.163548-1-shijing.wuqi@linux.alibaba.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363563-linux-kernel-netdev=dewy.ru
References: <20261114124039.111360-1-shijing.wuqi@linux.alibaba.com> <DMV63QDBPR8M.OQPRTU7QTUUC@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363563-linux-kernel-netdev=dewy.ru
From: shijing.wuqi@linux.alibaba.com (Qi Wu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH bpf-next] bpf, tcx: Skip RCU synchronization when the entry was newly created
Date: Sun, 15 Nov 2026 12:41:46 +0800
Organization: Usenet Network
Message-ID: <20261115044146.163548-1-shijing.wuqi@linux.alibaba.com>
References: <20261114124039.111360-1-shijing.wuqi@linux.alibaba.com> <DMV63QDBPR8M.OQPRTU7QTUUC@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1730455"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:KlRIuzd/m9G7IlaVgIwXXEp290Q= sha256:f89SIsqGIp2UkzhFsIUkUmJ1DDhaBU+uBM9esrAV+Sg=
	sha1:wex/KzAl6aP0rpjobuZGwOKo7EE= sha256:V83Oc/QVjSPUzui/1ElvX+v1Xd6eUYNKUUdNtcJO3+A=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id CA60F125D3D; Sun, 15 Nov 2026 07:42:31 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -10.55
X-Spam-Status: No, score=-10.55 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_DKIM_WL=-7.5]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.alibaba.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 2FDq5dHeKTW7;
	Sun, 15 Nov 2026 07:42:28 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-363563-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 90402125D3C; Sun, 15 Nov 2026 07:42:17 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id C8B5E36A8C; Sun, 15 Nov 2026 04:42:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794717733;
	b=UC4A68MA9fjSwEVOGolbm/dQ7P8jVpcBPMwnRC/CYnewq6cdGoZ0K18qJ+i4nRh1KyHS
	 8EhqUoz90lKHJlbU06E6QHEzOLck4z/4H6vvti4LbsCfWrw461XgqygPwGue9BY8bJDo5
	 E/EhxFciy6G/ahwnOdvwKoh4p4ydGubupsymVih0oCOP4jCGqvCBGU4EOPjBFnewQdlpi
	 LEBlNVbeXP3YZoEn7YAYhYDUOLOAcr9b33xSFPetqkVtwLpxNHY0C8AgSg2GVC643TzMc
	 FC7Y7v1faM+YgoOTOI0IoV88vdUWUP+/1t/b3paaE9hEr4rYdRn7R13Es+6kM01o5sQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794717733;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-Alimail-AntiSpam:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=CH1P70Wvz2jfUjwiFE/3453DLMf/gLYICYYrZj8tuqo=;
	b=emIUbo3qheFK1r2rA3XDwoxED+vMsvzpp1iI9WU2LWipu6vfJ+WBblVhom4DPwIRo6Sz
	 jrPKaFVePcPU5/O6rlzcFsBNXxHxLuoUyTPPdiRmRMWUjWco1OCK3IFc/NKgB1bOrUDcU
	 hcbiSgpVvwqtr9lIQ+BzZHWKRUtsfu1kwylD5HgZ2AKhihAjfipYnhbhkiOZXdRpAxUlo
	 /BuzJ2Dau20XrpvnaZLcShdiiWRaT9YYnIlNDW6DAHItP+qRDUbfMBU6nuse2mTWx/3Mz
	 q9O7tLNMJgGdl1zfog0WlJQp8idRisA0Lyec3hqIPDN9wCnazD2J7WwiTY6PBWzo9eA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=RV7XcsYU;
	dmarc=pass header.from=linux.alibaba.com;
	spf=pass smtp.mailfrom=linux.alibaba.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 444F8606A32C;
	Sun, 15 Nov 2026 04:42:13 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=RV7XcsYU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.132
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794717732;
	b=QZAfiPB/rXUuj3ITeFXYOLplO2+G87kNA6QMfRDHCX72aR1Lrka1mS0cQKKvz2N5T2yS
	 QjrsCSwCEH7+WhgiEcx3LICaCdmRjJwHpVZEPQpV54v/7egQGdCS3/MYbFvaxp7awYsmp
	 au6gF4CL7+QlmNadc6uBOoWLnyR7gJQ/Xnb08RVWibOmkafl0SkNPgidTSYfd65WcuXPT
	 /hEHHaRxgeNVsHuA1rgzJEnrfFe6ZpTjwvuIuSWv5cHqke3kVcrcrX+AVmJ/BkjRU58FR
	 3eJuJSfdfxaz0vKdK1m22rfvuPMcjFSDr5MfMavJsQUPs1XxpEk1yE/S7rCFjNo3tUA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794717732;
	h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Type:Content-Transfer-Encoding;
	bh=CH1P70Wvz2jfUjwiFE/3453DLMf/gLYICYYrZj8tuqo=;
	b=Pzj5M24vv0b0EmSy22fiiw18OhCkP5D+MgsTeDoyHdXvOrqSkfS0BadoSMZ+Yuu2UFCT
	 B7s1t26XTxOoSquQw8ekpk0kaG8z53wVQ2wDNp7khHHWf3bgWtJSLy2Skd2Ilf1+eyywc
	 7sKLBdPSqqxEVJCslsspu+Rc1adkx5caaOH2oChbKxf5obgSuGBgmjxIbLGliiu7OlTPA
	 YCPzBVnrH1p4vHquVY4vnqF8lBrb5N5L5FJ8HP9VUaOJMYFtP4/A7yQKprsUqNErk4fli
	 3S7JsxaLVECC4RmkkeI5RXDy6HEsu2yK4Ikovx7d4mxPQQbmSsZBVObuZBA6/yaZncQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.alibaba.com;
	spf=pass smtp.mailfrom=linux.alibaba.com;
	dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=RV7XcsYU;
	arc=none smtp.remote-ip=115.124.30.132
X-Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B8AA606A327;
	Sun, 15 Nov 2026 04:42:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B8AA606A327
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=linux.alibaba.com; s=default;
	t=1794717722; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type;
	bh=CH1P70Wvz2jfUjwiFE/3453DLMf/gLYICYYrZj8tuqo=;
	b=RV7XcsYU62820qkCOMFHe5qJKKO14sIzlh/mXA9dplIMls1dNvsYfa+0uETEJRQ7V+ill4xKIibn8xa4ej+stsOlQ8sVS/Ef/pVmRIxmVLgQtCpKoiS4mrZgEtRmM3ViEAFSayZ3DkOAUjaWciURUtw4IzGb3z8cXLqKwcUNuUA=
X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R681e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=shijing.wuqi@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0XEj8Jfh_1794717709;
X-Received: from localhost.localdomain(mailfrom:shijing.wuqi@linux.alibaba.com fp:SMTPD_---0XEj8Jfh_1794717709 cluster:ay36)
          by smtp.aliyun-inc.com;
          Sun, 15 Nov 2026 12:42:01 +0800
X-Cc: Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>
X-Mailer: git-send-email 2.47.3
X-In-Reply-To: <DMV63QDBPR8M.OQPRTU7QTUUC@gmail.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list