wdp-xflow: Remove wx structure from global list when closing.
[sliver-openvswitch.git] / datapath / xflow-compat.h
1 /*
2  * Copyright (c) 2010 Nicira Networks.
3  * Distributed under the terms of the GNU GPL version 2.
4  *
5  * Significant portions of this file may be copied from parts of the Linux
6  * kernel, by Linus Torvalds and others.
7  */
8
9 #ifndef XFLOW_COMPAT_H
10 #define XFLOW_COMPAT_H 1
11
12 /* 32-bit ioctl compatibility definitions for datapath protocol. */
13
14 #include "openvswitch/xflow.h"
15
16 #ifdef CONFIG_COMPAT
17 #include <linux/compat.h>
18
19 #define XFLOW_PORT_LIST32               _IOWR('O', 10, struct compat_xflow_portvec)
20 #define XFLOW_PORT_GROUP_SET32  _IOR('O', 11, struct compat_xflow_port_group)
21 #define XFLOW_PORT_GROUP_GET32  _IOWR('O', 12, struct compat_xflow_port_group)
22 #define XFLOW_FLOW_GET32                _IOWR('O', 13, struct compat_xflow_flow)
23 #define XFLOW_FLOW_PUT32                _IOWR('O', 14, struct compat_xflow_flow)
24 #define XFLOW_FLOW_LIST32               _IOWR('O', 15, struct compat_xflow_flowvec)
25 #define XFLOW_FLOW_DEL32                _IOWR('O', 17, struct compat_xflow_flow)
26 #define XFLOW_EXECUTE32         _IOR('O', 18, struct compat_xflow_execute)
27 #define XFLOW_FLOW_DEL32                _IOWR('O', 17, struct compat_xflow_flow)
28 #define XFLOW_VPORT_ADD32               _IOR('O', 21, struct compat_xflow_vport_add)
29 #define XFLOW_VPORT_MOD32               _IOR('O', 22, struct compat_xflow_vport_mod)
30
31 struct compat_xflow_portvec {
32         compat_uptr_t ports;
33         u32 n_ports;
34 };
35
36 struct compat_xflow_port_group {
37         compat_uptr_t ports;
38         u16 n_ports;            /* Number of ports. */
39         u16 group;              /* Group number. */
40 };
41
42 struct compat_xflow_flow {
43         struct xflow_flow_stats stats;
44         struct xflow_key key;
45         compat_uptr_t actions;
46         u32 n_actions;
47         u32 flags;
48 };
49
50 struct compat_xflow_flow_put {
51         struct compat_xflow_flow flow;
52         u32 flags;
53 };
54
55 struct compat_xflow_flowvec {
56         compat_uptr_t flows;
57         u32 n_flows;
58 };
59
60 struct compat_xflow_execute {
61         u16 in_port;
62         u16 reserved1;
63         u32 reserved2;
64
65         compat_uptr_t actions;
66         u32 n_actions;
67
68         compat_uptr_t data;
69         u32 length;
70 };
71
72 struct compat_xflow_vport_add {
73         char port_type[VPORT_TYPE_SIZE];
74         char devname[16];            /* IFNAMSIZ */
75         compat_uptr_t config;
76 };
77
78 struct compat_xflow_vport_mod {
79         char devname[16];            /* IFNAMSIZ */
80         compat_uptr_t config;
81 };
82 #endif  /* CONFIG_COMPAT */
83
84 #endif  /* xflow-compat.h */