blob: 7247171110ec0d591aeed4c05c7629c700df63ec [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__LINUX_OPENVSWITCH_H
20#define _UAPI__LINUX_OPENVSWITCH_H 1
21#include <linux/types.h>
22#include <linux/if_ether.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023struct ovs_header {
Tao Baod7db5942015-01-28 10:07:51 -080024 int dp_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070025};
26#define OVS_DATAPATH_FAMILY "ovs_datapath"
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define OVS_DATAPATH_MCGROUP "ovs_datapath"
Christopher Ferris38062f92014-07-09 15:33:25 -070028#define OVS_DATAPATH_VERSION 2
29#define OVS_DP_VER_FEATURES 2
Ben Cheng655a7c02013-10-16 16:09:24 -070030enum ovs_datapath_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080031 OVS_DP_CMD_UNSPEC,
32 OVS_DP_CMD_NEW,
33 OVS_DP_CMD_DEL,
34 OVS_DP_CMD_GET,
Tao Baod7db5942015-01-28 10:07:51 -080035 OVS_DP_CMD_SET
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37enum ovs_datapath_attr {
Tao Baod7db5942015-01-28 10:07:51 -080038 OVS_DP_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -080039 OVS_DP_ATTR_NAME,
40 OVS_DP_ATTR_UPCALL_PID,
41 OVS_DP_ATTR_STATS,
42 OVS_DP_ATTR_MEGAFLOW_STATS,
Tao Baod7db5942015-01-28 10:07:51 -080043 OVS_DP_ATTR_USER_FEATURES,
Christopher Ferris106b3a82016-08-24 12:15:38 -070044 OVS_DP_ATTR_PAD,
Tao Baod7db5942015-01-28 10:07:51 -080045 __OVS_DP_ATTR_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
Christopher Ferris106b3a82016-08-24 12:15:38 -070047#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070048struct ovs_dp_stats {
Tao Baod7db5942015-01-28 10:07:51 -080049 __u64 n_hit;
50 __u64 n_missed;
Christopher Ferris106b3a82016-08-24 12:15:38 -070051 __u64 n_lost;
Tao Baod7db5942015-01-28 10:07:51 -080052 __u64 n_flows;
Ben Cheng655a7c02013-10-16 16:09:24 -070053};
Christopher Ferris38062f92014-07-09 15:33:25 -070054struct ovs_dp_megaflow_stats {
Christopher Ferris106b3a82016-08-24 12:15:38 -070055 __u64 n_mask_hit;
Tao Baod7db5942015-01-28 10:07:51 -080056 __u32 n_masks;
57 __u32 pad0;
58 __u64 pad1;
Christopher Ferris106b3a82016-08-24 12:15:38 -070059 __u64 pad2;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
Christopher Ferris38062f92014-07-09 15:33:25 -070061struct ovs_vport_stats {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u64 rx_packets;
Christopher Ferris106b3a82016-08-24 12:15:38 -070063 __u64 tx_packets;
Tao Baod7db5942015-01-28 10:07:51 -080064 __u64 rx_bytes;
65 __u64 tx_bytes;
66 __u64 rx_errors;
Christopher Ferris106b3a82016-08-24 12:15:38 -070067 __u64 tx_errors;
Tao Baod7db5942015-01-28 10:07:51 -080068 __u64 rx_dropped;
69 __u64 tx_dropped;
Christopher Ferris38062f92014-07-09 15:33:25 -070070};
Christopher Ferris106b3a82016-08-24 12:15:38 -070071#define OVS_DP_F_UNALIGNED (1 << 0)
Christopher Ferris82d75042015-01-26 10:57:07 -080072#define OVS_DP_F_VPORT_PIDS (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -080073#define OVSP_LOCAL ((__u32) 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070074#define OVS_PACKET_FAMILY "ovs_packet"
Christopher Ferris106b3a82016-08-24 12:15:38 -070075#define OVS_PACKET_VERSION 0x1
Christopher Ferris82d75042015-01-26 10:57:07 -080076enum ovs_packet_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080077 OVS_PACKET_CMD_UNSPEC,
78 OVS_PACKET_CMD_MISS,
Christopher Ferris106b3a82016-08-24 12:15:38 -070079 OVS_PACKET_CMD_ACTION,
Tao Baod7db5942015-01-28 10:07:51 -080080 OVS_PACKET_CMD_EXECUTE
Ben Cheng655a7c02013-10-16 16:09:24 -070081};
82enum ovs_packet_attr {
Christopher Ferris106b3a82016-08-24 12:15:38 -070083 OVS_PACKET_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -080084 OVS_PACKET_ATTR_PACKET,
85 OVS_PACKET_ATTR_KEY,
86 OVS_PACKET_ATTR_ACTIONS,
Christopher Ferris106b3a82016-08-24 12:15:38 -070087 OVS_PACKET_ATTR_USERDATA,
Christopher Ferris05d08e92016-02-04 13:16:38 -080088 OVS_PACKET_ATTR_EGRESS_TUN_KEY,
89 OVS_PACKET_ATTR_UNUSED1,
90 OVS_PACKET_ATTR_UNUSED2,
Christopher Ferris106b3a82016-08-24 12:15:38 -070091 OVS_PACKET_ATTR_PROBE,
Christopher Ferris05d08e92016-02-04 13:16:38 -080092 OVS_PACKET_ATTR_MRU,
Christopher Ferris49f525c2016-12-12 14:55:36 -080093 OVS_PACKET_ATTR_LEN,
Tao Baod7db5942015-01-28 10:07:51 -080094 __OVS_PACKET_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -080095};
Christopher Ferris106b3a82016-08-24 12:15:38 -070096#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080097#define OVS_VPORT_FAMILY "ovs_vport"
Christopher Ferris82d75042015-01-26 10:57:07 -080098#define OVS_VPORT_MCGROUP "ovs_vport"
Christopher Ferris49f525c2016-12-12 14:55:36 -080099#define OVS_VPORT_VERSION 0x1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700100enum ovs_vport_cmd {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101 OVS_VPORT_CMD_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800102 OVS_VPORT_CMD_NEW,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103 OVS_VPORT_CMD_DEL,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104 OVS_VPORT_CMD_GET,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800105 OVS_VPORT_CMD_SET
Christopher Ferris82d75042015-01-26 10:57:07 -0800106};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800107enum ovs_vport_type {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108 OVS_VPORT_TYPE_UNSPEC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 OVS_VPORT_TYPE_NETDEV,
Tao Baod7db5942015-01-28 10:07:51 -0800110 OVS_VPORT_TYPE_INTERNAL,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800111 OVS_VPORT_TYPE_GRE,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700112 OVS_VPORT_TYPE_VXLAN,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113 OVS_VPORT_TYPE_GENEVE,
Tao Baod7db5942015-01-28 10:07:51 -0800114 __OVS_VPORT_TYPE_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800115};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700116#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800117enum ovs_vport_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800118 OVS_VPORT_ATTR_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800119 OVS_VPORT_ATTR_PORT_NO,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700120 OVS_VPORT_ATTR_TYPE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800121 OVS_VPORT_ATTR_NAME,
Tao Baod7db5942015-01-28 10:07:51 -0800122 OVS_VPORT_ATTR_OPTIONS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800123 OVS_VPORT_ATTR_UPCALL_PID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700124 OVS_VPORT_ATTR_STATS,
125 OVS_VPORT_ATTR_PAD,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800126 __OVS_VPORT_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800127};
Ben Cheng655a7c02013-10-16 16:09:24 -0700128#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700129enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800130 OVS_VXLAN_EXT_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800131 OVS_VXLAN_EXT_GBP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800132 __OVS_VXLAN_EXT_MAX,
133};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800135enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800136 OVS_TUNNEL_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800137 OVS_TUNNEL_ATTR_DST_PORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800138 OVS_TUNNEL_ATTR_EXTENSION,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800139 __OVS_TUNNEL_ATTR_MAX
Christopher Ferris38062f92014-07-09 15:33:25 -0700140};
141#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
142#define OVS_FLOW_FAMILY "ovs_flow"
Christopher Ferris49f525c2016-12-12 14:55:36 -0800143#define OVS_FLOW_MCGROUP "ovs_flow"
Ben Cheng655a7c02013-10-16 16:09:24 -0700144#define OVS_FLOW_VERSION 0x1
145enum ovs_flow_cmd {
Tao Baod7db5942015-01-28 10:07:51 -0800146 OVS_FLOW_CMD_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800147 OVS_FLOW_CMD_NEW,
Tao Baod7db5942015-01-28 10:07:51 -0800148 OVS_FLOW_CMD_DEL,
149 OVS_FLOW_CMD_GET,
Tao Baod7db5942015-01-28 10:07:51 -0800150 OVS_FLOW_CMD_SET
Christopher Ferris49f525c2016-12-12 14:55:36 -0800151};
Ben Cheng655a7c02013-10-16 16:09:24 -0700152struct ovs_flow_stats {
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u64 n_packets;
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u64 n_bytes;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800155};
Ben Cheng655a7c02013-10-16 16:09:24 -0700156enum ovs_key_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800157 OVS_KEY_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800158 OVS_KEY_ATTR_ENCAP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800159 OVS_KEY_ATTR_PRIORITY,
Tao Baod7db5942015-01-28 10:07:51 -0800160 OVS_KEY_ATTR_IN_PORT,
161 OVS_KEY_ATTR_ETHERNET,
Tao Baod7db5942015-01-28 10:07:51 -0800162 OVS_KEY_ATTR_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800163 OVS_KEY_ATTR_ETHERTYPE,
Tao Baod7db5942015-01-28 10:07:51 -0800164 OVS_KEY_ATTR_IPV4,
165 OVS_KEY_ATTR_IPV6,
Tao Baod7db5942015-01-28 10:07:51 -0800166 OVS_KEY_ATTR_TCP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800167 OVS_KEY_ATTR_UDP,
Tao Baod7db5942015-01-28 10:07:51 -0800168 OVS_KEY_ATTR_ICMP,
169 OVS_KEY_ATTR_ICMPV6,
Tao Baod7db5942015-01-28 10:07:51 -0800170 OVS_KEY_ATTR_ARP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800171 OVS_KEY_ATTR_ND,
Tao Baod7db5942015-01-28 10:07:51 -0800172 OVS_KEY_ATTR_SKB_MARK,
173 OVS_KEY_ATTR_TUNNEL,
Tao Baod7db5942015-01-28 10:07:51 -0800174 OVS_KEY_ATTR_SCTP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800175 OVS_KEY_ATTR_TCP_FLAGS,
Tao Baod7db5942015-01-28 10:07:51 -0800176 OVS_KEY_ATTR_DP_HASH,
177 OVS_KEY_ATTR_RECIRC_ID,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800178 OVS_KEY_ATTR_MPLS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800179 OVS_KEY_ATTR_CT_STATE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800180 OVS_KEY_ATTR_CT_ZONE,
181 OVS_KEY_ATTR_CT_MARK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800182 OVS_KEY_ATTR_CT_LABELS,
Christopher Ferris525ce912017-07-26 13:12:53 -0700183 OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4,
184 OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800185 __OVS_KEY_ATTR_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700186};
187#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800188enum ovs_tunnel_key_attr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800189 OVS_TUNNEL_KEY_ATTR_ID,
Tao Baod7db5942015-01-28 10:07:51 -0800190 OVS_TUNNEL_KEY_ATTR_IPV4_SRC,
191 OVS_TUNNEL_KEY_ATTR_IPV4_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800192 OVS_TUNNEL_KEY_ATTR_TOS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800193 OVS_TUNNEL_KEY_ATTR_TTL,
Tao Baod7db5942015-01-28 10:07:51 -0800194 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,
195 OVS_TUNNEL_KEY_ATTR_CSUM,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800196 OVS_TUNNEL_KEY_ATTR_OAM,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800197 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800198 OVS_TUNNEL_KEY_ATTR_TP_SRC,
199 OVS_TUNNEL_KEY_ATTR_TP_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800200 OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800201 OVS_TUNNEL_KEY_ATTR_IPV6_SRC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700202 OVS_TUNNEL_KEY_ATTR_IPV6_DST,
203 OVS_TUNNEL_KEY_ATTR_PAD,
204 __OVS_TUNNEL_KEY_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800205};
Christopher Ferris38062f92014-07-09 15:33:25 -0700206#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700207enum ovs_frag_type {
Tao Baod7db5942015-01-28 10:07:51 -0800208 OVS_FRAG_TYPE_NONE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800209 OVS_FRAG_TYPE_FIRST,
Tao Baod7db5942015-01-28 10:07:51 -0800210 OVS_FRAG_TYPE_LATER,
Tao Baod7db5942015-01-28 10:07:51 -0800211 __OVS_FRAG_TYPE_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700212};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800213#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700214struct ovs_key_ethernet {
Tao Baod7db5942015-01-28 10:07:51 -0800215 __u8 eth_src[ETH_ALEN];
216 __u8 eth_dst[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800217};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800218struct ovs_key_mpls {
219 __be32 mpls_lse;
220};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800221struct ovs_key_ipv4 {
Tao Baod7db5942015-01-28 10:07:51 -0800222 __be32 ipv4_src;
223 __be32 ipv4_dst;
224 __u8 ipv4_proto;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800225 __u8 ipv4_tos;
Tao Baod7db5942015-01-28 10:07:51 -0800226 __u8 ipv4_ttl;
227 __u8 ipv4_frag;
Christopher Ferris38062f92014-07-09 15:33:25 -0700228};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800229struct ovs_key_ipv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800230 __be32 ipv6_src[4];
231 __be32 ipv6_dst[4];
232 __be32 ipv6_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800233 __u8 ipv6_proto;
Tao Baod7db5942015-01-28 10:07:51 -0800234 __u8 ipv6_tclass;
235 __u8 ipv6_hlimit;
236 __u8 ipv6_frag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800237};
Ben Cheng655a7c02013-10-16 16:09:24 -0700238struct ovs_key_tcp {
Tao Baod7db5942015-01-28 10:07:51 -0800239 __be16 tcp_src;
240 __be16 tcp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800241};
Ben Cheng655a7c02013-10-16 16:09:24 -0700242struct ovs_key_udp {
Tao Baod7db5942015-01-28 10:07:51 -0800243 __be16 udp_src;
244 __be16 udp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800245};
Christopher Ferris38062f92014-07-09 15:33:25 -0700246struct ovs_key_sctp {
Tao Baod7db5942015-01-28 10:07:51 -0800247 __be16 sctp_src;
248 __be16 sctp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800249};
Ben Cheng655a7c02013-10-16 16:09:24 -0700250struct ovs_key_icmp {
Tao Baod7db5942015-01-28 10:07:51 -0800251 __u8 icmp_type;
252 __u8 icmp_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800253};
Ben Cheng655a7c02013-10-16 16:09:24 -0700254struct ovs_key_icmpv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800255 __u8 icmpv6_type;
256 __u8 icmpv6_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800257};
Ben Cheng655a7c02013-10-16 16:09:24 -0700258struct ovs_key_arp {
Tao Baod7db5942015-01-28 10:07:51 -0800259 __be32 arp_sip;
260 __be32 arp_tip;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800261 __be16 arp_op;
Tao Baod7db5942015-01-28 10:07:51 -0800262 __u8 arp_sha[ETH_ALEN];
263 __u8 arp_tha[ETH_ALEN];
Christopher Ferris38062f92014-07-09 15:33:25 -0700264};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800265struct ovs_key_nd {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800266 __be32 nd_target[4];
Tao Baod7db5942015-01-28 10:07:51 -0800267 __u8 nd_sll[ETH_ALEN];
268 __u8 nd_tll[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800269};
Christopher Ferris525ce912017-07-26 13:12:53 -0700270#define OVS_CT_LABELS_LEN_32 4
271#define OVS_CT_LABELS_LEN (OVS_CT_LABELS_LEN_32 * sizeof(__u32))
Christopher Ferris05d08e92016-02-04 13:16:38 -0800272struct ovs_key_ct_labels {
Christopher Ferris525ce912017-07-26 13:12:53 -0700273 union {
274 __u8 ct_labels[OVS_CT_LABELS_LEN];
275 __u32 ct_labels_32[OVS_CT_LABELS_LEN_32];
276 };
Christopher Ferris49f525c2016-12-12 14:55:36 -0800277};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800278#define OVS_CS_F_NEW 0x01
279#define OVS_CS_F_ESTABLISHED 0x02
280#define OVS_CS_F_RELATED 0x04
Christopher Ferris49f525c2016-12-12 14:55:36 -0800281#define OVS_CS_F_REPLY_DIR 0x08
Christopher Ferris05d08e92016-02-04 13:16:38 -0800282#define OVS_CS_F_INVALID 0x10
283#define OVS_CS_F_TRACKED 0x20
Christopher Ferris106b3a82016-08-24 12:15:38 -0700284#define OVS_CS_F_SRC_NAT 0x40
Christopher Ferris49f525c2016-12-12 14:55:36 -0800285#define OVS_CS_F_DST_NAT 0x80
Christopher Ferris106b3a82016-08-24 12:15:38 -0700286#define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT)
Christopher Ferris525ce912017-07-26 13:12:53 -0700287struct ovs_key_ct_tuple_ipv4 {
288 __be32 ipv4_src;
289 __be32 ipv4_dst;
290 __be16 src_port;
291 __be16 dst_port;
292 __u8 ipv4_proto;
293};
294struct ovs_key_ct_tuple_ipv6 {
295 __be32 ipv6_src[4];
296 __be32 ipv6_dst[4];
297 __be16 src_port;
298 __be16 dst_port;
299 __u8 ipv6_proto;
300};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700301enum ovs_flow_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800302 OVS_FLOW_ATTR_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800303 OVS_FLOW_ATTR_KEY,
Tao Baod7db5942015-01-28 10:07:51 -0800304 OVS_FLOW_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800305 OVS_FLOW_ATTR_STATS,
306 OVS_FLOW_ATTR_TCP_FLAGS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800307 OVS_FLOW_ATTR_USED,
Tao Baod7db5942015-01-28 10:07:51 -0800308 OVS_FLOW_ATTR_CLEAR,
Tao Baod7db5942015-01-28 10:07:51 -0800309 OVS_FLOW_ATTR_MASK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800310 OVS_FLOW_ATTR_PROBE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800311 OVS_FLOW_ATTR_UFID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700312 OVS_FLOW_ATTR_UFID_FLAGS,
313 OVS_FLOW_ATTR_PAD,
314 __OVS_FLOW_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800315};
Ben Cheng655a7c02013-10-16 16:09:24 -0700316#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800317#define OVS_UFID_F_OMIT_KEY (1 << 0)
318#define OVS_UFID_F_OMIT_MASK (1 << 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800319#define OVS_UFID_F_OMIT_ACTIONS (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700320enum ovs_sample_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800321 OVS_SAMPLE_ATTR_UNSPEC,
322 OVS_SAMPLE_ATTR_PROBABILITY,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800323 OVS_SAMPLE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800324 __OVS_SAMPLE_ATTR_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700325};
326#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800327enum ovs_userspace_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800328 OVS_USERSPACE_ATTR_UNSPEC,
329 OVS_USERSPACE_ATTR_PID,
330 OVS_USERSPACE_ATTR_USERDATA,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800331 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800332 OVS_USERSPACE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800333 __OVS_USERSPACE_ATTR_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -0800334};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800335#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800336struct ovs_action_trunc {
337 __u32 max_len;
338};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800339struct ovs_action_push_mpls {
340 __be32 mpls_lse;
341 __be16 mpls_ethertype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700342};
Ben Cheng655a7c02013-10-16 16:09:24 -0700343struct ovs_action_push_vlan {
Tao Baod7db5942015-01-28 10:07:51 -0800344 __be16 vlan_tpid;
Tao Baod7db5942015-01-28 10:07:51 -0800345 __be16 vlan_tci;
Ben Cheng655a7c02013-10-16 16:09:24 -0700346};
Christopher Ferris82d75042015-01-26 10:57:07 -0800347enum ovs_hash_alg {
Tao Baod7db5942015-01-28 10:07:51 -0800348 OVS_HASH_ALG_L4,
Christopher Ferris82d75042015-01-26 10:57:07 -0800349};
350struct ovs_action_hash {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800351 __u32 hash_alg;
352 __u32 hash_basis;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800353};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800354enum ovs_ct_attr {
355 OVS_CT_ATTR_UNSPEC,
356 OVS_CT_ATTR_COMMIT,
357 OVS_CT_ATTR_ZONE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800358 OVS_CT_ATTR_MARK,
359 OVS_CT_ATTR_LABELS,
360 OVS_CT_ATTR_HELPER,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700361 OVS_CT_ATTR_NAT,
Christopher Ferris525ce912017-07-26 13:12:53 -0700362 OVS_CT_ATTR_FORCE_COMMIT,
363 OVS_CT_ATTR_EVENTMASK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800364 __OVS_CT_ATTR_MAX
Christopher Ferris82d75042015-01-26 10:57:07 -0800365};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800366#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700367enum ovs_nat_attr {
368 OVS_NAT_ATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700369 OVS_NAT_ATTR_SRC,
370 OVS_NAT_ATTR_DST,
371 OVS_NAT_ATTR_IP_MIN,
372 OVS_NAT_ATTR_IP_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700373 OVS_NAT_ATTR_PROTO_MIN,
374 OVS_NAT_ATTR_PROTO_MAX,
375 OVS_NAT_ATTR_PERSISTENT,
376 OVS_NAT_ATTR_PROTO_HASH,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700377 OVS_NAT_ATTR_PROTO_RANDOM,
378 __OVS_NAT_ATTR_MAX,
379};
380#define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1)
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800381struct ovs_action_push_eth {
382 struct ovs_key_ethernet addresses;
383};
Ben Cheng655a7c02013-10-16 16:09:24 -0700384enum ovs_action_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800385 OVS_ACTION_ATTR_UNSPEC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800386 OVS_ACTION_ATTR_OUTPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800387 OVS_ACTION_ATTR_USERSPACE,
388 OVS_ACTION_ATTR_SET,
389 OVS_ACTION_ATTR_PUSH_VLAN,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800390 OVS_ACTION_ATTR_POP_VLAN,
Tao Baod7db5942015-01-28 10:07:51 -0800391 OVS_ACTION_ATTR_SAMPLE,
392 OVS_ACTION_ATTR_RECIRC,
393 OVS_ACTION_ATTR_HASH,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800394 OVS_ACTION_ATTR_PUSH_MPLS,
395 OVS_ACTION_ATTR_POP_MPLS,
396 OVS_ACTION_ATTR_SET_MASKED,
397 OVS_ACTION_ATTR_CT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800398 OVS_ACTION_ATTR_TRUNC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800399 OVS_ACTION_ATTR_PUSH_ETH,
400 OVS_ACTION_ATTR_POP_ETH,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800401 __OVS_ACTION_ATTR_MAX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800402};
Ben Cheng655a7c02013-10-16 16:09:24 -0700403#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
404#endif