summaryrefslogtreecommitdiff
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>2018-08-03 16:58:15 +0900
committerDaniel Borkmann <daniel@iogearbox.net>2018-08-10 16:12:21 +0200
commit0b19cc0a8694d4295383f88bc3441765875a57bc (patch)
tree089270ead91559d2164d10a98d00515b236e8394 /include/linux/filter.h
parentaf87a3aa1b5f397a2f5c99b97b000943c5177da7 (diff)
downloadlwn-0b19cc0a8694d4295383f88bc3441765875a57bc.tar.gz
lwn-0b19cc0a8694d4295383f88bc3441765875a57bc.zip
bpf: Make redirect_info accessible from modules
We are going to add kern_flags field in redirect_info for kernel internal use. In order to avoid function call to access the flags, make redirect_info accessible from modules. Also as it is now non-static, add prefix bpf_ to redirect_info. v6: - Fix sparse warning around EXPORT_SYMBOL. Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r--include/linux/filter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index c73dd7396886..4717af8b95e6 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -537,6 +537,16 @@ struct sk_msg_buff {
struct list_head list;
};
+struct bpf_redirect_info {
+ u32 ifindex;
+ u32 flags;
+ struct bpf_map *map;
+ struct bpf_map *map_to_flush;
+ unsigned long map_owner;
+};
+
+DECLARE_PER_CPU(struct bpf_redirect_info, bpf_redirect_info);
+
/* Compute the linear packet data range [data, data_end) which
* will be accessed by various program types (cls_bpf, act_bpf,
* lwt, ...). Subsystems allowing direct data access must (!)