Page MenuHomeFreeBSD

Use new FIB4 KPI in ip_tryforward()
ClosedPublic

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

Details

Summary

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ae updated this revision to Diff 22212.Nov 15 2016, 9:21 AM
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.
olivier accepted this revision.EditedNov 16 2016, 6:39 AM
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
ae added a reviewer: network.Nov 16 2016, 10:04 AM
This revision was automatically updated to reflect the committed changes.