blob: 5897162c605f1682d292433985ba177d63a6c079 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Jiri Pirkod23b8ad2015-01-15 09:52:39 +01002/*
3 * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
Jiri Pirkod23b8ad2015-01-15 09:52:39 +01004 */
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
12struct tcf_bpf {
WANG Congec0595c2016-07-25 16:09:42 -070013 struct tc_action common;
Alexei Starovoitovcff82452015-08-25 20:06:35 -070014 struct bpf_prog __rcu *filter;
Daniel Borkmanna8cb5f52015-03-20 15:11:12 +010015 union {
16 u32 bpf_fd;
17 u16 bpf_num_ops;
18 };
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010019 struct sock_filter *bpf_ops;
Daniel Borkmanna8cb5f52015-03-20 15:11:12 +010020 const char *bpf_name;
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010021};
WANG Conga85a9702016-07-25 16:09:41 -070022#define to_bpf(a) ((struct tcf_bpf *)a)
Jiri Pirkod23b8ad2015-01-15 09:52:39 +010023
24#endif /* __NET_TC_BPF_H */