Netdev List
 help / color / mirror / Atom feed
From: Qi Wu <shijing.wuqi@linux.alibaba.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	bpf@vger.kernel.org, netdev@vger.kernel.org
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>
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	[thread overview]
Message-ID: <20261115044146.163548-1-shijing.wuqi@linux.alibaba.com> (raw)
In-Reply-To: <DMV63QDBPR8M.OQPRTU7QTUUC@gmail.com>

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.

      reply	other threads:[~2026-11-15  4:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 12:40 [PATCH bpf-next] bpf, tcx: Skip RCU synchronization when the entry was newly created Qi Wu
2026-11-14 19:06 ` Alexei Starovoitov
2026-11-15  4:41   ` Qi Wu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261115044146.163548-1-shijing.wuqi@linux.alibaba.com \
    --to=shijing.wuqi@linux.alibaba.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox