netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Martin KaFai Lau" <kafai@fb.com>,
	"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"KP Singh" <kpsingh@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Shaun Crampton" <shaun@tigera.io>,
	Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next v5 2/3] libbpf: add low level TC-BPF API
Date: Tue, 4 May 2021 04:41:20 +0530	[thread overview]
Message-ID: <20210503231120.aqp5476l7jfiy5ws@apollo> (raw)
In-Reply-To: <CAEf4BzbGsXzT0V49FmqsaoORYpO-S1Y9yfPaR0MyoYFdCg+4wQ@mail.gmail.com>

On Tue, May 04, 2021 at 04:24:05AM IST, Andrii Nakryiko wrote:
> On Fri, Apr 30, 2021 at 11:32 PM Kumar Kartikeya Dwivedi
> <memxor@gmail.com> wrote:
> >
> > On Sat, May 01, 2021 at 01:05:40AM IST, Andrii Nakryiko wrote:
[...]
> > >
> > > why didn't you put flags into bpf_tc_opts? they are clearly optional
> > > and fit into "opts" paradigm...
> > >
> >
> > I can move this into opts, but during previous discussion it was kept outside
> > opts by Daniel, so I kept that unchanged.
>
> for bpf_tc_attach() I see no reason to keep flags separate. For
> bpf_tc_hook_create()... for extensibility it would need it's own opts
> for hook creation. But if flags is 99% the only thing we'll need, then
> we can always add extra bpf_tc_hook_create_opts() later.
>

I'll put flags in the respective opts struct for both.

The hook creation path was kept generic enough so that this can be extended to
complex qdisc setup in the future than just clsact (even classful qdiscs should
be possible). So it is quite possible for bpf_tc_hook to take more parameters
than just flags by mapping different attach_point to different qdiscs.

Given some parameters are already optional depending on attach_point, it is
probably better to put flags in opts than dropping opts for now.

--
Kartikeya

  reply	other threads:[~2021-05-03 23:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 16:25 [PATCH bpf-next v5 0/3] Add TC-BPF API Kumar Kartikeya Dwivedi
2021-04-28 16:25 ` [PATCH bpf-next v5 1/3] libbpf: add netlink helpers Kumar Kartikeya Dwivedi
2021-04-30 19:04   ` Andrii Nakryiko
2021-05-01  6:13     ` Kumar Kartikeya Dwivedi
2021-05-03 22:47       ` Andrii Nakryiko
2021-04-28 16:25 ` [PATCH bpf-next v5 2/3] libbpf: add low level TC-BPF API Kumar Kartikeya Dwivedi
2021-04-30 19:35   ` Andrii Nakryiko
2021-05-01  6:32     ` Kumar Kartikeya Dwivedi
2021-05-03 22:54       ` Andrii Nakryiko
2021-05-03 23:11         ` Kumar Kartikeya Dwivedi [this message]
2021-04-28 16:25 ` [PATCH bpf-next v5 3/3] libbpf: add selftests for " Kumar Kartikeya Dwivedi
2021-04-30 19:41   ` Andrii Nakryiko
2021-05-01  6:34     ` Kumar Kartikeya Dwivedi
2021-05-03 22:55       ` Andrii Nakryiko

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=20210503231120.aqp5476l7jfiy5ws@apollo \
    --to=memxor@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shaun@tigera.io \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /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).