lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC nf-next v1 1/2] netfilter: bpf: support prog update
D. Wythe <alibuda@linux.alibaba.com> wrote:
> const struct nf_defrag_hook *defrag_hook;
> + const struct bpf_prog __rcu *nf_prog;

Hmm, why do we need this pointer?
Can't you just re-use bpf_nf_link->link.prog?

> + rcu_assign_pointer(nf_link->nf_prog, new_prog);
> + old_prog = xchg(&link->prog, new_prog);

This looks redundant, I think you can remove the nf_prog
pointer again.

Rest LGTM.

\
 
 \ /
  Last update: 2023-12-15 15:17    [W:0.053 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site