]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Remove migrate_{disable|enable} from LPM trie
authorHou Tao <houtao1@huawei.com>
Wed, 8 Jan 2025 01:07:13 +0000 (09:07 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 9 Jan 2025 02:06:35 +0000 (18:06 -0800)
commit1b1a01db17af7a44cae8d8d7d7a18dbb056be40f
treec416453cc2b7860b5245bdd156628788a5906630
parentbfaac2a0b9e59b595f08606e7762bee50f01a074
bpf: Remove migrate_{disable|enable} from LPM trie

Both bpf program and bpf syscall may invoke ->update or ->delete
operation for LPM trie. For bpf program, its running context has already
disabled migration explicitly through (migrate_disable()) or implicitly
through (preempt_disable() or disable irq). For bpf syscall, the
migration is disabled through the use of bpf_disable_instrumentation()
before invoking the corresponding map operation callback.

Therefore, it is safe to remove the migrate_{disable|enable){} pair from
LPM trie.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20250108010728.207536-2-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/lpm_trie.c