Page MenuHomeFreeBSD

Bring DPDK route lookups to FreeBSD
ClosedPublic

Authored by melifaro on Nov 29 2020, 3:27 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Tue, Nov 19, 11:51 AM
Unknown Object (File)
Tue, Nov 19, 5:35 AM
Unknown Object (File)
Mon, Nov 18, 2:11 PM
Unknown Object (File)
Sat, Nov 16, 11:41 PM
Unknown Object (File)
Sat, Nov 16, 10:06 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.