Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Jiri Pirko | d23b8ad | 2015-01-15 09:52:39 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us> |
Jiri Pirko | d23b8ad | 2015-01-15 09:52:39 +0100 | [diff] [blame] | 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 { |
WANG Cong | ec0595c | 2016-07-25 16:09:42 -0700 | [diff] [blame] | 13 | struct tc_action common; |
Alexei Starovoitov | cff8245 | 2015-08-25 20:06:35 -0700 | [diff] [blame] | 14 | struct bpf_prog __rcu *filter; |
Daniel Borkmann | a8cb5f5 | 2015-03-20 15:11:12 +0100 | [diff] [blame] | 15 | union { |
| 16 | u32 bpf_fd; |
| 17 | u16 bpf_num_ops; |
| 18 | }; |
Jiri Pirko | d23b8ad | 2015-01-15 09:52:39 +0100 | [diff] [blame] | 19 | struct sock_filter *bpf_ops; |
Daniel Borkmann | a8cb5f5 | 2015-03-20 15:11:12 +0100 | [diff] [blame] | 20 | const char *bpf_name; |
Jiri Pirko | d23b8ad | 2015-01-15 09:52:39 +0100 | [diff] [blame] | 21 | }; |
WANG Cong | a85a970 | 2016-07-25 16:09:41 -0700 | [diff] [blame] | 22 | #define to_bpf(a) ((struct tcf_bpf *)a) |
Jiri Pirko | d23b8ad | 2015-01-15 09:52:39 +0100 | [diff] [blame] | 23 | |
| 24 | #endif /* __NET_TC_BPF_H */ |