diff options
author | John Hurley <john.hurley@netronome.com> | 2019-04-09 15:36:11 +0100 |
---|---|---|
committer | Simon Horman <simon.horman@netronome.com> | 2019-04-09 17:33:14 +0200 |
commit | 7808b2b971e83c672700cb7ab306ce46282c84d9 (patch) | |
tree | 6f2a0fc69fcfa1d286cce096dfd36d606bb12a40 /include/linux | |
parent | 80e57090f7d9d3b9c4e64d6c286893a71d1eb1cc (diff) | |
download | openvswitch-7808b2b971e83c672700cb7ab306ce46282c84d9.tar.gz |
compat: add compatibility headers for tc skbedit action
OvS includes compat code for several TC actions including vlan, mirred and
tunnel key. Add support for using skbedit actions when compiling
user-space code against older kernel headers.
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/automake.mk | 1 | ||||
-rw-r--r-- | include/linux/tc_act/tc_skbedit.h | 57 |
2 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/automake.mk b/include/linux/automake.mk index b464fe0f5..45271d1d5 100644 --- a/include/linux/automake.mk +++ b/include/linux/automake.mk @@ -1,5 +1,6 @@ noinst_HEADERS += \ include/linux/pkt_cls.h \ include/linux/tc_act/tc_pedit.h \ + include/linux/tc_act/tc_skbedit.h \ include/linux/tc_act/tc_tunnel_key.h \ include/linux/tc_act/tc_vlan.h diff --git a/include/linux/tc_act/tc_skbedit.h b/include/linux/tc_act/tc_skbedit.h new file mode 100644 index 000000000..c75d233be --- /dev/null +++ b/include/linux/tc_act/tc_skbedit.h @@ -0,0 +1,57 @@ +#ifndef __LINUX_TC_ACT_TC_SKBEDIT_WRAPPER_H +#define __LINUX_TC_ACT_TC_SKBEDIT_WRAPPER_H 1 + +#if defined(__KERNEL__) || defined(HAVE_TCA_SKBEDIT_FLAGS) +#include_next <linux/tc_act/tc_skbedit.h> +#else + +/* + * 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, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + * + * Author: Alexander Duyck <alexander.h.duyck@intel.com> + */ + +#include <linux/pkt_cls.h> + +#define SKBEDIT_F_PRIORITY 0x1 +#define SKBEDIT_F_QUEUE_MAPPING 0x2 +#define SKBEDIT_F_MARK 0x4 +#define SKBEDIT_F_PTYPE 0x8 +#define SKBEDIT_F_MASK 0x10 +#define SKBEDIT_F_INHERITDSFIELD 0x20 + +struct tc_skbedit { + tc_gen; +}; + +enum { + TCA_SKBEDIT_UNSPEC, + TCA_SKBEDIT_TM, + TCA_SKBEDIT_PARMS, + TCA_SKBEDIT_PRIORITY, + TCA_SKBEDIT_QUEUE_MAPPING, + TCA_SKBEDIT_MARK, + TCA_SKBEDIT_PAD, + TCA_SKBEDIT_PTYPE, + TCA_SKBEDIT_MASK, + TCA_SKBEDIT_FLAGS, + __TCA_SKBEDIT_MAX +}; +#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) + +#endif /* __KERNEL__ || HAVE_TCA_SKBEDIT_FLAGS */ + +#endif /* __LINUX_TC_ACT_TC_SKBEDIT_WRAPPER_H */ |