blob: 7e75ac6f6bbed9d6761d47090c0fe175df63c2b2 [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 Ferris934ec942018-01-31 15:29:16 -0800126 OVS_VPORT_ATTR_IFINDEX,
127 OVS_VPORT_ATTR_NETNSID,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800128 __OVS_VPORT_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800129};
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700131enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800132 OVS_VXLAN_EXT_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800133 OVS_VXLAN_EXT_GBP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134 __OVS_VXLAN_EXT_MAX,
135};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800136#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800137enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800138 OVS_TUNNEL_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800139 OVS_TUNNEL_ATTR_DST_PORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800140 OVS_TUNNEL_ATTR_EXTENSION,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800141 __OVS_TUNNEL_ATTR_MAX
Christopher Ferris38062f92014-07-09 15:33:25 -0700142};
143#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
144#define OVS_FLOW_FAMILY "ovs_flow"
Christopher Ferris49f525c2016-12-12 14:55:36 -0800145#define OVS_FLOW_MCGROUP "ovs_flow"
Ben Cheng655a7c02013-10-16 16:09:24 -0700146#define OVS_FLOW_VERSION 0x1
147enum ovs_flow_cmd {
Tao Baod7db5942015-01-28 10:07:51 -0800148 OVS_FLOW_CMD_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800149 OVS_FLOW_CMD_NEW,
Tao Baod7db5942015-01-28 10:07:51 -0800150 OVS_FLOW_CMD_DEL,
151 OVS_FLOW_CMD_GET,
Tao Baod7db5942015-01-28 10:07:51 -0800152 OVS_FLOW_CMD_SET
Christopher Ferris49f525c2016-12-12 14:55:36 -0800153};
Ben Cheng655a7c02013-10-16 16:09:24 -0700154struct ovs_flow_stats {
Tao Baod7db5942015-01-28 10:07:51 -0800155 __u64 n_packets;
Tao Baod7db5942015-01-28 10:07:51 -0800156 __u64 n_bytes;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800157};
Ben Cheng655a7c02013-10-16 16:09:24 -0700158enum ovs_key_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800159 OVS_KEY_ATTR_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800160 OVS_KEY_ATTR_ENCAP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800161 OVS_KEY_ATTR_PRIORITY,
Tao Baod7db5942015-01-28 10:07:51 -0800162 OVS_KEY_ATTR_IN_PORT,
163 OVS_KEY_ATTR_ETHERNET,
Tao Baod7db5942015-01-28 10:07:51 -0800164 OVS_KEY_ATTR_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800165 OVS_KEY_ATTR_ETHERTYPE,
Tao Baod7db5942015-01-28 10:07:51 -0800166 OVS_KEY_ATTR_IPV4,
167 OVS_KEY_ATTR_IPV6,
Tao Baod7db5942015-01-28 10:07:51 -0800168 OVS_KEY_ATTR_TCP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800169 OVS_KEY_ATTR_UDP,
Tao Baod7db5942015-01-28 10:07:51 -0800170 OVS_KEY_ATTR_ICMP,
171 OVS_KEY_ATTR_ICMPV6,
Tao Baod7db5942015-01-28 10:07:51 -0800172 OVS_KEY_ATTR_ARP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800173 OVS_KEY_ATTR_ND,
Tao Baod7db5942015-01-28 10:07:51 -0800174 OVS_KEY_ATTR_SKB_MARK,
175 OVS_KEY_ATTR_TUNNEL,
Tao Baod7db5942015-01-28 10:07:51 -0800176 OVS_KEY_ATTR_SCTP,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800177 OVS_KEY_ATTR_TCP_FLAGS,
Tao Baod7db5942015-01-28 10:07:51 -0800178 OVS_KEY_ATTR_DP_HASH,
179 OVS_KEY_ATTR_RECIRC_ID,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800180 OVS_KEY_ATTR_MPLS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800181 OVS_KEY_ATTR_CT_STATE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800182 OVS_KEY_ATTR_CT_ZONE,
183 OVS_KEY_ATTR_CT_MARK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184 OVS_KEY_ATTR_CT_LABELS,
Christopher Ferris525ce912017-07-26 13:12:53 -0700185 OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4,
186 OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6,
Christopher Ferris934ec942018-01-31 15:29:16 -0800187 OVS_KEY_ATTR_NSH,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800188 __OVS_KEY_ATTR_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700189};
190#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800191enum ovs_tunnel_key_attr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800192 OVS_TUNNEL_KEY_ATTR_ID,
Tao Baod7db5942015-01-28 10:07:51 -0800193 OVS_TUNNEL_KEY_ATTR_IPV4_SRC,
194 OVS_TUNNEL_KEY_ATTR_IPV4_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800195 OVS_TUNNEL_KEY_ATTR_TOS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800196 OVS_TUNNEL_KEY_ATTR_TTL,
Tao Baod7db5942015-01-28 10:07:51 -0800197 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,
198 OVS_TUNNEL_KEY_ATTR_CSUM,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800199 OVS_TUNNEL_KEY_ATTR_OAM,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800200 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800201 OVS_TUNNEL_KEY_ATTR_TP_SRC,
202 OVS_TUNNEL_KEY_ATTR_TP_DST,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800203 OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800204 OVS_TUNNEL_KEY_ATTR_IPV6_SRC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700205 OVS_TUNNEL_KEY_ATTR_IPV6_DST,
206 OVS_TUNNEL_KEY_ATTR_PAD,
Christopher Ferris76a1d452018-06-27 14:12:29 -0700207 OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700208 __OVS_TUNNEL_KEY_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800209};
Christopher Ferris38062f92014-07-09 15:33:25 -0700210#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700211enum ovs_frag_type {
Tao Baod7db5942015-01-28 10:07:51 -0800212 OVS_FRAG_TYPE_NONE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800213 OVS_FRAG_TYPE_FIRST,
Tao Baod7db5942015-01-28 10:07:51 -0800214 OVS_FRAG_TYPE_LATER,
Tao Baod7db5942015-01-28 10:07:51 -0800215 __OVS_FRAG_TYPE_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700216};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800217#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700218struct ovs_key_ethernet {
Tao Baod7db5942015-01-28 10:07:51 -0800219 __u8 eth_src[ETH_ALEN];
220 __u8 eth_dst[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800221};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800222struct ovs_key_mpls {
223 __be32 mpls_lse;
224};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800225struct ovs_key_ipv4 {
Tao Baod7db5942015-01-28 10:07:51 -0800226 __be32 ipv4_src;
227 __be32 ipv4_dst;
228 __u8 ipv4_proto;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800229 __u8 ipv4_tos;
Tao Baod7db5942015-01-28 10:07:51 -0800230 __u8 ipv4_ttl;
231 __u8 ipv4_frag;
Christopher Ferris38062f92014-07-09 15:33:25 -0700232};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800233struct ovs_key_ipv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800234 __be32 ipv6_src[4];
235 __be32 ipv6_dst[4];
236 __be32 ipv6_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800237 __u8 ipv6_proto;
Tao Baod7db5942015-01-28 10:07:51 -0800238 __u8 ipv6_tclass;
239 __u8 ipv6_hlimit;
240 __u8 ipv6_frag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800241};
Ben Cheng655a7c02013-10-16 16:09:24 -0700242struct ovs_key_tcp {
Tao Baod7db5942015-01-28 10:07:51 -0800243 __be16 tcp_src;
244 __be16 tcp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800245};
Ben Cheng655a7c02013-10-16 16:09:24 -0700246struct ovs_key_udp {
Tao Baod7db5942015-01-28 10:07:51 -0800247 __be16 udp_src;
248 __be16 udp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800249};
Christopher Ferris38062f92014-07-09 15:33:25 -0700250struct ovs_key_sctp {
Tao Baod7db5942015-01-28 10:07:51 -0800251 __be16 sctp_src;
252 __be16 sctp_dst;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800253};
Ben Cheng655a7c02013-10-16 16:09:24 -0700254struct ovs_key_icmp {
Tao Baod7db5942015-01-28 10:07:51 -0800255 __u8 icmp_type;
256 __u8 icmp_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800257};
Ben Cheng655a7c02013-10-16 16:09:24 -0700258struct ovs_key_icmpv6 {
Tao Baod7db5942015-01-28 10:07:51 -0800259 __u8 icmpv6_type;
260 __u8 icmpv6_code;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800261};
Ben Cheng655a7c02013-10-16 16:09:24 -0700262struct ovs_key_arp {
Tao Baod7db5942015-01-28 10:07:51 -0800263 __be32 arp_sip;
264 __be32 arp_tip;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800265 __be16 arp_op;
Tao Baod7db5942015-01-28 10:07:51 -0800266 __u8 arp_sha[ETH_ALEN];
267 __u8 arp_tha[ETH_ALEN];
Christopher Ferris38062f92014-07-09 15:33:25 -0700268};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800269struct ovs_key_nd {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800270 __be32 nd_target[4];
Tao Baod7db5942015-01-28 10:07:51 -0800271 __u8 nd_sll[ETH_ALEN];
272 __u8 nd_tll[ETH_ALEN];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800273};
Christopher Ferris525ce912017-07-26 13:12:53 -0700274#define OVS_CT_LABELS_LEN_32 4
275#define OVS_CT_LABELS_LEN (OVS_CT_LABELS_LEN_32 * sizeof(__u32))
Christopher Ferris05d08e92016-02-04 13:16:38 -0800276struct ovs_key_ct_labels {
Christopher Ferris525ce912017-07-26 13:12:53 -0700277 union {
278 __u8 ct_labels[OVS_CT_LABELS_LEN];
279 __u32 ct_labels_32[OVS_CT_LABELS_LEN_32];
280 };
Christopher Ferris49f525c2016-12-12 14:55:36 -0800281};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800282#define OVS_CS_F_NEW 0x01
283#define OVS_CS_F_ESTABLISHED 0x02
284#define OVS_CS_F_RELATED 0x04
Christopher Ferris49f525c2016-12-12 14:55:36 -0800285#define OVS_CS_F_REPLY_DIR 0x08
Christopher Ferris05d08e92016-02-04 13:16:38 -0800286#define OVS_CS_F_INVALID 0x10
287#define OVS_CS_F_TRACKED 0x20
Christopher Ferris106b3a82016-08-24 12:15:38 -0700288#define OVS_CS_F_SRC_NAT 0x40
Christopher Ferris49f525c2016-12-12 14:55:36 -0800289#define OVS_CS_F_DST_NAT 0x80
Christopher Ferris106b3a82016-08-24 12:15:38 -0700290#define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT)
Christopher Ferris525ce912017-07-26 13:12:53 -0700291struct ovs_key_ct_tuple_ipv4 {
292 __be32 ipv4_src;
293 __be32 ipv4_dst;
294 __be16 src_port;
295 __be16 dst_port;
296 __u8 ipv4_proto;
297};
298struct ovs_key_ct_tuple_ipv6 {
299 __be32 ipv6_src[4];
300 __be32 ipv6_dst[4];
301 __be16 src_port;
302 __be16 dst_port;
303 __u8 ipv6_proto;
304};
Christopher Ferris934ec942018-01-31 15:29:16 -0800305enum ovs_nsh_key_attr {
306 OVS_NSH_KEY_ATTR_UNSPEC,
307 OVS_NSH_KEY_ATTR_BASE,
308 OVS_NSH_KEY_ATTR_MD1,
309 OVS_NSH_KEY_ATTR_MD2,
310 __OVS_NSH_KEY_ATTR_MAX
311};
312#define OVS_NSH_KEY_ATTR_MAX (__OVS_NSH_KEY_ATTR_MAX - 1)
313struct ovs_nsh_key_base {
314 __u8 flags;
315 __u8 ttl;
316 __u8 mdtype;
317 __u8 np;
318 __be32 path_hdr;
319};
320#define NSH_MD1_CONTEXT_SIZE 4
321struct ovs_nsh_key_md1 {
322 __be32 context[NSH_MD1_CONTEXT_SIZE];
323};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700324enum ovs_flow_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800325 OVS_FLOW_ATTR_UNSPEC,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800326 OVS_FLOW_ATTR_KEY,
Tao Baod7db5942015-01-28 10:07:51 -0800327 OVS_FLOW_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800328 OVS_FLOW_ATTR_STATS,
329 OVS_FLOW_ATTR_TCP_FLAGS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800330 OVS_FLOW_ATTR_USED,
Tao Baod7db5942015-01-28 10:07:51 -0800331 OVS_FLOW_ATTR_CLEAR,
Tao Baod7db5942015-01-28 10:07:51 -0800332 OVS_FLOW_ATTR_MASK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800333 OVS_FLOW_ATTR_PROBE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800334 OVS_FLOW_ATTR_UFID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700335 OVS_FLOW_ATTR_UFID_FLAGS,
336 OVS_FLOW_ATTR_PAD,
337 __OVS_FLOW_ATTR_MAX
Christopher Ferris49f525c2016-12-12 14:55:36 -0800338};
Ben Cheng655a7c02013-10-16 16:09:24 -0700339#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800340#define OVS_UFID_F_OMIT_KEY (1 << 0)
341#define OVS_UFID_F_OMIT_MASK (1 << 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800342#define OVS_UFID_F_OMIT_ACTIONS (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700343enum ovs_sample_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800344 OVS_SAMPLE_ATTR_UNSPEC,
345 OVS_SAMPLE_ATTR_PROBABILITY,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800346 OVS_SAMPLE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800347 __OVS_SAMPLE_ATTR_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700348};
349#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800350enum ovs_userspace_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800351 OVS_USERSPACE_ATTR_UNSPEC,
352 OVS_USERSPACE_ATTR_PID,
353 OVS_USERSPACE_ATTR_USERDATA,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800354 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800355 OVS_USERSPACE_ATTR_ACTIONS,
Tao Baod7db5942015-01-28 10:07:51 -0800356 __OVS_USERSPACE_ATTR_MAX
Christopher Ferris05d08e92016-02-04 13:16:38 -0800357};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800358#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800359struct ovs_action_trunc {
360 __u32 max_len;
361};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800362struct ovs_action_push_mpls {
363 __be32 mpls_lse;
364 __be16 mpls_ethertype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700365};
Ben Cheng655a7c02013-10-16 16:09:24 -0700366struct ovs_action_push_vlan {
Tao Baod7db5942015-01-28 10:07:51 -0800367 __be16 vlan_tpid;
Tao Baod7db5942015-01-28 10:07:51 -0800368 __be16 vlan_tci;
Ben Cheng655a7c02013-10-16 16:09:24 -0700369};
Christopher Ferris82d75042015-01-26 10:57:07 -0800370enum ovs_hash_alg {
Tao Baod7db5942015-01-28 10:07:51 -0800371 OVS_HASH_ALG_L4,
Christopher Ferris82d75042015-01-26 10:57:07 -0800372};
373struct ovs_action_hash {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800374 __u32 hash_alg;
375 __u32 hash_basis;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800376};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800377enum ovs_ct_attr {
378 OVS_CT_ATTR_UNSPEC,
379 OVS_CT_ATTR_COMMIT,
380 OVS_CT_ATTR_ZONE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800381 OVS_CT_ATTR_MARK,
382 OVS_CT_ATTR_LABELS,
383 OVS_CT_ATTR_HELPER,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700384 OVS_CT_ATTR_NAT,
Christopher Ferris525ce912017-07-26 13:12:53 -0700385 OVS_CT_ATTR_FORCE_COMMIT,
386 OVS_CT_ATTR_EVENTMASK,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800387 __OVS_CT_ATTR_MAX
Christopher Ferris82d75042015-01-26 10:57:07 -0800388};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800389#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700390enum ovs_nat_attr {
391 OVS_NAT_ATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700392 OVS_NAT_ATTR_SRC,
393 OVS_NAT_ATTR_DST,
394 OVS_NAT_ATTR_IP_MIN,
395 OVS_NAT_ATTR_IP_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700396 OVS_NAT_ATTR_PROTO_MIN,
397 OVS_NAT_ATTR_PROTO_MAX,
398 OVS_NAT_ATTR_PERSISTENT,
399 OVS_NAT_ATTR_PROTO_HASH,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700400 OVS_NAT_ATTR_PROTO_RANDOM,
401 __OVS_NAT_ATTR_MAX,
402};
403#define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1)
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800404struct ovs_action_push_eth {
405 struct ovs_key_ethernet addresses;
406};
Ben Cheng655a7c02013-10-16 16:09:24 -0700407enum ovs_action_attr {
Tao Baod7db5942015-01-28 10:07:51 -0800408 OVS_ACTION_ATTR_UNSPEC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800409 OVS_ACTION_ATTR_OUTPUT,
Tao Baod7db5942015-01-28 10:07:51 -0800410 OVS_ACTION_ATTR_USERSPACE,
411 OVS_ACTION_ATTR_SET,
412 OVS_ACTION_ATTR_PUSH_VLAN,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800413 OVS_ACTION_ATTR_POP_VLAN,
Tao Baod7db5942015-01-28 10:07:51 -0800414 OVS_ACTION_ATTR_SAMPLE,
415 OVS_ACTION_ATTR_RECIRC,
416 OVS_ACTION_ATTR_HASH,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800417 OVS_ACTION_ATTR_PUSH_MPLS,
418 OVS_ACTION_ATTR_POP_MPLS,
419 OVS_ACTION_ATTR_SET_MASKED,
420 OVS_ACTION_ATTR_CT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800421 OVS_ACTION_ATTR_TRUNC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800422 OVS_ACTION_ATTR_PUSH_ETH,
423 OVS_ACTION_ATTR_POP_ETH,
Christopher Ferris934ec942018-01-31 15:29:16 -0800424 OVS_ACTION_ATTR_CT_CLEAR,
425 OVS_ACTION_ATTR_PUSH_NSH,
426 OVS_ACTION_ATTR_POP_NSH,
427 OVS_ACTION_ATTR_METER,
Christopher Ferris9ce28842018-10-25 12:11:39 -0700428 OVS_ACTION_ATTR_CLONE,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800429 __OVS_ACTION_ATTR_MAX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800430};
Ben Cheng655a7c02013-10-16 16:09:24 -0700431#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
Christopher Ferris934ec942018-01-31 15:29:16 -0800432#define OVS_METER_FAMILY "ovs_meter"
433#define OVS_METER_MCGROUP "ovs_meter"
434#define OVS_METER_VERSION 0x1
435enum ovs_meter_cmd {
436 OVS_METER_CMD_UNSPEC,
437 OVS_METER_CMD_FEATURES,
438 OVS_METER_CMD_SET,
439 OVS_METER_CMD_DEL,
440 OVS_METER_CMD_GET
441};
442enum ovs_meter_attr {
443 OVS_METER_ATTR_UNSPEC,
444 OVS_METER_ATTR_ID,
445 OVS_METER_ATTR_KBPS,
446 OVS_METER_ATTR_STATS,
447 OVS_METER_ATTR_BANDS,
448 OVS_METER_ATTR_USED,
449 OVS_METER_ATTR_CLEAR,
450 OVS_METER_ATTR_MAX_METERS,
451 OVS_METER_ATTR_MAX_BANDS,
452 OVS_METER_ATTR_PAD,
453 __OVS_METER_ATTR_MAX
454};
455#define OVS_METER_ATTR_MAX (__OVS_METER_ATTR_MAX - 1)
456enum ovs_band_attr {
457 OVS_BAND_ATTR_UNSPEC,
458 OVS_BAND_ATTR_TYPE,
459 OVS_BAND_ATTR_RATE,
460 OVS_BAND_ATTR_BURST,
461 OVS_BAND_ATTR_STATS,
462 __OVS_BAND_ATTR_MAX
463};
464#define OVS_BAND_ATTR_MAX (__OVS_BAND_ATTR_MAX - 1)
465enum ovs_meter_band_type {
466 OVS_METER_BAND_TYPE_UNSPEC,
467 OVS_METER_BAND_TYPE_DROP,
468 __OVS_METER_BAND_TYPE_MAX
469};
470#define OVS_METER_BAND_TYPE_MAX (__OVS_METER_BAND_TYPE_MAX - 1)
Christopher Ferris9ce28842018-10-25 12:11:39 -0700471#define OVS_CT_LIMIT_FAMILY "ovs_ct_limit"
472#define OVS_CT_LIMIT_MCGROUP "ovs_ct_limit"
473#define OVS_CT_LIMIT_VERSION 0x1
474enum ovs_ct_limit_cmd {
475 OVS_CT_LIMIT_CMD_UNSPEC,
476 OVS_CT_LIMIT_CMD_SET,
477 OVS_CT_LIMIT_CMD_DEL,
478 OVS_CT_LIMIT_CMD_GET
479};
480enum ovs_ct_limit_attr {
481 OVS_CT_LIMIT_ATTR_UNSPEC,
482 OVS_CT_LIMIT_ATTR_ZONE_LIMIT,
483 __OVS_CT_LIMIT_ATTR_MAX
484};
485#define OVS_CT_LIMIT_ATTR_MAX (__OVS_CT_LIMIT_ATTR_MAX - 1)
486#define OVS_ZONE_LIMIT_DEFAULT_ZONE - 1
487struct ovs_zone_limit {
488 int zone_id;
489 __u32 limit;
490 __u32 count;
491};
Ben Cheng655a7c02013-10-16 16:09:24 -0700492#endif