[dpdk-dev] rte_lpm_add in librte_lpm

Jan Sacha Jan.Sacha at alcatel-lucent.com
Sat Sep 6 02:14:50 CEST 2014


Hi,

I've been playing with DPDK and I got some crashes in the LPM module. As 
far as I know, this problem has not been reported yet. These crashes 
happened in DPDK 1.7.0 and 1.6.0r2 (I didn't check other versions) when 
I added new LPM routes.

In the lib/librte_lpm/rte_lpm.c file, line 399 (add_depth_small 
function), there is the following condition:

if (!lpm->tbl24[i].valid || (lpm->tbl24[i].ext_entry == 0 && 
lpm->tbl24[i].depth <= depth))

If the new route has a lower depth than an existing non-extended entry, 
this condition is not met. We then skip to line 418, where we assume the 
entry is extended and use an uninitialized index. Is this a bug?

Thanks,
Jan



More information about the dev mailing list