From: Florian Westphal <fw@strlen.de>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
bpf@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, dxu@dxuuu.xyz, qde@naccy.de
Subject: Re: [PATCH bpf-next v3 1/6] bpf: add bpf_link support for BPF_NETFILTER programs
Date: Tue, 18 Apr 2023 21:48:48 +0200 [thread overview]
Message-ID: <20230418194848.GA21058@breakpoint.cc> (raw)
In-Reply-To: <20230418183504.cxa3wdfxs2yx4cqo@MacBook-Pro-6.local.dhcp.thefacebook.com>
Alexei Starovoitov <alexei.starovoitov@gmail.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.
next prev parent reply other threads:[~2023-04-18 19:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 13:10 [PATCH bpf-next v3 0/6] bpf: add netfilter program type Florian Westphal
2023-04-18 13:10 ` [PATCH bpf-next v3 1/6] bpf: add bpf_link support for BPF_NETFILTER programs Florian Westphal
2023-04-18 18:35 ` Alexei Starovoitov
2023-04-18 19:48 ` Florian Westphal [this message]
2023-04-19 5:57 ` kernel test robot
2023-04-18 13:10 ` [PATCH bpf-next v3 2/6] bpf: minimal support for programs hooked into netfilter framework Florian Westphal
2023-04-19 2:11 ` Alexei Starovoitov
2023-04-18 13:10 ` [PATCH bpf-next v3 3/6] netfilter: nfnetlink hook: dump bpf prog id Florian Westphal
2023-04-20 9:54 ` Simon Horman
2023-04-18 13:10 ` [PATCH bpf-next v3 4/6] netfilter: disallow bpf hook attachment at same priority Florian Westphal
2023-04-18 13:10 ` [PATCH bpf-next v3 5/6] tools: bpftool: print netfilter link info Florian Westphal
2023-04-18 14:20 ` Quentin Monnet
2023-04-18 19:50 ` Florian Westphal
2023-04-18 13:10 ` [PATCH bpf-next v3 6/6] bpf: add test_run support for netfilter program type Florian Westphal
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=20230418194848.GA21058@breakpoint.cc \
--to=fw@strlen.de \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=dxu@dxuuu.xyz \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=qde@naccy.de \
/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;
as well as URLs for NNTP newsgroup(s).