Skip to contentSkip to conversation

rte_lpm6: fix incorrect size of tbl8 group

PATCH Andrzej Ostruszka [C] 1 participant 1 message Apr 16, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andrzej Ostruszka [C]

author Acked-by
#1 lore raw
Quoted 12 lines · Alex Kiselev

rte_lpm6: fix incorrect size of tbl8 group

---
 lib/librte_lpm/rte_lpm6.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_lpm/rte_lpm6.c +0 -0
index 1047efa8a..f5979fb15 100644

lib/librte_lpm/rte_lpm6.c add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl, · line 730

Quoted 6 lines
lib/librte_lpm/rte_lpm6.c +2 -1
@@ -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));