bug in LPM handling (16.04+)
Hi,
While testing the LPM implementation of DPDK (16.04+), I found that in some cases prefixes are not added correctly to the table. This problem seems to be caused by incorrect casts. See attached patch.
L
rte_lpm.c renamed from rte_lpm.c~3 +2 -2
@@ -1034,7 +1034,7 @@*/ struct rte_lpm_tbl_entry new_tbl24_entry = { - .group_idx = (uint8_t )tbl8_group_index, + .group_idx = tbl8_group_index, .valid =VALID , .valid_group =1 , .depth =0 ,
@@ -1080,7 +1080,7 @@*/ struct rte_lpm_tbl_entry new_tbl24_entry = { - .group_idx = (uint8_t )tbl8_group_index, + .group_idx = tbl8_group_index, .valid =VALID , .valid_group =1 , .depth =0 ,
Quoted 13 lines · László Molnár
rte_lpm.c renamed from rte_lpm.c~3 +1
-1@@ -1034,7 +1034,7 @@*/ struct rte_lpm_tbl_entry new_tbl24_entry = { - .group_idx = (uint8_t )tbl8_group_index, + .group_idx = tbl8_group_index, .valid =VALID , .valid_group =1 , .depth =0 ,
rte_lpm.c line 1086
Quoted 8 lines
rte_lpm.c renamed from rte_lpm.c~3 +1
-1@@ -1080,7 +1080,7 @@*/ struct rte_lpm_tbl_entry new_tbl24_entry = { - .group_idx = (uint8_t )tbl8_group_index, + .group_idx = tbl8_group_index, .valid =VALID , .valid_group =1 , .depth =0 ,
Hi,
this fix looks reasonable. Can you perhaps resend as a proper patch with signoff, as described in contributors guide doc? See:
http://dpdk.org/doc/guides/contributing/patches.html#make-your-changes
Thanks,
/Bruce