Page MenuHomeFreeBSD

Bring DPDK route lookups to FreeBSD
ClosedPublic

Authored by melifaro on Nov 29 2020, 3:27 PM.
Tags
None
Referenced Files
F81640579: D27412.id80862.diff
Fri, Apr 19, 8:57 AM
F81640574: D27412.id80866.diff
Fri, Apr 19, 8:57 AM
F81640573: D27412.id80863.diff
Fri, Apr 19, 8:56 AM
F81640569: D27412.id80864.diff
Fri, Apr 19, 8:56 AM
F81640523: D27412.id.diff
Fri, Apr 19, 8:56 AM
F81640517: D27412.id80679.diff
Fri, Apr 19, 8:55 AM
F81640515: D27412.id81948.diff
Fri, Apr 19, 8:55 AM
F81640511: D27412.id81026.diff
Fri, Apr 19, 8:55 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35494
Build 32399: 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.