Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIMD: RPF lookup mode per-group, per-source #17776

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nabahr
Copy link
Contributor

@nabahr nabahr commented Jan 6, 2025

Add the ability to configure the RPF lookup mode on a per-group and/or per-source basis.

Modified CLI:
rpf-lookup-mode MODE [group-list PREFIX_LIST] [source-list PREFIX_LIST]

If a group or source list is provided, the the RPF lookup mode will only apply to S,G addresses that match the given prefix list(s).
A global RPF lookup mode that does not specify a group or source list is always installed and uses the current default of mrib-then-urib. This default value can be changed as it is currently with the command rpf-lookup-mode MODE.
Any number of RPF lookup modes can be defined, as long as the group and source list combination is unique.
Lookup modes are sorted by modes with both lists specified, followed by modes with only one list specified, followed by the global lookup mode. The order within the first 2 groups is unspecified. The first lookup mode that matches is used. Not all RPF lookups have a valid group address when performing the lookup (e.g. RPF to an RP), so in that case only lookup modes that do not specify a group-list will be used.

@frrbot frrbot bot added documentation pim tests Topotests, make check, etc yang labels Jan 6, 2025
@nabahr nabahr force-pushed the group-rpf-mode branch 2 times, most recently from 267c024 to 12b4ec4 Compare January 6, 2025 21:37
pimd/pim_nht.c Outdated Show resolved Hide resolved
nabahr added 4 commits January 7, 2025 21:47
Add options for group-list and source-list, both of which take a prefix list name.
The prefix list is used to determine the lookup mode for specific sources and/or groups.
Any number of lookup modes can be configured as long as the combination of group
and source list is unique.
A global lookup mode (empty group and source lists) is always added and defaults to mrib-then-urib
as it currently functions. The global lookup mode can be changed as it current exists with the command
`rpf-lookup-mode MODE`.
When determinig which mode to use, match source (and group if provided) against the lists, if they are set.
If a lookup does not specify a group, then only use lookup modes that do not have a group list defined.
A lookup by definition will have a source, so no special handling there.

Signed-off-by: Nathan Bahr <[email protected]>
Add the support to store lookup modes as a sorted list.
List is non-unique and sorts mode with both lists < modes with one list < global mode (no lists).
This way, when finding the right mode, we will match a lookup using a prefix list before the global mode.
Add passing group address into all lookups (using nht cache and/or synchronous lookup).
Many areas don't have a group address, use PIMADDR_ANY if no valid group is needed.

Signed-off-by: Nathan Bahr <[email protected]>
Expand existing pim_mrib tests to include testing lookup modes
specific to source and/or group as defined in prefix lists.

Signed-off-by: Nathan Bahr <[email protected]>
@github-actions github-actions bot added the rebase PR needs rebase label Jan 7, 2025
@nabahr nabahr requested a review from donaldsharp January 7, 2025 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants