History

bpf: Introduce device-bound XDP programs

New flag BPF_F_XDP_DEV_BOUND_ONLY plus all the infra to have a way to associate a netdev with a BPF program at load time. netdevsim checks are dropped in favor of generic check in dev_xdp_attach.

Stanislav Fomichev committed 3 years ago

Commit 2b3486b1 parent 89bbc538 files · +113 −38Browse files

Showing the changes to include/uapi (1 of 8 files). Show all

Unified · Split

include/uapi/linux/bpf.h+5−0
@@ -1156,6 +1156,11 @@ enum bpf_link_type { · 1155 unmodified lines
1156 */1156 */
1157#define BPF_F_XDP_HAS_FRAGS (1U << 5)1157#define BPF_F_XDP_HAS_FRAGS (1U << 5)
1158 1158
1159/* If BPF_F_XDP_DEV_BOUND_ONLY is used in BPF_PROG_LOAD command, the loaded
1160 * program becomes device-bound but can access XDP metadata.
1161 */
1162#define BPF_F_XDP_DEV_BOUND_ONLY (1U << 6)
1163
1159/* link_create.kprobe_multi.flags used in LINK_CREATE command for1164/* link_create.kprobe_multi.flags used in LINK_CREATE command for
1160 * BPF_TRACE_KPROBE_MULTI attach type to create return probe.1165 * BPF_TRACE_KPROBE_MULTI attach type to create return probe.
1161 */1166 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t