Comment 51 for bug 1781402

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/45602
Committed: http://github.com/Juniper/contrail-vrouter/commit/2d7661a949ad209fc80eb6d658482759f8f44752
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 2d7661a949ad209fc80eb6d658482759f8f44752
Author: matan <email address hidden>
Date: Wed Jul 4 04:34:19 2018 +0000

btable: optimize entry address calculation

The btable uses division and modulo calculations, which are quiet
expensive in the most platforms, for the entry address calculations.

In case the allocation limit of a btable is power of 2 number,
the calculations can be optimized to use simple bit calculations.

Optimize the entry address calculations in the aforementioned case.

Partial-Bug: #1781402
Change-Id: Idfc56e14a6d499d23a306866cfa463f95eee1151
Signed-off-by: Matan Azrad <email address hidden>