]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'ifla_xdp_expected_fd'
authorAlexei Starovoitov <ast@kernel.org>
Sat, 28 Mar 2020 21:24:41 +0000 (14:24 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Mar 2020 22:54:40 +0000 (15:54 -0700)
commit7b07f02ddc60c4c3784a5129a18378e37ae16e6d
treef903dfcf56b495dbd39b348872a191e3a8812c83
parentfc8988d18d27ac77df5010b0c82a3d87e4cf6c7b
parent1515f4574f70bc2a96482e1b84de8db3f8762f98
Merge branch 'ifla_xdp_expected_fd'

Toke Høiland-Jørgensen says:

====================
This series adds support for atomically replacing the XDP program loaded on an
interface. This is achieved by means of a new netlink attribute that can specify
the expected previous program to replace on the interface. If set, the kernel
will compare this "expected fd" attribute with the program currently loaded on
the interface, and reject the operation if it does not match.

With this primitive, userspace applications can avoid stepping on each other's
toes when simultaneously updating the loaded XDP program.

Changelog:

v4:
- Switch back to passing FD instead of ID (Andrii)
- Rename flag to XDP_FLAGS_REPLACE (for consistency with other similar uses)

v3:
- Pass existing ID instead of FD (Jakub)
- Use opts struct for new libbpf function (Andrii)

v2:
- Fix checkpatch nits and add .strict_start_type to netlink policy (Jakub)
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>