From: Alex Kiselev Date: Wed, 8 Apr 2020 13:07:30 +0000 (+0200) Subject: lpm6: fix size of tbl8 group X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=64c46bacf48550f09ef758a15cee9d3b6f443f59;p=dpdk.git lpm6: fix size of tbl8 group Fixes: e480688dce6d ("lpm6: add incremental update on delete") Cc: stable@dpdk.org Signed-off-by: Alex Kiselev Acked-by: Andrzej Ostruszka Acked-by: Bruce Richardson --- diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c index 1047efa8a5..f5979fb159 100644 --- a/lib/librte_lpm/rte_lpm6.c +++ b/lib/librte_lpm/rte_lpm6.c @@ -726,7 +726,8 @@ add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl, tbl8_group_start = tbl8_gindex * RTE_LPM6_TBL8_GROUP_NUM_ENTRIES; memset(&lpm->tbl8[tbl8_group_start], 0, - RTE_LPM6_TBL8_GROUP_NUM_ENTRIES); + RTE_LPM6_TBL8_GROUP_NUM_ENTRIES * + sizeof(struct rte_lpm6_tbl_entry)); /* init the new table's header: * save the reference to the owner table