On Wed, 7 Aug 2019 10:02:04 -0700, Y Song wrote: > -bash-4.4$ sudo ./bpftool net detach x dev v2 > -bash-4.4$ sudo ./bpftool net > xdp: > v1(4) driver id 1172 > > tc: > eth0(2) clsact/ingress fbflow_icmp id 29 act [] > eth0(2) clsact/egress cls_fg_dscp_section id 27 act [] > eth0(2) clsact/egress fbflow_egress id 28 > eth0(2) clsact/egress fbflow_sslwall_egress id 35 > > flow_dissector: > > -bash-4.4$ > > Basically detaching may fail due to wrong dev name or wrong type, etc. > But the tool did not return an error. Is this expected? > This may be related to this funciton "bpf_set_link_xdp_fd()". > So this patch itself should be okay.
Yup, I'm pretty sure kernel doesn't return errors on unset if there is no program on the interface.