Re: rte_lpm with larger nexthops or another method?
From: Matthew Hall <hidden>
Date: 2015-06-24 04:31:36
On Tue, Jun 23, 2015 at 09:13:14PM -0700, Matthew Hall wrote:
Vladimir, One thing I was confused, you published the changes to rte_lpm_tbl24_entry but you didn't say what you did to change rte_lpm_tbl8_entry, as that one only had an 8-bit next_hop as well. I wanted to be sure I didn't change it wrong and break something. Hopefully Stephen can make his bug fixes available so I could add all of this together and try to make a patchset for dpdk-next to test it all out. Would be a huge win compared to all the crappy LPM code I found on the Internet. Matthew.
Another thing, this part errors out now. Not sure if it's just a performance warning or if it will break the code when I just comment it out... ;)
RTE_BUILD_BUG_ON(sizeof(struct rte_lpm_tbl24_entry) != 2);
RTE_BUILD_BUG_ON(sizeof(struct rte_lpm_tbl8_entry) != 2);
/vagrant/external/dpdk/lib/librte_lpm/rte_lpm.c:162:2: error: array size is negative
RTE_BUILD_BUG_ON(sizeof(struct rte_lpm_tbl24_entry) != 2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vagrant/external/dpdk/build/include/rte_common.h:178:21: note: expanded from macro
'RTE_BUILD_BUG_ON'
((void)sizeof(char[1 - 2*!!(condition)])); \
^~~~~~~~~~~~~~~~~~~
/vagrant/external/dpdk/lib/librte_lpm/rte_lpm.c:163:2: error: array size is negative
RTE_BUILD_BUG_ON(sizeof(struct rte_lpm_tbl8_entry) != 2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vagrant/external/dpdk/build/include/rte_common.h:178:21: note: expanded from macro
'RTE_BUILD_BUG_ON'
((void)sizeof(char[1 - 2*!!(condition)])); \
^~~~~~~~~~~~~~~~~~~
Matthew.