Skip to content

BPF Syscall BPF_PROG_DETACH command

v4.10

This syscall detaches programs that were previously attached with BPF_PROG_ATTACH

Return value

This command will return a zero on success or an error number (negative integer) if something went wrong.

Attributes

target_fd

The file descriptor of the resource to detach the program from. The type of file descriptor changes per program type.

target_ifindex

The network interface index of the network device to detach the program from.

attach_bpf_fd

The file descriptor of the BPF program to detach from the target_fd/target_ifindex.

attach_flags

Any flags relevant to attaching.

expected_revision

The expected revision of the collection of programs, in the case of attach points that support multiple programs being attached at the same time.