Page MenuHomeFreeBSD

Bring DPDK route lookups to FreeBSD
ClosedPublic

Authored by melifaro on Nov 29 2020, 3:27 PM.
Tags
None
Referenced Files
F81597967: D27412.id80864.diff
Thu, Apr 18, 5:47 PM
F81591518: D27412.diff
Thu, Apr 18, 3:20 PM
F81556614: D27412.id.diff
Thu, Apr 18, 12:45 AM
Unknown Object (File)
Wed, Apr 17, 7:45 AM
Unknown Object (File)
Tue, Apr 16, 4:20 AM
Unknown Object (File)
Fri, Apr 12, 8:34 AM
Unknown Object (File)
Wed, Apr 10, 10:10 AM
Unknown Object (File)
Mon, Apr 1, 1:14 PM

Details

Reviewers
None
Group Reviewers
network
Commits
rG537d13437314: Bring DPDK route lookups to FreeBSD.
Summary

This change introduces loadable route lookup modules based on DPDK rte_lpm lib targeted for high-speed lookups in large-scale tables.
It is based on the lookup framework described in D27401.

IPv4 module is called dpdk_lpm4. It wraps around rte_lpm, which implement variation of DIR24-8 lookup algorithm. Module provide lockless route lookups and in-place incremental updates, allowing for good RIB performance.

IPv6 module is called dpdk_lpm6. It wraps around rte_lpm6.
Implementation can be seen as multi-bit trie where the stride or number of bits inspected on each level varies from level to level.... It can vary from 1 to 14 memory accesses, with 5 being the average value for the lengths that are most commonly used in IPv6.. Module provide lockless route lookups for global unicast addresses and in-place incremental updates, allowing for good RIB performance.

Implementation details:

  • wrapper code lives in sys/contrib/dpdk_rte_lpm/dpdk_lpm[6].c.
  • rte_lpm[6] implementation contains both RIB ("rule_" code, backed by array of hash tables) and fib code. RIB code part has been commented out, as base radix already provides all the necessary primitives.
  • link-local lookups are currently implemented as base radix lookup. This part should be converted to something like read-only radix trie.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35106
Build 32071: arc lint + arc unit

Event Timeline

melifaro edited the test plan for this revision. (Show Details)
melifaro added a reviewer: network.
melifaro edited the test plan for this revision. (Show Details)

Fix lpm4 code.

  • Update lpm6 code to avoid direct rte access.
  • Improve lpm6 logging
  • Fix lpm6 ll refcounting
  • rebase to latest HEAD

Update to the lastest version of the framework.
Improve error reporting.

Benches on multiples hardwares (click their links for full data and flame-graphs):

Update to the latest framework version.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 9 2021, 12:52 PM
This revision was automatically updated to reflect the committed changes.