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

bgpd: show json output changes to optimize various show commands #17431

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

krishna-samy
Copy link
Contributor

This PR includes multiple commits that optimize the show json output for various BGP show commands in scaled setup.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write a topotest to verify this new CLI command + documentation.

bgpd/bgp_evpn_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
bgpd/bgp_vty.c Outdated Show resolved Hide resolved
@krishna-samy krishna-samy force-pushed the bgpd_json_commits branch 3 times, most recently from c32f90a to b2af790 Compare November 16, 2024 05:57
Pdoijode and others added 2 commits November 15, 2024 22:48
Introduced JSON support of "show bgp router" command

VTY:
mlx-3700-19# show bgp router
BGP started gracefully at Tue Nov 14 21:18:34 2023
Graceful restart completed at Tue Nov 14 21:18:37 2023
Number of BGP instances (including default): 1

JSON:
mlx-3700-19# show bgp router json
{
  "bgpStartedAt":"Tue Nov 14 21:18:34 2023\n",
  "bgpStartedGracefully":"Yes",
  "grComplete":"Yes",
  "grCompletedAt":"Tue Nov 14 21:18:37 2023\n",
  "bgpInMaintenanceMode":"No",
  "bgpInstanceCount":1
}

Issue:3624937
Signed-off-by: Pooja Jagadeesh Doijode <[email protected]>
Json object could lead to out-of-memory in scaled bgp l2vpn evpn route setup.

Changes:

- not use pretty print and stringify smaller json objects to reduce memory
usage
- free memory after ouput of json_rd
- minor formatting of json output

Commands supported with this Json stringify:

show bgp l2vpn evpn route detail json
show bgp l2vpn evpn route detail type 2 json
show bgp l2vpn evpn route detail type 2 self-originate json
show bgp l2vpn evpn route detail self-originate json
show bgp l2vpn evpn route json
show bgp l2vpn evpn route type 2 json
show bgp l2vpn evpn route type 2 self-originate json
show bgp l2vpn evpn route self-originate json

Ticket:#3513249

Issue:3513249

Signed-off-by: Ashwini Reddy <[email protected]>
Signed-off-by: Sindhu Parvathi Gopinathan's <[email protected]>
@krishna-samy krishna-samy force-pushed the bgpd_json_commits branch 5 times, most recently from cc3769b to 819db39 Compare November 16, 2024 09:21
@ton31337
Copy link
Member

Please fix frrbot yet.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still, the documentation is missing for this new CLI command.

Sindhu Parvathi Gopinathan and others added 2 commits November 16, 2024 05:33
JSON object could lead to out-of-memory in scaled bgp
neighbors received-routes/advertised-routes setup.

Changes:

not use pretty print and stringify smaller json objects to reduce memory
usage
free memory after ouput of json object

Commands supported with this Json stringify:

```
show bgp vrf <vrf-id> neighbors <nbr-id> advertised-routes json
show bgp vrf <vrf-id> neighbors <nbr-id> advertised-routes detail json
show bgp vrf <vrf-id> neighbors <nbr-id> advertised-routes <prefix> json
show bgp vrf <vrf-id> neighbors <nbr-id> received-routes json
show bgp vrf <vrf-id> neighbors <nbr-id> received-routes detail json
show bgp vrf <vrf-id> neighbors <nbr-id> received-routes <prefix> json
```

Ticket:#3513253, #3513254

Issue:3513253, 3513254

Signed-off-by: Sindhu Parvathi Gopinathan's <[email protected]>
Issue: 3576989

Ticket# 3576989

Signed-off-by: Sindhu Parvathi Gopinathan's <[email protected]>

Signed-off-by: Ashwini Reddy's <[email protected]>
This commit has changes to validate show bgp router json command

Signed-off-by: Krishnasamy R <[email protected]>
@krishna-samy
Copy link
Contributor Author

Please write a topotest to verify this new CLI command + documentation.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants