blob: 54c76d7c8db4c10af37a47d3e53af405aa2226b2 [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 Ferris49f525c2016-12-12 14:55:36 -0800183 __OVS_KEY_ATTR_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700184};
185#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800186enum ovs_tunnel_key_attr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800187 OVS_TUNNEL_KEY_ATTR_ID,
Tao Baod7db5942015-01-28 10:07:51 -0800188 OVS_TUNNEL_KEY_ATTR_IPV4_SRC,
189 OVS_TUNNEL_KEY_ATTR_IPV4_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800190 OVS_TUNNEL_KEY_ATTR_TOS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800191 OVS_TUNNEL_KEY_ATTR_TTL,
Tao Baod7db5942015-01-28 10:07:51 -0800192 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,
193 OVS_TUNNEL_KEY_ATTR_CSUM,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800194 OVS_TUNNEL_KEY_ATTR_OAM,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800195 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800196 OVS_TUNNEL_KEY_ATTR_TP_SRC,
197 OVS_TUNNEL_KEY_ATTR_TP_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800198 OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800199 OVS_TUNNEL_KEY_ATTR_IPV6_SRC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700200 OVS_TUNNEL_KEY_ATTR_IPV6_DST,
201 OVS_TUNNEL_KEY_ATTR_PAD,
202 __OVS_TUNNEL_KEY_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800203};
Christopher Ferris38062f92014-07-09 15:33:25 -0700204#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700205enum ovs_frag_type {
Tao Baod7db5942015-01-28 10:07:51 -0800206 OVS_FRAG_TYPE_NONE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800207 OVS_FRAG_TYPE_FIRST,
Tao Baod7db5942015-01-28 10:07:51 -0800208 OVS_FRAG_TYPE_LATER,
Tao Baod7db5942015-01-28 10:07:51 -0800209 __OVS_FRAG_TYPE_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700210};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800211#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700212struct ovs_key_ethernet {
Tao Baod7db5942015-01-28 10:07:51 -0800213 __u8 eth_src[ETH_ALEN];
214 __u8 eth_dst[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800215};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800216struct ovs_key_mpls {
217 __be32 mpls_lse;
218};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800219struct ovs_key_ipv4 {
Tao Baod7db5942015-01-28 10:07:51 -0800220 __be32 ipv4_src;
221 __be32 ipv4_dst;
222 __u8 ipv4_proto;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800223 __u8 ipv4_tos;
Tao Baod7db5942015-01-28 10:07:51 -0800224 __u8 ipv4_ttl;
225 __u8 ipv4_frag;
Christopher Ferris38062f92014-07-09 15:33:25 -0700226};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800227struct ovs_key_ipv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800228 __be32 ipv6_src[4];
229 __be32 ipv6_dst[4];
230 __be32 ipv6_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800231 __u8 ipv6_proto;
Tao Baod7db5942015-01-28 10:07:51 -0800232 __u8 ipv6_tclass;
233 __u8 ipv6_hlimit;
234 __u8 ipv6_frag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800235};
Ben Cheng655a7c02013-10-16 16:09:24 -0700236struct ovs_key_tcp {
Tao Baod7db5942015-01-28 10:07:51 -0800237 __be16 tcp_src;
238 __be16 tcp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800239};
Ben Cheng655a7c02013-10-16 16:09:24 -0700240struct ovs_key_udp {
Tao Baod7db5942015-01-28 10:07:51 -0800241 __be16 udp_src;
242 __be16 udp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800243};
Christopher Ferris38062f92014-07-09 15:33:25 -0700244struct ovs_key_sctp {
Tao Baod7db5942015-01-28 10:07:51 -0800245 __be16 sctp_src;
246 __be16 sctp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800247};
Ben Cheng655a7c02013-10-16 16:09:24 -0700248struct ovs_key_icmp {
Tao Baod7db5942015-01-28 10:07:51 -0800249 __u8 icmp_type;
250 __u8 icmp_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800251};
Ben Cheng655a7c02013-10-16 16:09:24 -0700252struct ovs_key_icmpv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800253 __u8 icmpv6_type;
254 __u8 icmpv6_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800255};
Ben Cheng655a7c02013-10-16 16:09:24 -0700256struct ovs_key_arp {
Tao Baod7db5942015-01-28 10:07:51 -0800257 __be32 arp_sip;
258 __be32 arp_tip;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800259 __be16 arp_op;
Tao Baod7db5942015-01-28 10:07:51 -0800260 __u8 arp_sha[ETH_ALEN];
261 __u8 arp_tha[ETH_ALEN];
Christopher Ferris38062f92014-07-09 15:33:25 -0700262};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800263struct ovs_key_nd {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800264 __be32 nd_target[4];
Tao Baod7db5942015-01-28 10:07:51 -0800265 __u8 nd_sll[ETH_ALEN];
266 __u8 nd_tll[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800267};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800268#define OVS_CT_LABELS_LEN 16
269struct ovs_key_ct_labels {
270 __u8 ct_labels[OVS_CT_LABELS_LEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800271};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800272#define OVS_CS_F_NEW 0x01
273#define OVS_CS_F_ESTABLISHED 0x02
274#define OVS_CS_F_RELATED 0x04
Christopher Ferris49f525c2016-12-12 14:55:36 -0800275#define OVS_CS_F_REPLY_DIR 0x08
Christopher Ferris05d08e92016-02-04 13:16:38 -0800276#define OVS_CS_F_INVALID 0x10
277#define OVS_CS_F_TRACKED 0x20
Christopher Ferris106b3a82016-08-24 12:15:38 -0700278#define OVS_CS_F_SRC_NAT 0x40
Christopher Ferris49f525c2016-12-12 14:55:36 -0800279#define OVS_CS_F_DST_NAT 0x80
Christopher Ferris106b3a82016-08-24 12:15:38 -0700280#define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT)
281enum ovs_flow_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800282 OVS_FLOW_ATTR_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800283 OVS_FLOW_ATTR_KEY,
Tao Baod7db5942015-01-28 10:07:51 -0800284 OVS_FLOW_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800285 OVS_FLOW_ATTR_STATS,
286 OVS_FLOW_ATTR_TCP_FLAGS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800287 OVS_FLOW_ATTR_USED,
Tao Baod7db5942015-01-28 10:07:51 -0800288 OVS_FLOW_ATTR_CLEAR,
Tao Baod7db5942015-01-28 10:07:51 -0800289 OVS_FLOW_ATTR_MASK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800290 OVS_FLOW_ATTR_PROBE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800291 OVS_FLOW_ATTR_UFID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700292 OVS_FLOW_ATTR_UFID_FLAGS,
293 OVS_FLOW_ATTR_PAD,
294 __OVS_FLOW_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800295};
Ben Cheng655a7c02013-10-16 16:09:24 -0700296#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800297#define OVS_UFID_F_OMIT_KEY (1 << 0)
298#define OVS_UFID_F_OMIT_MASK (1 << 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800299#define OVS_UFID_F_OMIT_ACTIONS (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700300enum ovs_sample_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800301 OVS_SAMPLE_ATTR_UNSPEC,
302 OVS_SAMPLE_ATTR_PROBABILITY,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800303 OVS_SAMPLE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800304 __OVS_SAMPLE_ATTR_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700305};
306#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800307enum ovs_userspace_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800308 OVS_USERSPACE_ATTR_UNSPEC,
309 OVS_USERSPACE_ATTR_PID,
310 OVS_USERSPACE_ATTR_USERDATA,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800311 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800312 OVS_USERSPACE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800313 __OVS_USERSPACE_ATTR_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -0800314};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800315#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800316struct ovs_action_trunc {
317 __u32 max_len;
318};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800319struct ovs_action_push_mpls {
320 __be32 mpls_lse;
321 __be16 mpls_ethertype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700322};
Ben Cheng655a7c02013-10-16 16:09:24 -0700323struct ovs_action_push_vlan {
Tao Baod7db5942015-01-28 10:07:51 -0800324 __be16 vlan_tpid;
Tao Baod7db5942015-01-28 10:07:51 -0800325 __be16 vlan_tci;
Ben Cheng655a7c02013-10-16 16:09:24 -0700326};
Christopher Ferris82d75042015-01-26 10:57:07 -0800327enum ovs_hash_alg {
Tao Baod7db5942015-01-28 10:07:51 -0800328 OVS_HASH_ALG_L4,
Christopher Ferris82d75042015-01-26 10:57:07 -0800329};
330struct ovs_action_hash {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800331 __u32 hash_alg;
332 __u32 hash_basis;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800333};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800334enum ovs_ct_attr {
335 OVS_CT_ATTR_UNSPEC,
336 OVS_CT_ATTR_COMMIT,
337 OVS_CT_ATTR_ZONE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800338 OVS_CT_ATTR_MARK,
339 OVS_CT_ATTR_LABELS,
340 OVS_CT_ATTR_HELPER,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700341 OVS_CT_ATTR_NAT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800342 __OVS_CT_ATTR_MAX
Christopher Ferris82d75042015-01-26 10:57:07 -0800343};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800344#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700345enum ovs_nat_attr {
346 OVS_NAT_ATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700347 OVS_NAT_ATTR_SRC,
348 OVS_NAT_ATTR_DST,
349 OVS_NAT_ATTR_IP_MIN,
350 OVS_NAT_ATTR_IP_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700351 OVS_NAT_ATTR_PROTO_MIN,
352 OVS_NAT_ATTR_PROTO_MAX,
353 OVS_NAT_ATTR_PERSISTENT,
354 OVS_NAT_ATTR_PROTO_HASH,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700355 OVS_NAT_ATTR_PROTO_RANDOM,
356 __OVS_NAT_ATTR_MAX,
357};
358#define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1)
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800359struct ovs_action_push_eth {
360 struct ovs_key_ethernet addresses;
361};
Ben Cheng655a7c02013-10-16 16:09:24 -0700362enum ovs_action_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800363 OVS_ACTION_ATTR_UNSPEC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800364 OVS_ACTION_ATTR_OUTPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800365 OVS_ACTION_ATTR_USERSPACE,
366 OVS_ACTION_ATTR_SET,
367 OVS_ACTION_ATTR_PUSH_VLAN,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800368 OVS_ACTION_ATTR_POP_VLAN,
Tao Baod7db5942015-01-28 10:07:51 -0800369 OVS_ACTION_ATTR_SAMPLE,
370 OVS_ACTION_ATTR_RECIRC,
371 OVS_ACTION_ATTR_HASH,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800372 OVS_ACTION_ATTR_PUSH_MPLS,
373 OVS_ACTION_ATTR_POP_MPLS,
374 OVS_ACTION_ATTR_SET_MASKED,
375 OVS_ACTION_ATTR_CT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800376 OVS_ACTION_ATTR_TRUNC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800377 OVS_ACTION_ATTR_PUSH_ETH,
378 OVS_ACTION_ATTR_POP_ETH,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800379 __OVS_ACTION_ATTR_MAX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800380};
Ben Cheng655a7c02013-10-16 16:09:24 -0700381#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
382#endif