|
@@ -313,7 +313,6 @@ int bpf_check(struct bpf_prog **fp, union bpf_attr *attr);
|
|
|
|
|
|
/* Map specifics */
|
|
|
struct net_device *__dev_map_lookup_elem(struct bpf_map *map, u32 key);
|
|
|
-struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
|
|
|
void __dev_map_insert_ctx(struct bpf_map *map, u32 index);
|
|
|
void __dev_map_flush(struct bpf_map *map);
|
|
|
|
|
@@ -377,6 +376,15 @@ static inline void __dev_map_flush(struct bpf_map *map)
|
|
|
}
|
|
|
#endif /* CONFIG_BPF_SYSCALL */
|
|
|
|
|
|
+#if defined(CONFIG_STREAM_PARSER) && defined(CONFIG_BPF_SYSCALL)
|
|
|
+struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
|
|
|
+#else
|
|
|
+static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key)
|
|
|
+{
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
/* verifier prototypes for helper functions called from eBPF programs */
|
|
|
extern const struct bpf_func_proto bpf_map_lookup_elem_proto;
|
|
|
extern const struct bpf_func_proto bpf_map_update_elem_proto;
|