xref: /linux/include/net/tc_act/tc_bpf.h (revision 0d3b051adbb72ed81956447d0d1e54d5943ee6f5)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
4  */
5 
6 #ifndef __NET_TC_BPF_H
7 #define __NET_TC_BPF_H
8 
9 #include <linux/filter.h>
10 #include <net/act_api.h>
11 
12 struct tcf_bpf {
13 	struct tc_action	common;
14 	struct bpf_prog __rcu	*filter;
15 	union {
16 		u32		bpf_fd;
17 		u16		bpf_num_ops;
18 	};
19 	struct sock_filter	*bpf_ops;
20 	const char		*bpf_name;
21 };
22 #define to_bpf(a) ((struct tcf_bpf *)a)
23 
24 #endif /* __NET_TC_BPF_H */
25