tests: Fix bonding related test failures.
[sliver-openvswitch.git] / lib / flow.h
index a0dc7a1..ee460e3 100644 (file)
@@ -32,12 +32,12 @@ struct flow_wildcards;
 struct ofp_match;
 struct ofpbuf;
 
-#define FLOW_N_REGS 3
+#define FLOW_N_REGS 4
 BUILD_ASSERT_DECL(FLOW_N_REGS <= NXM_NX_MAX_REGS);
 
 struct flow {
+    ovs_be64 tun_id;            /* Encapsulating tunnel ID. */
     uint32_t regs[FLOW_N_REGS]; /* Registers. */
-    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. */
@@ -53,13 +53,13 @@ struct flow {
 
 /* Assert that there are FLOW_SIG_SIZE bytes of significant data in "struct
  * flow", followed by FLOW_PAD_SIZE bytes of padding. */
-#define FLOW_SIG_SIZE (36 + FLOW_N_REGS * 4)
+#define FLOW_SIG_SIZE (40 + FLOW_N_REGS * 4)
 #define FLOW_PAD_SIZE 0
 BUILD_ASSERT_DECL(offsetof(struct flow, nw_tos) == FLOW_SIG_SIZE - 1);
 BUILD_ASSERT_DECL(sizeof(((struct flow *)0)->nw_tos) == 1);
 BUILD_ASSERT_DECL(sizeof(struct flow) == FLOW_SIG_SIZE + FLOW_PAD_SIZE);
 
-int flow_extract(struct ofpbuf *, ovs_be32 tun_id, uint16_t in_port,
+int flow_extract(struct ofpbuf *, uint64_t tun_id, uint16_t in_port,
                  struct flow *);
 void flow_extract_stats(const struct flow *flow, struct ofpbuf *packet,
         struct odp_flow_stats *stats);
@@ -110,10 +110,9 @@ typedef unsigned int OVS_BITWISE flow_wildcards_t;
 /* No OFPFW_* bits, but they do have corresponding OVSFW_* bits. */
 #define FWW_TUN_ID      ((OVS_FORCE flow_wildcards_t) (1 << 8))
 /* No corresponding OFPFW_* or OVSFW_* bits. */
-#define FWW_VLAN_TCI    ((OVS_FORCE flow_wildcards_t) (1 << 9)
-#define FWW_ETH_MCAST   ((OVS_FORCE flow_wildcards_t) (1 << 10))
+#define FWW_ETH_MCAST   ((OVS_FORCE flow_wildcards_t) (1 << 9))
                                                        /* multicast bit only */
-#define FWW_ALL         ((OVS_FORCE flow_wildcards_t) (((1 << 11)) - 1))
+#define FWW_ALL         ((OVS_FORCE flow_wildcards_t) (((1 << 10)) - 1))
 
 /* Information on wildcards for a flow, as a supplement to "struct flow".
  *
@@ -125,6 +124,7 @@ struct flow_wildcards {
     ovs_be32 nw_src_mask;       /* 1-bit in each significant nw_src bit. */
     ovs_be32 nw_dst_mask;       /* 1-bit in each significant nw_dst bit. */
     ovs_be16 vlan_tci_mask;     /* 1-bit in each significant vlan_tci bit. */
+    uint16_t zero;              /* Padding field set to zero. */
 };
 
 void flow_wildcards_init_catchall(struct flow_wildcards *);