lib: implemented a command to diplay all unused route maps. #3398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Made the below changes in all route map supported daemons BGP,OSPF,OSPFv6,Zebra,is-is,rip and ripngd.
As per the current design , routemap usage is tracked based on the “applied” parameter in route map data structure .Currently ,This is getting incremented when the route_map_apply function is called. But this api (route_map_apply) will be called upon other places as well including regular redistribution timer intervals which intern makes this variable updated for every timer interval for the same route type entry.
So instead of updating this parameter in applying route map, Made changes to update this parameter when a route map added to any redistribution list.
This parameter will be updated in the following cases :
1. Increment when route map attached to a redistribution list.
2. Decrement when route map removed / modified from a redistribution list.
3. Increment/decrement when route map update callback triggered.
Related Issue
[3090] (#3090)
Components
[lib, bgpd, zebra, ospfd, eigrpd, isis, ospf6d]
Signed-off-by: rajeshgirada rgirada@vmware.com