lpm: fix sub-rule deletion
authorIntel <intel.com>
Wed, 4 Dec 2013 09:00:00 +0000 (10:00 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 15 Jan 2014 15:37:43 +0000 (16:37 +0100)
Restore group validation flag of the tbl8 entry
if sub-rule is replaced by an encompassing rule.

Signed-off-by: Intel
lib/librte_lpm/rte_lpm.c

index e385ea0..02ac91f 100644 (file)
@@ -824,6 +824,7 @@ delete_depth_big(struct rte_lpm *lpm, uint32_t ip_masked,
                struct rte_lpm_tbl8_entry new_tbl8_entry = {
                        .valid = VALID,
                        .depth = sub_rule_depth,
+                       .valid_group = lpm->tbl8[tbl8_group_start].valid_group,
                        .next_hop = lpm->rules_tbl[sub_rule_index].next_hop,
                };