Page MenuHomeFreeBSD

Add rib subscription API.
ClosedPublic

Authored by melifaro on May 30 2020, 2:47 PM.
Tags
None
Referenced Files
F114941546: D25070.id72449.diff
Fri, Apr 18, 8:07 PM
F114895168: D25070.id.diff
Fri, Apr 18, 5:58 AM
F114894221: D25070.id72550.diff
Fri, Apr 18, 5:45 AM
F114892755: D25070.id72449.diff
Fri, Apr 18, 5:35 AM
F114892090: D25070.id72468.diff
Fri, Apr 18, 5:22 AM
Unknown Object (File)
Fri, Apr 18, 1:47 AM
Unknown Object (File)
Mon, Apr 14, 9:34 AM
Unknown Object (File)
Sun, Apr 13, 6:31 PM
Subscribers

Details

Reviewers
ae
Group Reviewers
network
Commits
rS361708: Add rib subscription API.
Summary

Currently there is no easy way of subscribing for the routing table changes. The only existing way is to set ifa_rtrequest callback in the each protocol ifaddr, which is not convenient or extandable.

This change provides generic notification subscription mechanism, that will replace current ifa_rtrequest one and allow other applications such as accelerated routing lookup modules subscribe for the changes.

In particular, this change provides 2 hooks: 1) synchronous one (RIB_NOTIFY_IMMEDIATE), called under RIB_WLOCK, which ensures exact ordering of the changes and 2) async one, (RIB_NOTIFY_DELAYED) that is called after the change w/o holding locks. The latter one does not provide any notification ordering guarantee.

This change depends on D25067.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro added reviewers: network, ae.
melifaro edited the summary of this revision. (Show Details)

Add forgottech epoch reclamation.

How many subscribers do you expect? I think you will replace some existing. Maybe it would be better to have separate list for each subscription type?

In D25070#552529, @ae wrote:

How many subscribers do you expect? I think you will replace some existing. Maybe it would be better to have separate list for each subscription type?

Currently there is only one - ND6 default route checker. With the modular lookup engine, there will be 1 more for rtables where lookup engine is attached.
With that in mind, idea is to start with the simplest implementation and then enhance it if/when needed.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 1 2020, 9:52 PM
Closed by commit rS361708: Add rib subscription API. (authored by melifaro). · Explain Why
This revision was automatically updated to reflect the committed changes.