- uint64_t used_sec; /* Time last used. */
- uint32_t used_nsec;
- uint8_t tcp_flags;
- uint8_t ip_tos;
- uint16_t error; /* Used by ODP_FLOW_GET. */
-};
-
-struct odp_flow_key {
- ovs_be32 tun_id; /* Encapsulating tunnel ID. */
- ovs_be32 nw_src; /* IP source address. */
- ovs_be32 nw_dst; /* IP destination address. */
- uint16_t in_port; /* Input switch port. */
- ovs_be16 dl_vlan; /* Input VLAN. */
- ovs_be16 dl_type; /* Ethernet frame type. */
- ovs_be16 tp_src; /* TCP/UDP source port. */
- ovs_be16 tp_dst; /* TCP/UDP destination port. */
- uint8_t dl_src[6]; /* Ethernet source address. */
- uint8_t dl_dst[6]; /* Ethernet destination address. */
- uint8_t nw_proto; /* IP protocol or lower 8 bits of
- ARP opcode. */
- uint8_t dl_vlan_pcp; /* Input VLAN priority. */
- uint8_t nw_tos; /* IP ToS (DSCP field, 6 bits). */
- uint8_t reserved[3]; /* Align to 32-bits...must be zeroed. */
-};
-
-/* Flags for ODP_FLOW. */
-#define ODPFF_ZERO_TCP_FLAGS (1 << 0) /* Zero the TCP flags. */
-
-struct odp_flow {
- struct odp_flow_stats stats;
- struct odp_flow_key key;
- union odp_action *actions;
- uint32_t n_actions;
- uint32_t flags;
-};
-
-/* Flags for ODP_FLOW_PUT. */
-#define ODPPF_CREATE (1 << 0) /* Allow creating a new flow. */
-#define ODPPF_MODIFY (1 << 1) /* Allow modifying an existing flow. */
-#define ODPPF_ZERO_STATS (1 << 2) /* Zero the stats of an existing flow. */
-
-/* ODP_FLOW_PUT argument. */
-struct odp_flow_put {
- struct odp_flow flow;
- uint32_t flags;
-};
-
-struct odp_flowvec {
- struct odp_flow *flows;
- uint32_t n_flows;
-};
-
-/* The VLAN id is 12 bits, so we can use the entire 16 bits to indicate
- * special conditions. All ones is used to match that no VLAN id was
- * set. */
-#define ODP_VLAN_NONE 0xffff
-
-/* Action types. */
-#define ODPAT_OUTPUT 0 /* Output to switch port. */
-#define ODPAT_OUTPUT_GROUP 1 /* Output to all ports in group. */
-#define ODPAT_CONTROLLER 2 /* Send copy to controller. */
-#define ODPAT_SET_VLAN_VID 3 /* Set the 802.1q VLAN id. */
-#define ODPAT_SET_VLAN_PCP 4 /* Set the 802.1q priority. */
-#define ODPAT_STRIP_VLAN 5 /* Strip the 802.1q header. */
-#define ODPAT_SET_DL_SRC 6 /* Ethernet source address. */
-#define ODPAT_SET_DL_DST 7 /* Ethernet destination address. */
-#define ODPAT_SET_NW_SRC 8 /* IP source address. */
-#define ODPAT_SET_NW_DST 9 /* IP destination address. */
-#define ODPAT_SET_NW_TOS 10 /* IP ToS/DSCP field (6 bits). */
-#define ODPAT_SET_TP_SRC 11 /* TCP/UDP source port. */
-#define ODPAT_SET_TP_DST 12 /* TCP/UDP destination port. */
-#define ODPAT_SET_TUNNEL 13 /* Set the encapsulating tunnel ID. */
-#define ODPAT_N_ACTIONS 14
-
-struct odp_action_output {
- uint16_t type; /* ODPAT_OUTPUT. */
- uint16_t port; /* Output port. */
- uint16_t reserved1;
- uint16_t reserved2;
-};
-
-struct odp_action_output_group {
- uint16_t type; /* ODPAT_OUTPUT_GROUP. */
- uint16_t group; /* Group number. */
- uint16_t reserved1;
- uint16_t reserved2;
-};
-
-struct odp_action_controller {
- uint16_t type; /* ODPAT_OUTPUT_CONTROLLER. */
- uint16_t reserved;
- uint32_t arg; /* Copied to struct odp_msg 'arg' member. */
-};
-
-struct odp_action_tunnel {
- uint16_t type; /* ODPAT_SET_TUNNEL. */
- uint16_t reserved;
- ovs_be32 tun_id; /* Tunnel ID. */
-};
-
-/* Action structure for ODPAT_SET_VLAN_VID. */
-struct odp_action_vlan_vid {
- uint16_t type; /* ODPAT_SET_VLAN_VID. */
- ovs_be16 vlan_vid; /* VLAN id. */
- uint16_t reserved1;
- uint16_t reserved2;