From: "D. Wythe" <alibuda@linux.alibaba.com>
To: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, coreteam@netfilter.org,
netfilter-devel@vger.kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
ast@kernel.org
Subject: Re: [RFC nf-next v5 0/2] netfilter: bpf: support prog update
Date: Tue, 16 Jan 2024 21:46:14 +0800 [thread overview]
Message-ID: <3a82adb1-c839-4e82-834f-a63f9910b28d@linux.alibaba.com> (raw)
In-Reply-To: <1704175877-28298-1-git-send-email-alibuda@linux.alibaba.com>
Just a reminder to avoid forgetting this patch by everyone. 🙂
Best wishes,
D. Wythe
On 1/2/24 2:11 PM, D. Wythe wrote:
> 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.
> --
> v2->v3:
> 1. access nf_link->link.prog via rcu_dereference_raw to avoid warning.
> --
> v3->v4:
> 1. remove mutex for link update, as it is unnecessary and can be replaced
> by atomic operations.
> --
> v4->v5:
> 1. fix error retval check on cmpxhcg
>
> D. Wythe (2):
> netfilter: bpf: support prog update
> selftests/bpf: Add netfilter link prog update test
>
> net/netfilter/nf_bpf_link.c | 50 ++++++++-----
> .../bpf/prog_tests/netfilter_link_update_prog.c | 83 ++++++++++++++++++++++
> .../bpf/progs/test_netfilter_link_update_prog.c | 24 +++++++
> 3 files changed, 141 insertions(+), 16 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
>
next prev parent reply other threads:[~2024-01-16 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 6:11 [RFC nf-next v5 0/2] netfilter: bpf: support prog update D. Wythe
2024-01-02 6:11 ` [RFC nf-next v5 1/2] " D. Wythe
2024-01-02 6:11 ` [RFC nf-next v5 2/2] selftests/bpf: Add netfilter link prog update test D. Wythe
2024-01-16 13:46 ` D. Wythe [this message]
2024-02-14 16:10 ` [RFC nf-next v5 0/2] netfilter: bpf: support prog update Quentin Deslandes
2024-02-14 16:41 ` Pablo Neira Ayuso
2024-02-20 7:16 ` D. Wythe
2024-02-20 7:19 ` D. Wythe
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=3a82adb1-c839-4e82-834f-a63f9910b28d@linux.alibaba.com \
--to=alibuda@linux.alibaba.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/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