summaryrefslogtreecommitdiffstats
path: root/kernel/include/net/tc_act
diff options
context:
space:
mode:
authorYunhong Jiang <yunhong.jiang@intel.com>2015-08-04 12:17:53 -0700
committerYunhong Jiang <yunhong.jiang@intel.com>2015-08-04 15:44:42 -0700
commit9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 (patch)
tree1c9cafbcd35f783a87880a10f85d1a060db1a563 /kernel/include/net/tc_act
parent98260f3884f4a202f9ca5eabed40b1354c489b29 (diff)
Add the rt linux 4.1.3-rt3 as base
Import the rt linux 4.1.3-rt3 as OPNFV kvm base. It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and the base is: commit 0917f823c59692d751951bf5ea699a2d1e2f26a2 Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat Jul 25 12:13:34 2015 +0200 Prepare v4.1.3-rt3 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> We lose all the git history this way and it's not good. We should apply another opnfv project repo in future. Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423 Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Diffstat (limited to 'kernel/include/net/tc_act')
-rw-r--r--kernel/include/net/tc_act/tc_bpf.h29
-rw-r--r--kernel/include/net/tc_act/tc_connmark.h14
-rw-r--r--kernel/include/net/tc_act/tc_csum.h15
-rw-r--r--kernel/include/net/tc_act/tc_defact.h14
-rw-r--r--kernel/include/net/tc_act/tc_gact.h17
-rw-r--r--kernel/include/net/tc_act/tc_ipt.h17
-rw-r--r--kernel/include/net/tc_act/tc_mirred.h17
-rw-r--r--kernel/include/net/tc_act/tc_nat.h21
-rw-r--r--kernel/include/net/tc_act/tc_pedit.h15
-rw-r--r--kernel/include/net/tc_act/tc_skbedit.h35
-rw-r--r--kernel/include/net/tc_act/tc_vlan.h27
11 files changed, 221 insertions, 0 deletions
diff --git a/kernel/include/net/tc_act/tc_bpf.h b/kernel/include/net/tc_act/tc_bpf.h
new file mode 100644
index 000000000..a152e9858
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_bpf.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __NET_TC_BPF_H
+#define __NET_TC_BPF_H
+
+#include <linux/filter.h>
+#include <net/act_api.h>
+
+struct tcf_bpf {
+ struct tcf_common common;
+ struct bpf_prog *filter;
+ union {
+ u32 bpf_fd;
+ u16 bpf_num_ops;
+ };
+ struct sock_filter *bpf_ops;
+ const char *bpf_name;
+};
+#define to_bpf(a) \
+ container_of(a->priv, struct tcf_bpf, common)
+
+#endif /* __NET_TC_BPF_H */
diff --git a/kernel/include/net/tc_act/tc_connmark.h b/kernel/include/net/tc_act/tc_connmark.h
new file mode 100644
index 000000000..5c1104c2e
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_connmark.h
@@ -0,0 +1,14 @@
+#ifndef __NET_TC_CONNMARK_H
+#define __NET_TC_CONNMARK_H
+
+#include <net/act_api.h>
+
+struct tcf_connmark_info {
+ struct tcf_common common;
+ u16 zone;
+};
+
+#define to_connmark(a) \
+ container_of(a->priv, struct tcf_connmark_info, common)
+
+#endif /* __NET_TC_CONNMARK_H */
diff --git a/kernel/include/net/tc_act/tc_csum.h b/kernel/include/net/tc_act/tc_csum.h
new file mode 100644
index 000000000..fa8f5fac6
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_csum.h
@@ -0,0 +1,15 @@
+#ifndef __NET_TC_CSUM_H
+#define __NET_TC_CSUM_H
+
+#include <linux/types.h>
+#include <net/act_api.h>
+
+struct tcf_csum {
+ struct tcf_common common;
+
+ u32 update_flags;
+};
+#define to_tcf_csum(a) \
+ container_of(a->priv,struct tcf_csum,common)
+
+#endif /* __NET_TC_CSUM_H */
diff --git a/kernel/include/net/tc_act/tc_defact.h b/kernel/include/net/tc_act/tc_defact.h
new file mode 100644
index 000000000..9763dcbb9
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_defact.h
@@ -0,0 +1,14 @@
+#ifndef __NET_TC_DEF_H
+#define __NET_TC_DEF_H
+
+#include <net/act_api.h>
+
+struct tcf_defact {
+ struct tcf_common common;
+ u32 tcfd_datalen;
+ void *tcfd_defdata;
+};
+#define to_defact(a) \
+ container_of(a->priv, struct tcf_defact, common)
+
+#endif /* __NET_TC_DEF_H */
diff --git a/kernel/include/net/tc_act/tc_gact.h b/kernel/include/net/tc_act/tc_gact.h
new file mode 100644
index 000000000..9fc9b5789
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_gact.h
@@ -0,0 +1,17 @@
+#ifndef __NET_TC_GACT_H
+#define __NET_TC_GACT_H
+
+#include <net/act_api.h>
+
+struct tcf_gact {
+ struct tcf_common common;
+#ifdef CONFIG_GACT_PROB
+ u16 tcfg_ptype;
+ u16 tcfg_pval;
+ int tcfg_paction;
+#endif
+};
+#define to_gact(a) \
+ container_of(a->priv, struct tcf_gact, common)
+
+#endif /* __NET_TC_GACT_H */
diff --git a/kernel/include/net/tc_act/tc_ipt.h b/kernel/include/net/tc_act/tc_ipt.h
new file mode 100644
index 000000000..c0f4193f4
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_ipt.h
@@ -0,0 +1,17 @@
+#ifndef __NET_TC_IPT_H
+#define __NET_TC_IPT_H
+
+#include <net/act_api.h>
+
+struct xt_entry_target;
+
+struct tcf_ipt {
+ struct tcf_common common;
+ u32 tcfi_hook;
+ char *tcfi_tname;
+ struct xt_entry_target *tcfi_t;
+};
+#define to_ipt(a) \
+ container_of(a->priv, struct tcf_ipt, common)
+
+#endif /* __NET_TC_IPT_H */
diff --git a/kernel/include/net/tc_act/tc_mirred.h b/kernel/include/net/tc_act/tc_mirred.h
new file mode 100644
index 000000000..4dd77a1c1
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_mirred.h
@@ -0,0 +1,17 @@
+#ifndef __NET_TC_MIR_H
+#define __NET_TC_MIR_H
+
+#include <net/act_api.h>
+
+struct tcf_mirred {
+ struct tcf_common common;
+ int tcfm_eaction;
+ int tcfm_ifindex;
+ int tcfm_ok_push;
+ struct net_device *tcfm_dev;
+ struct list_head tcfm_list;
+};
+#define to_mirred(a) \
+ container_of(a->priv, struct tcf_mirred, common)
+
+#endif /* __NET_TC_MIR_H */
diff --git a/kernel/include/net/tc_act/tc_nat.h b/kernel/include/net/tc_act/tc_nat.h
new file mode 100644
index 000000000..63d8e9ca9
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_nat.h
@@ -0,0 +1,21 @@
+#ifndef __NET_TC_NAT_H
+#define __NET_TC_NAT_H
+
+#include <linux/types.h>
+#include <net/act_api.h>
+
+struct tcf_nat {
+ struct tcf_common common;
+
+ __be32 old_addr;
+ __be32 new_addr;
+ __be32 mask;
+ u32 flags;
+};
+
+static inline struct tcf_nat *to_tcf_nat(struct tc_action *a)
+{
+ return container_of(a->priv, struct tcf_nat, common);
+}
+
+#endif /* __NET_TC_NAT_H */
diff --git a/kernel/include/net/tc_act/tc_pedit.h b/kernel/include/net/tc_act/tc_pedit.h
new file mode 100644
index 000000000..5b8099887
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_pedit.h
@@ -0,0 +1,15 @@
+#ifndef __NET_TC_PED_H
+#define __NET_TC_PED_H
+
+#include <net/act_api.h>
+
+struct tcf_pedit {
+ struct tcf_common common;
+ unsigned char tcfp_nkeys;
+ unsigned char tcfp_flags;
+ struct tc_pedit_key *tcfp_keys;
+};
+#define to_pedit(a) \
+ container_of(a->priv, struct tcf_pedit, common)
+
+#endif /* __NET_TC_PED_H */
diff --git a/kernel/include/net/tc_act/tc_skbedit.h b/kernel/include/net/tc_act/tc_skbedit.h
new file mode 100644
index 000000000..0df9a0db4
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_skbedit.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2008, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Alexander Duyck <alexander.h.duyck@intel.com>
+ */
+
+#ifndef __NET_TC_SKBEDIT_H
+#define __NET_TC_SKBEDIT_H
+
+#include <net/act_api.h>
+
+struct tcf_skbedit {
+ struct tcf_common common;
+ u32 flags;
+ u32 priority;
+ u32 mark;
+ u16 queue_mapping;
+ /* XXX: 16-bit pad here? */
+};
+#define to_skbedit(a) \
+ container_of(a->priv, struct tcf_skbedit, common)
+
+#endif /* __NET_TC_SKBEDIT_H */
diff --git a/kernel/include/net/tc_act/tc_vlan.h b/kernel/include/net/tc_act/tc_vlan.h
new file mode 100644
index 000000000..93b70ade1
--- /dev/null
+++ b/kernel/include/net/tc_act/tc_vlan.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __NET_TC_VLAN_H
+#define __NET_TC_VLAN_H
+
+#include <net/act_api.h>
+
+#define VLAN_F_POP 0x1
+#define VLAN_F_PUSH 0x2
+
+struct tcf_vlan {
+ struct tcf_common common;
+ int tcfv_action;
+ u16 tcfv_push_vid;
+ __be16 tcfv_push_proto;
+};
+#define to_vlan(a) \
+ container_of(a->priv, struct tcf_vlan, common)
+
+#endif /* __NET_TC_VLAN_H */