Page MenuHomeFreeBSD

Use new FIB4 KPI in ip_tryforward()

Authored by ae on Nov 15 2016, 9:21 AM.



ip_tryforward() is used in run to completion forwarding scenario. Current rtalloc API has serious problem on system with many CPU cores and, especially, when network cards has many concurrent working queues. Lock contention on the rtentry's mutex kills the performance.
This patch changes ip_tryforward() to use new FIB4 KPI. The main benefit this KPI gets from holding all needed information in the on-stack allocated structure, so there is no need to hold rtentry mutex, thus there is no lock contention.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ae retitled this revision from to Use new FIB4 KPI in ip_tryforward().
ae updated this object.
ae edited the test plan for this revision. (Show Details)
ae added reviewers: melifaro, olivier.
ae set the repository for this revision to rS FreeBSD src repository - subversion.
olivier edited edge metadata.

I can't understand the code, but regarding only the performance benefit it's great :-)

Improvement on a 8 cores Intel Xeon with Chelsio, full details:

Improvement on a 4cores Atom, full detail :

Improvement on a 8 cores Atom with Chelsio, full details:

This revision is now accepted and ready to land.Nov 16 2016, 6:39 AM
This revision was automatically updated to reflect the committed changes.