From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Sacha Subject: rte_lpm_add in librte_lpm Date: Fri, 5 Sep 2014 17:14:50 -0700 Message-ID: <540A51FA.3070905@alcatel-lucent.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit To: Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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