Thread (36 messages) 36 messages, 6 authors, 2020-06-05

Re: [PATCH bpf-next 5/8] bpf: Add link-based BPF program attachment to network namespace

From: Alexei Starovoitov <hidden>
Date: 2020-05-28 18:48:39
Also in: bpf

On Thu, May 28, 2020 at 11:09:20AM -0700, Andrii Nakryiko wrote:
quoted
quoted
quoted
+       net = rcu_dereference(net_link->net);
+       if (!net || !check_net(net)) {
+               /* Link auto-detached or netns dying */
+               ret = -ENOLINK;
This is an interesting error code. If we are going to adopt this, we
should change it for similar cgroup link situation as well.
Credit goes to Lorenz for suggesting a different error code than EINVAL
for this situation so that user-space has a way to distinguish.

I'm happy to patch cgroup BPF link, if you support this change.
Yeah, I guess let's do that. I like "link was severed" message for
that errno :) But for me it's way more about consistency, than any
specific error code.
I like ENOLINK idea as well.
Let's fix it there and patch older kernels via separate patch.

Overall the set looks great. Looking forward to v2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help