openvswitch.h revision d7db594b8d1dab36b711bd887a9dd21675c87243
1/****************************************************************************
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>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct ovs_header {
25  int dp_ifindex;
26};
27#define OVS_DATAPATH_FAMILY "ovs_datapath"
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define OVS_DATAPATH_MCGROUP "ovs_datapath"
30#define OVS_DATAPATH_VERSION 2
31#define OVS_DP_VER_FEATURES 2
32enum ovs_datapath_cmd {
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  OVS_DP_CMD_UNSPEC,
35  OVS_DP_CMD_NEW,
36  OVS_DP_CMD_DEL,
37  OVS_DP_CMD_GET,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  OVS_DP_CMD_SET
40};
41enum ovs_datapath_attr {
42  OVS_DP_ATTR_UNSPEC,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  OVS_DP_ATTR_NAME,
45  OVS_DP_ATTR_UPCALL_PID,
46  OVS_DP_ATTR_STATS,
47  OVS_DP_ATTR_MEGAFLOW_STATS,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  OVS_DP_ATTR_USER_FEATURES,
50  __OVS_DP_ATTR_MAX
51};
52#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct ovs_dp_stats {
55  __u64 n_hit;
56  __u64 n_missed;
57  __u64 n_lost;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  __u64 n_flows;
60};
61struct ovs_dp_megaflow_stats {
62  __u64 n_mask_hit;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  __u32 n_masks;
65  __u32 pad0;
66  __u64 pad1;
67  __u64 pad2;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70struct ovs_vport_stats {
71  __u64 rx_packets;
72  __u64 tx_packets;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  __u64 rx_bytes;
75  __u64 tx_bytes;
76  __u64 rx_errors;
77  __u64 tx_errors;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  __u64 rx_dropped;
80  __u64 tx_dropped;
81};
82#define OVS_DP_F_UNALIGNED (1 << 0)
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define OVS_DP_F_VPORT_PIDS (1 << 1)
85#define OVSP_LOCAL ((__u32) 0)
86#define OVS_PACKET_FAMILY "ovs_packet"
87#define OVS_PACKET_VERSION 0x1
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89enum ovs_packet_cmd {
90  OVS_PACKET_CMD_UNSPEC,
91  OVS_PACKET_CMD_MISS,
92  OVS_PACKET_CMD_ACTION,
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  OVS_PACKET_CMD_EXECUTE
95};
96enum ovs_packet_attr {
97  OVS_PACKET_ATTR_UNSPEC,
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  OVS_PACKET_ATTR_PACKET,
100  OVS_PACKET_ATTR_KEY,
101  OVS_PACKET_ATTR_ACTIONS,
102  OVS_PACKET_ATTR_USERDATA,
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  __OVS_PACKET_ATTR_MAX
105};
106#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
107#define OVS_VPORT_FAMILY "ovs_vport"
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define OVS_VPORT_MCGROUP "ovs_vport"
110#define OVS_VPORT_VERSION 0x1
111enum ovs_vport_cmd {
112  OVS_VPORT_CMD_UNSPEC,
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  OVS_VPORT_CMD_NEW,
115  OVS_VPORT_CMD_DEL,
116  OVS_VPORT_CMD_GET,
117  OVS_VPORT_CMD_SET
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119};
120enum ovs_vport_type {
121  OVS_VPORT_TYPE_UNSPEC,
122  OVS_VPORT_TYPE_NETDEV,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  OVS_VPORT_TYPE_INTERNAL,
125  OVS_VPORT_TYPE_GRE,
126  OVS_VPORT_TYPE_VXLAN,
127  OVS_VPORT_TYPE_GENEVE,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  __OVS_VPORT_TYPE_MAX
130};
131#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
132enum ovs_vport_attr {
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  OVS_VPORT_ATTR_UNSPEC,
135  OVS_VPORT_ATTR_PORT_NO,
136  OVS_VPORT_ATTR_TYPE,
137  OVS_VPORT_ATTR_NAME,
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  OVS_VPORT_ATTR_OPTIONS,
140  OVS_VPORT_ATTR_UPCALL_PID,
141  OVS_VPORT_ATTR_STATS,
142  __OVS_VPORT_ATTR_MAX
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144};
145#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
146enum {
147  OVS_TUNNEL_ATTR_UNSPEC,
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  OVS_TUNNEL_ATTR_DST_PORT,
150  __OVS_TUNNEL_ATTR_MAX
151};
152#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154#define OVS_FLOW_FAMILY "ovs_flow"
155#define OVS_FLOW_MCGROUP "ovs_flow"
156#define OVS_FLOW_VERSION 0x1
157enum ovs_flow_cmd {
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  OVS_FLOW_CMD_UNSPEC,
160  OVS_FLOW_CMD_NEW,
161  OVS_FLOW_CMD_DEL,
162  OVS_FLOW_CMD_GET,
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  OVS_FLOW_CMD_SET
165};
166struct ovs_flow_stats {
167  __u64 n_packets;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  __u64 n_bytes;
170};
171enum ovs_key_attr {
172  OVS_KEY_ATTR_UNSPEC,
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  OVS_KEY_ATTR_ENCAP,
175  OVS_KEY_ATTR_PRIORITY,
176  OVS_KEY_ATTR_IN_PORT,
177  OVS_KEY_ATTR_ETHERNET,
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  OVS_KEY_ATTR_VLAN,
180  OVS_KEY_ATTR_ETHERTYPE,
181  OVS_KEY_ATTR_IPV4,
182  OVS_KEY_ATTR_IPV6,
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  OVS_KEY_ATTR_TCP,
185  OVS_KEY_ATTR_UDP,
186  OVS_KEY_ATTR_ICMP,
187  OVS_KEY_ATTR_ICMPV6,
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  OVS_KEY_ATTR_ARP,
190  OVS_KEY_ATTR_ND,
191  OVS_KEY_ATTR_SKB_MARK,
192  OVS_KEY_ATTR_TUNNEL,
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  OVS_KEY_ATTR_SCTP,
195  OVS_KEY_ATTR_TCP_FLAGS,
196  OVS_KEY_ATTR_DP_HASH,
197  OVS_KEY_ATTR_RECIRC_ID,
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  __OVS_KEY_ATTR_MAX
200};
201#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
202enum ovs_tunnel_key_attr {
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  OVS_TUNNEL_KEY_ATTR_ID,
205  OVS_TUNNEL_KEY_ATTR_IPV4_SRC,
206  OVS_TUNNEL_KEY_ATTR_IPV4_DST,
207  OVS_TUNNEL_KEY_ATTR_TOS,
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209  OVS_TUNNEL_KEY_ATTR_TTL,
210  OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,
211  OVS_TUNNEL_KEY_ATTR_CSUM,
212  OVS_TUNNEL_KEY_ATTR_OAM,
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214  OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS,
215  __OVS_TUNNEL_KEY_ATTR_MAX
216};
217#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219enum ovs_frag_type {
220  OVS_FRAG_TYPE_NONE,
221  OVS_FRAG_TYPE_FIRST,
222  OVS_FRAG_TYPE_LATER,
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  __OVS_FRAG_TYPE_MAX
225};
226#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
227struct ovs_key_ethernet {
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  __u8 eth_src[ETH_ALEN];
230  __u8 eth_dst[ETH_ALEN];
231};
232struct ovs_key_ipv4 {
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234  __be32 ipv4_src;
235  __be32 ipv4_dst;
236  __u8 ipv4_proto;
237  __u8 ipv4_tos;
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239  __u8 ipv4_ttl;
240  __u8 ipv4_frag;
241};
242struct ovs_key_ipv6 {
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  __be32 ipv6_src[4];
245  __be32 ipv6_dst[4];
246  __be32 ipv6_label;
247  __u8 ipv6_proto;
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249  __u8 ipv6_tclass;
250  __u8 ipv6_hlimit;
251  __u8 ipv6_frag;
252};
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254struct ovs_key_tcp {
255  __be16 tcp_src;
256  __be16 tcp_dst;
257};
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259struct ovs_key_udp {
260  __be16 udp_src;
261  __be16 udp_dst;
262};
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264struct ovs_key_sctp {
265  __be16 sctp_src;
266  __be16 sctp_dst;
267};
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269struct ovs_key_icmp {
270  __u8 icmp_type;
271  __u8 icmp_code;
272};
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274struct ovs_key_icmpv6 {
275  __u8 icmpv6_type;
276  __u8 icmpv6_code;
277};
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279struct ovs_key_arp {
280  __be32 arp_sip;
281  __be32 arp_tip;
282  __be16 arp_op;
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284  __u8 arp_sha[ETH_ALEN];
285  __u8 arp_tha[ETH_ALEN];
286};
287struct ovs_key_nd {
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289  __u32 nd_target[4];
290  __u8 nd_sll[ETH_ALEN];
291  __u8 nd_tll[ETH_ALEN];
292};
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294enum ovs_flow_attr {
295  OVS_FLOW_ATTR_UNSPEC,
296  OVS_FLOW_ATTR_KEY,
297  OVS_FLOW_ATTR_ACTIONS,
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299  OVS_FLOW_ATTR_STATS,
300  OVS_FLOW_ATTR_TCP_FLAGS,
301  OVS_FLOW_ATTR_USED,
302  OVS_FLOW_ATTR_CLEAR,
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304  OVS_FLOW_ATTR_MASK,
305  __OVS_FLOW_ATTR_MAX
306};
307#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309enum ovs_sample_attr {
310  OVS_SAMPLE_ATTR_UNSPEC,
311  OVS_SAMPLE_ATTR_PROBABILITY,
312  OVS_SAMPLE_ATTR_ACTIONS,
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314  __OVS_SAMPLE_ATTR_MAX,
315};
316#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
317enum ovs_userspace_attr {
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319  OVS_USERSPACE_ATTR_UNSPEC,
320  OVS_USERSPACE_ATTR_PID,
321  OVS_USERSPACE_ATTR_USERDATA,
322  __OVS_USERSPACE_ATTR_MAX
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324};
325#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
326struct ovs_action_push_vlan {
327  __be16 vlan_tpid;
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329  __be16 vlan_tci;
330};
331enum ovs_hash_alg {
332  OVS_HASH_ALG_L4,
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334};
335struct ovs_action_hash {
336  uint32_t hash_alg;
337  uint32_t hash_basis;
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339};
340enum ovs_action_attr {
341  OVS_ACTION_ATTR_UNSPEC,
342  OVS_ACTION_ATTR_OUTPUT,
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344  OVS_ACTION_ATTR_USERSPACE,
345  OVS_ACTION_ATTR_SET,
346  OVS_ACTION_ATTR_PUSH_VLAN,
347  OVS_ACTION_ATTR_POP_VLAN,
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349  OVS_ACTION_ATTR_SAMPLE,
350  OVS_ACTION_ATTR_RECIRC,
351  OVS_ACTION_ATTR_HASH,
352  __OVS_ACTION_ATTR_MAX
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354};
355#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
356#endif
357