blob: 2b94673a3dbc9c86aa19044d747925dc21af0945 [file] [log] [blame]
Jiri Pirkod23b8ad2015-01-15 09:52:39 +01001/*
2 * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10#ifndef __NET_TC_BPF_H
11#define __NET_TC_BPF_H
12
13#include <linux/filter.h>
14#include <net/act_api.h>
15
16struct tcf_bpf {
WANG Congec0595c2016-07-25 16:09:42 -070017 struct tc_action common;
Alexei Starovoitovcff82452015-08-25 20:06:35 -070018 struct bpf_prog __rcu *filter;
Daniel Borkmanna8cb5f52015-03-20 15:11:12 +010019 union {
20 u32 bpf_fd;
21 u16 bpf_num_ops;
22 };
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010023 struct sock_filter *bpf_ops;
Daniel Borkmanna8cb5f52015-03-20 15:11:12 +010024 const char *bpf_name;
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010025};
WANG Conga85a9702016-07-25 16:09:41 -070026#define to_bpf(a) ((struct tcf_bpf *)a)
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010027
28#endif /* __NET_TC_BPF_H */