lpm: fix freeing unused sub-table on rule delete
authorWei Dai <wei.dai@intel.com>
Mon, 8 Aug 2016 06:39:51 +0000 (14:39 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 13 Oct 2016 20:13:19 +0000 (22:13 +0200)
commit69ed52dddc0fc64f5cec7e7384197874f92ff393
treed8d0f19cc1abbde6a0e5f42d3f35655bc3690323
parent844bd77c03b7b00aef8d9672157723f8f6d8c16d
lpm: fix freeing unused sub-table on rule delete

When all rules with depth > 24 are deleted in a same sub-table
(tlb8 group) and only a rule with depth <=24 is left in it,
this sub-table (tlb8 group) should be recycled.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_lpm/rte_lpm.c