diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bpf.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e55e4255a210..b63a592ad29d 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -419,6 +419,8 @@ static inline int bpf_map_attr_numa_node(const union bpf_attr *attr) | |||
| 419 | attr->numa_node : NUMA_NO_NODE; | 419 | attr->numa_node : NUMA_NO_NODE; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type); | ||
| 423 | |||
| 422 | #else /* !CONFIG_BPF_SYSCALL */ | 424 | #else /* !CONFIG_BPF_SYSCALL */ |
| 423 | static inline struct bpf_prog *bpf_prog_get(u32 ufd) | 425 | static inline struct bpf_prog *bpf_prog_get(u32 ufd) |
| 424 | { | 426 | { |
| @@ -506,6 +508,12 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, | |||
| 506 | { | 508 | { |
| 507 | return 0; | 509 | return 0; |
| 508 | } | 510 | } |
| 511 | |||
| 512 | static inline struct bpf_prog *bpf_prog_get_type_path(const char *name, | ||
| 513 | enum bpf_prog_type type) | ||
| 514 | { | ||
| 515 | return ERR_PTR(-EOPNOTSUPP); | ||
| 516 | } | ||
| 509 | #endif /* CONFIG_BPF_SYSCALL */ | 517 | #endif /* CONFIG_BPF_SYSCALL */ |
| 510 | 518 | ||
| 511 | static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, | 519 | static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, |
| @@ -514,6 +522,8 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, | |||
| 514 | return bpf_prog_get_type_dev(ufd, type, false); | 522 | return bpf_prog_get_type_dev(ufd, type, false); |
| 515 | } | 523 | } |
| 516 | 524 | ||
| 525 | bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool); | ||
| 526 | |||
| 517 | int bpf_prog_offload_compile(struct bpf_prog *prog); | 527 | int bpf_prog_offload_compile(struct bpf_prog *prog); |
| 518 | void bpf_prog_offload_destroy(struct bpf_prog *prog); | 528 | void bpf_prog_offload_destroy(struct bpf_prog *prog); |
| 519 | 529 | ||
