[PATCH v2] bpf: support new commands BPF_LINK_{CREATE,UPDATE}

Dmitry V. Levin ldv at altlinux.org
Sat Apr 18 23:48:07 UTC 2020


On Sat, Apr 18, 2020 at 03:58:15PM +0200, Paul Chaignon wrote:
> * xlat/bpf_commands.in (BPF_LINK_CREATE): New constant introduced by Linux
> commit v5.7-rc1~146^2~10^2^2~3.
> (BPF_LINK_UPDATE): New constant introduced by Linux commit
> v5.7-rc1~146^2~10^2^2~2.
> * bpf.c (BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE),
> BEGIN_BPF_CMD_DECODER(BPF_LINK_UPDATE)): Decode the new commands.
> (SYS_FUNC(bpf)): Decode the new commands.
> * bpf_attr.h (BPF_LINK_CREATE_struct): New structure introduced by Linux
> commit v5.7-rc1~146^2~10^2^2~3.
> (BPF_LINK_UPDATE_struct): New structure introduced by Linux commit
> v5.7-rc1~146^2~10^2^2~2.
> (BPF_LINK_CREATE_struct_size, BPF_LINK_UPDATE_struct_size): New macros.
> * NEWS: Mention this.
> * tests/bpf.c (BPF_LINK_CREATE_checks, BPF_LINK_UPDATE_checks): Tests for
> the new commands.
> 
> Signed-off-by: Paul Chaignon <paul at cilium.io>
> ---
> Changelogs:
>   Changes in v2:
>   - Do not print old_prog_fd if BPF_F_REPLACE isn't set.
>   - Update test output accordingly.

Applied, thanks!


-- 
ldv


More information about the Strace-devel mailing list