netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC nf-next v2 0/2] netfilter: bpf: support prog update
@ 2023-12-18  4:18 D. Wythe
  2023-12-18  4:18 ` [RFC nf-next v2 1/2] " D. Wythe
  2023-12-18  4:18 ` [RFC nf-next v2 2/2] selftests/bpf: Add netfilter link prog update test D. Wythe
  0 siblings, 2 replies; 7+ messages in thread
From: D. Wythe @ 2023-12-18  4:18 UTC (permalink / raw)
  To: pablo, kadlec, fw
  Cc: bpf, linux-kernel, netdev, coreteam, netfilter-devel, davem,
	edumazet, kuba, pabeni, ast

From: "D. Wythe" <alibuda@linux.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.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-20 12:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18  4:18 [RFC nf-next v2 0/2] netfilter: bpf: support prog update D. Wythe
2023-12-18  4:18 ` [RFC nf-next v2 1/2] " D. Wythe
2023-12-18 19:06   ` Simon Horman
2023-12-19 12:50     ` D. Wythe
2023-12-19 14:58       ` Florian Westphal
2023-12-20 12:40         ` D. Wythe
2023-12-18  4:18 ` [RFC nf-next v2 2/2] selftests/bpf: Add netfilter link prog update test D. Wythe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).