[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1703081351-85579-1-git-send-email-alibuda@linux.alibaba.com>
Date: Wed, 20 Dec 2023 22:09:09 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com>
To: pablo@...filter.org,
kadlec@...filter.org,
fw@...len.de
Cc: bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
coreteam@...filter.org,
netfilter-devel@...r.kernel.org,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
ast@...nel.org
Subject: [RFC nf-next v3 0/2] netfilter: bpf: support prog update
From: "D. Wythe" <alibuda@...ux.alibaba.com>
This patches attempt to implements updating of progs within
bpf netfilter link, allowing user update their ebpf netfilter
prog in hot update manner.
Besides, a corresponding test case has been added to verify
whether the update works.
--
v1:
1. remove unnecessary context, access the prog directly via rcu.
2. remove synchronize_rcu(), dealloc the nf_link via kfree_rcu.
3. check the dead flag during the update.
--
v1->v2:
1. remove unnecessary nf_prog, accessing nf_link->link.prog in direct.
--
v2->v3:
1. access nf_link->link.prog via rcu_dereference_raw to avoid warning.
D. Wythe (2):
netfilter: bpf: support prog update
selftests/bpf: Add netfilter link prog update test
net/netfilter/nf_bpf_link.c | 63 ++++++++++++----
.../bpf/prog_tests/netfilter_link_update_prog.c | 83 ++++++++++++++++++++++
.../bpf/progs/test_netfilter_link_update_prog.c | 24 +++++++
3 files changed, 155 insertions(+), 15 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/netfilter_link_update_prog.c
create mode 100644 tools/testing/selftests/bpf/progs/test_netfilter_link_update_prog.c
--
1.8.3.1
Powered by blists - more mailing lists