Page MenuHomeFreeBSD

Bring DPDK route lookups to FreeBSD
ClosedPublic

Authored by melifaro on Nov 29 2020, 3:27 PM.
Tags
None
Referenced Files
F80158493: D27412.id80863.diff
Thu, Mar 28, 5:01 PM
F80138810: D27412.id81026.diff
Thu, Mar 28, 11:18 AM
Unknown Object (File)
Fri, Mar 15, 3:22 PM
Unknown Object (File)
Fri, Mar 15, 2:12 AM
Unknown Object (File)
Sun, Mar 10, 3:06 PM
Unknown Object (File)
Feb 11 2024, 1:58 PM
Unknown Object (File)
Feb 8 2024, 7:41 PM
Unknown Object (File)
Feb 8 2024, 7:37 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
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.