Page MenuHomeFreeBSD

Bring DPDK route lookups to FreeBSD
ClosedPublic

Authored by melifaro on Nov 29 2020, 3:27 PM.
Tags
None
Referenced Files
F103405282: D27412.id80866.diff
Sun, Nov 24, 2:25 PM
Unknown Object (File)
Sun, Nov 24, 1:51 AM
Unknown Object (File)
Sat, Nov 23, 4:34 AM
Unknown Object (File)
Fri, Nov 22, 2:40 PM
Unknown Object (File)
Fri, Nov 22, 10:57 AM
Unknown Object (File)
Tue, Nov 19, 6:37 PM
Unknown Object (File)
Tue, Nov 19, 6:24 PM
Unknown Object (File)
Tue, Nov 19, 5:26 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 35498
Build 32403: 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.