[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230418194848.GA21058@breakpoint.cc>
Date: Tue, 18 Apr 2023 21:48:48 +0200
From: Florian Westphal <fw@...len.de>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Florian Westphal <fw@...len.de>, bpf@...r.kernel.org,
netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
dxu@...uu.xyz, qde@...cy.de
Subject: Re: [PATCH bpf-next v3 1/6] bpf: add bpf_link support for
BPF_NETFILTER programs
Alexei Starovoitov <alexei.starovoitov@...il.com> wrote:
> > +int bpf_nf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
> > +{
> > + struct net *net = current->nsproxy->net_ns;
> > + struct bpf_link_primer link_primer;
> > + struct bpf_nf_link *link;
> > + int err;
> > +
> > + if (attr->link_create.flags)
> > + return -EINVAL;
> > +
> > + if (attr->link_create.netfilter.reserved[0] | attr->link_create.netfilter.reserved[1])
> > + return -EINVAL;
>
> Why add 'reserved' name that we cannot change later?
> I think 'flags' is enough.
OK, I'll zap this.
> > + link->hook_ops.pf = attr->link_create.netfilter.pf;
> > + link->hook_ops.priority = attr->link_create.netfilter.prio;
>
> let's use the same name in both cases ? Either prio or priority. Both sound fine.
OK, I'll go with "priority" then because thats what its named in
nf_hook_ops structure.
Powered by blists - more mailing lists