My previous
72e8bf28bb38e8816435c64859fb350215b6a9e6 (datapath:
add skb mark matching and set action) commit broke 32-bit builds.
This patch assures that size of struct flow is equal on both
32-bit and 64-bit architectures so that build asserts would
not fire anymore.
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
flow_wildcards_init_exact(struct flow_wildcards *wc)
{
memset(&wc->masks, 0xff, sizeof wc->masks);
+ memset(wc->masks.zeros, 0, sizeof wc->masks.zeros);
}
/* Returns true if 'wc' matches every packet, false if 'wc' fixes any bits or
uint8_t arp_tha[6]; /* ARP/ND target hardware address. */
uint8_t nw_ttl; /* IP TTL/Hop Limit. */
uint8_t nw_frag; /* FLOW_FRAG_* flags. */
+ uint8_t zeros[4];
};
BUILD_ASSERT_DECL(sizeof(struct flow) % 4 == 0);
flows = xmalloc(N_FLOWS * sizeof *flows);
for (i = 0; i < N_FLOWS; i++) {
random_bytes(&flows[i], sizeof flows[i]);
+ memset(flows[i].zeros, 0, sizeof flows[i].zeros);
flows[i].regs[0] = OFPP_NONE;
}
struct flow flow;
random_bytes(&flow, sizeof flow);
+ memset(flow.zeros, 0, sizeof flow.zeros);
mp.max_link = n - 1;
multipath_execute(&mp, &flow);