From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Cong Wang <xiyou.wangcong@gmail•com>,
Kumar Kartikeya Dwivedi <memxor@gmail•com>
Cc: bpf <bpf@vger•kernel.org>, 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>,
Jamal Hadi Salim <jhs@mojatatu•com>,
Vlad Buslov <vladbu@nvidia•com>, Jiri Pirko <jiri@resnulli•us>,
"David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Joe Stringer <joe@cilium•io>,
Quentin Monnet <quentin@isovalent•com>,
Jesper Dangaard Brouer <brouer@redhat•com>,
Linux Kernel Network Developers <netdev@vger•kernel.org>
Subject: Re: [PATCH RFC bpf-next 0/7] Add bpf_link based TC-BPF API
Date: Tue, 15 Jun 2021 13:54:49 +0200 [thread overview]
Message-ID: <877divs5py.fsf@toke.dk> (raw)
In-Reply-To: <CAM_iQpW7ZAz5rLAanMRg7R52Pn55N=puVkvoHcHF618wq8uA1g@mail.gmail.com>
Cong Wang <xiyou.wangcong@gmail•com> writes:
>> > I offer two different views here:
>> >
>> > 1. If you view a TC filter as an instance as a netdev/qdisc/action, they
>> > are no different from this perspective. Maybe the fact that a TC filter
>> > resides in a qdisc makes a slight difference here, but like I mentioned, it
>> > actually makes sense to let TC filters be standalone, qdisc's just have to
>> > bind with them, like how we bind TC filters with standalone TC actions.
>>
>> You propose something different below IIUC, but I explained why I'm wary of
>> these unbound filters. They seem to add a step to classifier setup for no real
>> benefit to the user (except keeping track of one more object and cleaning it
>> up with the link when done).
>
> I am not even sure if unbound filters help your case at all, making
> them unbound merely changes their residence, not ownership.
> You are trying to pass the ownership from TC to bpf_link, which
> is what I am against.
So what do you propose instead?
bpf_link is solving a specific problem: ensuring automatic cleanup of
kernel resources held by a userspace application with a BPF component.
Not all applications work this way, but for the ones that do it's very
useful. But if the TC filter stays around after bpf_link detaches, that
kinda defeats the point of the automatic cleanup.
So I don't really see any way around transferring ownership somehow.
Unless you have some other idea that I'm missing?
-Toke
next prev parent reply other threads:[~2021-06-15 11:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 19:59 [PATCH RFC bpf-next 0/7] Add bpf_link based TC-BPF API Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 1/7] net: sched: refactor cls_bpf creation code Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 2/7] bpf: export bpf_link functions for modules Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 3/7] net: sched: add bpf_link API for bpf classifier Kumar Kartikeya Dwivedi
2021-06-02 20:56 ` Andrii Nakryiko
2021-05-28 19:59 ` [PATCH RFC bpf-next 4/7] net: sched: add lightweight update path for cls_bpf Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 5/7] tools: bpf.h: sync with kernel sources Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 6/7] libbpf: add bpf_link based TC-BPF management API Kumar Kartikeya Dwivedi
2021-06-02 21:03 ` Andrii Nakryiko
2021-05-28 19:59 ` [PATCH RFC bpf-next 7/7] libbpf: add selftest for " Kumar Kartikeya Dwivedi
2021-06-02 21:09 ` [PATCH RFC bpf-next 0/7] Add bpf_link based TC-BPF API Andrii Nakryiko
2021-06-02 21:45 ` Kumar Kartikeya Dwivedi
2021-06-02 23:50 ` Alexei Starovoitov
2021-06-04 6:43 ` Kumar Kartikeya Dwivedi
2021-06-06 23:37 ` Cong Wang
2021-06-07 3:37 ` Kumar Kartikeya Dwivedi
2021-06-07 5:18 ` Cong Wang
2021-06-07 6:07 ` Kumar Kartikeya Dwivedi
2021-06-08 2:00 ` Cong Wang
2021-06-08 7:19 ` Kumar Kartikeya Dwivedi
2021-06-08 15:39 ` Alexei Starovoitov
2021-06-11 2:10 ` Cong Wang
2021-06-11 2:00 ` Cong Wang
2021-06-13 2:53 ` Kumar Kartikeya Dwivedi
2021-06-13 20:27 ` Jamal Hadi Salim
2021-06-13 20:34 ` Kumar Kartikeya Dwivedi
2021-06-13 21:10 ` Jamal Hadi Salim
2021-06-14 13:03 ` Marcelo Ricardo Leitner
2021-06-15 23:07 ` Daniel Borkmann
2021-06-16 14:40 ` Jamal Hadi Salim
2021-06-16 15:32 ` Kumar Kartikeya Dwivedi
2021-06-16 16:00 ` Daniel Borkmann
2021-06-18 11:40 ` Jamal Hadi Salim
2021-06-18 14:38 ` Alexei Starovoitov
2021-06-18 14:50 ` Jamal Hadi Salim
2021-06-18 16:23 ` Alexei Starovoitov
2021-06-18 16:41 ` Jamal Hadi Salim
2021-06-18 22:42 ` Daniel Borkmann
2021-06-21 13:55 ` Jamal Hadi Salim
2021-06-15 4:33 ` Cong Wang
2021-06-15 11:54 ` Toke Høiland-Jørgensen [this message]
2021-06-15 23:44 ` Daniel Borkmann
2021-06-16 12:03 ` Toke Høiland-Jørgensen
2021-06-16 15:33 ` Jamal Hadi Salim
2021-06-13 3:08 ` Kumar Kartikeya Dwivedi
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=877divs5py.fsf@toke.dk \
--to=toke@redhat$(echo .)com \
--cc=andrii@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=brouer@redhat$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=joe@cilium$(echo .)io \
--cc=john.fastabend@gmail$(echo .)com \
--cc=kafai@fb$(echo .)com \
--cc=kpsingh@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=memxor@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=quentin@isovalent$(echo .)com \
--cc=songliubraving@fb$(echo .)com \
--cc=vladbu@nvidia$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
--cc=yhs@fb$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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