Before this commit, the compiler would add two bytes of padding to
the 'flow_wildcards' structure to achieve 32bit alignment. These
two bytes had inconsistent values which caused 'flow_wildcards_hash'
to behave inconsistently. This commit explicitly 32bit aligns
'flow_wildcards' with zero padding.
This commit also fixes an issue where in-band rules were not
getting deleted when in-band control was disabled.
wc->nw_dst_mask = htonl(0);
memset(wc->reg_masks, 0, sizeof wc->reg_masks);
wc->vlan_tci_mask = htons(0);
+ wc->zero = 0;
}
/* Initializes 'wc' as an exact-match set of wildcards; that is, 'wc' does not
wc->nw_dst_mask = htonl(UINT32_MAX);
memset(wc->reg_masks, 0xff, sizeof wc->reg_masks);
wc->vlan_tci_mask = htons(UINT16_MAX);
+ wc->zero = 0;
}
/* Returns true if 'wc' is exact-match, false if 'wc' wildcards any bits or
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 *);