datapath: Make it possible to query vports by name regardless of datapath.
[openvswitch] / datapath / odp-compat.h
index b03539aa790e0469f2379b92632dc8af8aa8755b..eca6d8b321c2640bae2a1680e285ec740c208acc 100644 (file)
 #include "openvswitch/datapath-protocol.h"
 #include <linux/compat.h>
 
-#define ODP_VPORT_LIST32       _IOWR('O', 10, struct compat_odp_portvec)
+#define ODP_VPORT_DUMP32       _IOWR('O', 10, struct compat_odp_vport_dump)
 #define ODP_FLOW_GET32         _IOWR('O', 13, struct compat_odp_flowvec)
 #define ODP_FLOW_PUT32         _IOWR('O', 14, struct compat_odp_flow)
-#define ODP_FLOW_LIST32                _IOWR('O', 15, struct compat_odp_flowvec)
+#define ODP_FLOW_DUMP32                _IOWR('O', 15, struct compat_odp_flow_dump)
 #define ODP_FLOW_DEL32         _IOWR('O', 17, struct compat_odp_flow)
 #define ODP_EXECUTE32          _IOR('O', 18, struct compat_odp_execute)
 #define ODP_FLOW_DEL32         _IOWR('O', 17, struct compat_odp_flow)
 
-struct compat_odp_portvec {
-       compat_uptr_t ports;
-       u32 n_ports;
+struct compat_odp_vport_dump {
+       compat_uptr_t port;
+       u32 port_no;
 };
 
 struct compat_odp_flow {
        struct odp_flow_stats stats;
-       struct odp_flow_key key;
+       compat_uptr_t key;
+       u32 key_len;
        compat_uptr_t actions;
        u32 actions_len;
        u32 flags;
@@ -41,6 +42,11 @@ struct compat_odp_flow_put {
        u32 flags;
 };
 
+struct compat_odp_flow_dump {
+       compat_uptr_t flow;
+       uint32_t state[2];
+};
+
 struct compat_odp_flowvec {
        compat_uptr_t flows;
        u32 n_flows;