diff options
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 9b558713447f..e60fff48288b 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -737,33 +737,18 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) | |||
737 | } | 737 | } |
738 | #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */ | 738 | #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */ |
739 | 739 | ||
740 | #if defined(CONFIG_STREAM_PARSER) && defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_INET) | 740 | #if defined(CONFIG_BPF_STREAM_PARSER) |
741 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); | 741 | int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, u32 which); |
742 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); | 742 | int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog); |
743 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); | ||
744 | int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
745 | struct bpf_prog *prog); | ||
746 | #else | 743 | #else |
747 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) | 744 | static inline int sock_map_prog_update(struct bpf_map *map, |
748 | { | 745 | struct bpf_prog *prog, u32 which) |
749 | return NULL; | ||
750 | } | ||
751 | |||
752 | static inline struct sock *__sock_hash_lookup_elem(struct bpf_map *map, | ||
753 | void *key) | ||
754 | { | ||
755 | return NULL; | ||
756 | } | ||
757 | |||
758 | static inline int sock_map_prog(struct bpf_map *map, | ||
759 | struct bpf_prog *prog, | ||
760 | u32 type) | ||
761 | { | 746 | { |
762 | return -EOPNOTSUPP; | 747 | return -EOPNOTSUPP; |
763 | } | 748 | } |
764 | 749 | ||
765 | static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type, | 750 | static inline int sock_map_get_from_fd(const union bpf_attr *attr, |
766 | struct bpf_prog *prog) | 751 | struct bpf_prog *prog) |
767 | { | 752 | { |
768 | return -EINVAL; | 753 | return -EINVAL; |
769 | } | 754 | } |
@@ -839,6 +824,10 @@ extern const struct bpf_func_proto bpf_get_stack_proto; | |||
839 | extern const struct bpf_func_proto bpf_sock_map_update_proto; | 824 | extern const struct bpf_func_proto bpf_sock_map_update_proto; |
840 | extern const struct bpf_func_proto bpf_sock_hash_update_proto; | 825 | extern const struct bpf_func_proto bpf_sock_hash_update_proto; |
841 | extern const struct bpf_func_proto bpf_get_current_cgroup_id_proto; | 826 | extern const struct bpf_func_proto bpf_get_current_cgroup_id_proto; |
827 | extern const struct bpf_func_proto bpf_msg_redirect_hash_proto; | ||
828 | extern const struct bpf_func_proto bpf_msg_redirect_map_proto; | ||
829 | extern const struct bpf_func_proto bpf_sk_redirect_hash_proto; | ||
830 | extern const struct bpf_func_proto bpf_sk_redirect_map_proto; | ||
842 | 831 | ||
843 | extern const struct bpf_func_proto bpf_get_local_storage_proto; | 832 | extern const struct bpf_func_proto bpf_get_local_storage_proto; |
844 | 833 | ||