@@ -1490,11 +1490,11 @@ insert_subtable(struct classifier *cls, const struct minimask *mask)
/* Map for the final stage. */
*CONST_CAST(struct flowmap *, &subtable->index_maps[index])
= miniflow_get_map_in_range(&mask->masks, prev, FLOW_U64S);
- /* Check if the final stage adds any bits,
- * and remove the last index if it doesn't. */
+ /* Check if the final stage adds any bits. */
if (index > 0) {
- if (flowmap_equal(subtable->index_maps[index],
- subtable->index_maps[index - 1])) {
+ if (flowmap_is_empty(subtable->index_maps[index])) {
+ /* Remove the last index, as it has the same fields as the rules
+ * map. */
--index;
cmap_destroy(&subtable->indices[index]);
}
The test for figuring out if the last index had the same fields as the actual rules map as broken, resulting into keeping an unnecessary index around. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> --- lib/classifier.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)