Skip to content

Tlb8 shared resizeable#581

Draft
maxime-leroy wants to merge 3 commits intoDPDK:mainfrom
maxime-leroy:tlb8_shared_resizeable
Draft

Tlb8 shared resizeable#581
maxime-leroy wants to merge 3 commits intoDPDK:mainfrom
maxime-leroy:tlb8_shared_resizeable

Conversation

@maxime-leroy
Copy link
Copy Markdown
Collaborator

DRAFT

The tbl8 pool will be shared across all VRFs with automatic resizing
in a follow-up commit. Per-VRF tbl8 sizing is no longer meaningful.

Remove num_tbl8 from:
- gr_iface_info_vrf_fib API struct
- VRF CLI (fib4-tbl8/fib6-tbl8 options)
- fib info API (gr_fib4_info/gr_fib6_info)
- fib show table column
- prometheus metrics (fib4_max_tbl8, fib4_used_tbl8, etc.)
- smoke tests

The auto-derived num_tbl8 is still computed internally from
max_routes and passed to DPDK at FIB creation time.

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
@maxime-leroy maxime-leroy marked this pull request as draft March 30, 2026 14:22
@maxime-leroy maxime-leroy force-pushed the tlb8_shared_resizeable branch 6 times, most recently from 591cbd4 to 63e3f27 Compare March 31, 2026 08:18
Replace per-VRF tbl8 allocation with a single shared tbl8 pool for
all FIB instances (IPv4 and IPv6). The pool starts small (256 groups)
and resizes automatically via RCU-safe pointer swap when full.

This eliminates the need to pre-size tbl8 per VRF and reduces overall
memory usage by sharing tbl8 groups across VRFs.

New DPDK patches:
  - fib: add shared tbl8 pool for dir24_8 and trie backends
  - fib: add resizable tbl8 pool

New grout module: fib_pool
  - Creates a global tbl8 pool at init with RCU configured
  - IPv4 and IPv6 FIBs attach to the same pool via tbl8_pool config
  - Pool freed at shutdown after all VRFs are destroyed

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
Add CLI commands to inspect and manually resize the shared tbl8 pool:

  grcli fib pool          -- show used/total tbl8 groups
  grcli fib pool resize N -- resize pool to N groups

New DPDK patch:
  - fib: add tbl8 pool stats and resize public API

New grout API:
  - GR_FIB_POOL_STATS_GET
  - GR_FIB_POOL_RESIZE

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
@maxime-leroy maxime-leroy force-pushed the tlb8_shared_resizeable branch from 63e3f27 to b439b30 Compare March 31, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant