lpm_autotest crashing with dpdk 2.2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpdk (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
From my patch to dpdk-dev:
Back then when we fixed the missing free lpm I was to quickly to say yes
if it applies not only to the lpm6 but also to all of the lpm code.
It turned out to not apply to all of them. In rte_lpm_create_v20 there
is an unexpected fused allocation:
mem_size = sizeof(*lpm) + (sizeof(
[...]
lpm = (struct rte_lpm_v20 *)rte_zmalloc_
That causes lpm->rules_tbl not to have an own struct malloc_elem that
can be derived via RTE_PTR_SUB(data, MALLOC_
malloc_
Due to that the rte_lpm_free_v20 accidentially misderives the elem and
assumes it is ELEM_FREE triggering in malloc_elem_free
if (!malloc_
return -1;
While it seems counter-intuitive the way to properly remove rules_tbl in
the old fused allocation style of rte_lpm_free_v20 is to not remove it.
The newer rte_lpm_free_v1604 is safe because in rte_lpm_
rules_tbl is a separate allocation.
Fixes: d4c18f0a1d5d ("lpm: fix missing free")
Signed-off-by: Christian Ehrhardt <email address hidden>
---
lib/librte_
1 file changed, 1 deletion(-)
See progress/review at:
http://
lpm is unusable without that fix - so prio high.