From 8a1f1f07b4d5c51a99e439c5b13b0cd8bb742856 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Apr 2022 16:21:45 +0200 Subject: sys/linux: make bpf_link_create_arg a template Make bpf_link_create_arg a template so that it's possible to create more specialized versions. Add a specialized version for XDP links. First, they need a special program type, plus a special attach type and target fd is not an fd, but rather ifindex. --- sys/linux/bpf.txt.const | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/linux/bpf.txt.const') diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 967221523..8fe5e1ac8 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -253,6 +253,11 @@ BTF_KIND_VOLATILE = 9 BTF_MAGIC = 60319 BTF_VERSION = 1 MAX_BPF_REG = 11 +XDP_FLAGS_DRV_MODE = 4 +XDP_FLAGS_HW_MODE = 8 +XDP_FLAGS_REPLACE = 16 +XDP_FLAGS_SKB_MODE = 2 +XDP_FLAGS_UPDATE_IF_NOEXIST = 1 __BPF_FUNC_MAX_ID = 194 __MAX_BPF_REG = 11 __NR_bpf = 280, 386:357, amd64:321, arm:386, mips64le:5315, ppc64le:361, s390x:351 -- cgit mrf-deployment