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

lib: implemented a command to diplay all unused route maps. #3398

Closed
wants to merge 0 commits into from

Conversation

rgirada
Copy link
Contributor

@rgirada rgirada commented Nov 29, 2018

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.

New command “show route-map-unused”

The following test cases  has been covered.
All the below cases verified the route-map track counter and unused route-map list.
1.  Add route-map and apply the routemap in protocol.
2.  Apply routemap in protocol and  later create route map.
3.  When an route-map applied , update the routemap check the routemap applied counter.
4.  When routemap applied , remove from protocol and check the unsed routemap command.
5.  Delete the routemap when route-map is used in a protocol.

Related Issue

[3090] (#3090)

Components

[lib, bgpd, zebra, ospfd, eigrpd, isis, ospf6d]

Signed-off-by: rajeshgirada rgirada@vmware.com

@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 29, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3398 74a9d51
Date 11/29/2018
Start 12:15:12
Finish 12:38:39
Run-Time 23:27
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-11-29-12:15:12.txt
Log autoscript-2018-11-29-12:15:54.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6029/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

Report for bgpd.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #5666: FILE: /tmp/f1-7649/bgpd.c:5666:
Report for ospf_routemap.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #77: FILE: /tmp/f1-7649/ospf_routemap.c:77:
< WARNING: line over 80 characters
< #78: FILE: /tmp/f1-7649/ospf_routemap.c:78:
< WARNING: line over 80 characters
< #80: FILE: /tmp/f1-7649/ospf_routemap.c:80:

CLANG Static Analyzer Summary

  • Github Pull Request 3398, comparing to Git base SHA f2ce6a5

No Changes in Static Analysis warnings compared to base

@donaldsharp
Copy link
Member

this needs to be broken up into several much smaller commits and in addition the commit messages should have much more useful information about what is going on and your decisions for what you have done ( similiar to the write up above but in actuality in the commit itself )

@eqvinox eqvinox added the submitter action required The author/submitter needs to do something (fix, rebase, add info, etc.) label Dec 4, 2018
@rgirada rgirada closed this Dec 5, 2018
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6072/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 3398, comparing to Git base SHA ad31e8d

Fixed warnings:

  • Logic error: Uninitialized argument value in staticd/static_vty.c, function ipv6_route_address_interface_vrf_magic, line 1306
  • Logic error: Uninitialized argument value in staticd/static_vty.c, function ipv6_route_vrf_magic, line 1433
  • Logic error: Uninitialized argument value in staticd/static_vty.c, function ipv6_route_magic, line 1373
  • Logic error: Uninitialized argument value in staticd/static_vty.c, function ipv6_route_address_interface_magic, line 1243

Static Analysis warning summary compared to base:

  • Fixed warnings: 4
  • New warnings: 0

@rgirada
Copy link
Contributor Author

rgirada commented Dec 7, 2018

Hi @donaldsharp ,

As suggested, I have separated the changes into multiple commits.
Please find the following PR for all commits.
https://github.com/FRRouting/frr/pull/3431/commits

Regards,
Rajesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
submitter action required The author/submitter needs to do something (fix, rebase, add info, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants