datapath: Remove implementation of port groups.
[sliver-openvswitch.git] / datapath / odp-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 ODP_COMPAT_H
10 #define ODP_COMPAT_H 1
11
12 /* 32-bit ioctl compatibility definitions for datapath protocol. */
13
14 #ifdef CONFIG_COMPAT
15 #include "openvswitch/datapath-protocol.h"
16 #include <linux/compat.h>
17
18 #define ODP_VPORT_LIST32        _IOWR('O', 10, struct compat_odp_portvec)
19 #define ODP_FLOW_GET32          _IOWR('O', 13, struct compat_odp_flow)
20 #define ODP_FLOW_PUT32          _IOWR('O', 14, struct compat_odp_flow)
21 #define ODP_FLOW_LIST32         _IOWR('O', 15, struct compat_odp_flowvec)
22 #define ODP_FLOW_DEL32          _IOWR('O', 17, struct compat_odp_flow)
23 #define ODP_EXECUTE32           _IOR('O', 18, struct compat_odp_execute)
24 #define ODP_FLOW_DEL32          _IOWR('O', 17, struct compat_odp_flow)
25 #define ODP_VPORT_ADD32         _IOR('O', 21, struct compat_odp_vport_add)
26 #define ODP_VPORT_MOD32         _IOR('O', 22, struct compat_odp_vport_mod)
27
28 struct compat_odp_portvec {
29         compat_uptr_t ports;
30         u32 n_ports;
31 };
32
33 struct compat_odp_flow {
34         struct odp_flow_stats stats;
35         struct odp_flow_key key;
36         compat_uptr_t actions;
37         u32 n_actions;
38         u32 flags;
39 };
40
41 struct compat_odp_flow_put {
42         struct compat_odp_flow flow;
43         u32 flags;
44 };
45
46 struct compat_odp_flowvec {
47         compat_uptr_t flows;
48         u32 n_flows;
49 };
50
51 struct compat_odp_execute {
52         u16 in_port;
53         u16 reserved1;
54         u32 reserved2;
55
56         compat_uptr_t actions;
57         u32 n_actions;
58
59         compat_uptr_t data;
60         u32 length;
61 };
62
63 struct compat_odp_vport_add {
64         char port_type[VPORT_TYPE_SIZE];
65         char devname[16];            /* IFNAMSIZ */
66         compat_uptr_t config;
67 };
68
69 struct compat_odp_vport_mod {
70         char devname[16];            /* IFNAMSIZ */
71         compat_uptr_t config;
72 };
73 #endif  /* CONFIG_COMPAT */
74
75 #endif  /* odp-compat.h */