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: Allow 1 prefix to generate statistics #7447

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

donaldsharp
Copy link
Member

When generating a config with 1 prefix:

BGP IPv4 Unicast RIB statistics
Total Advertisements : 0
Total Prefixes : 0
Average prefix length : 0.00
Unaggregateable prefixes : 0
Maximum aggregateable prefixes: 0
BGP Aggregate advertisements : 0
Address space advertised : 0
% announced : 0.00
/8 equivalent : 0.00
/24 equivalent : 0.00

Advertisements with paths : 0
Longest AS-Path (hops) : 0
Average AS-Path length (hops) : 0.00
Largest AS-Path (bytes) : 0
Average AS-Path size (bytes) : 0.00
Highest public ASN : 0
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt
192.168.161.131 4 60000 24 27 0 0 0 00:01:05 (Policy) 1

Total number of neighbors 1

We are not displaying it in the statistics data. This is because FRR is walking the associated
table and comparing the current dest to the top of the tree. I have no idea why this is
the case as that when you have 1 prefix you only have 1 node in your tree. Looking at the
code this is the original code that was imported in 2006. I cannot think of any reason why
FRR needs to exclude this particular node.

Fixed:
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt
192.168.161.131 4 60000 24 27 0 0 0 00:01:05 (Policy) 1

Total number of neighbors 1
eva# show bgp ipv4 statistics
BGP IPv4 Unicast RIB statistics (VRF default)
Total Advertisements : 1
Total Prefixes : 1
Average prefix length : 32.00
Unaggregateable prefixes : 1
Maximum aggregateable prefixes: 0
BGP Aggregate advertisements : 0
Address space advertised : 1
% announced : 0.00
/8 equivalent : 0.00
/24 equivalent : 0.00

Advertisements with paths : 1
Longest AS-Path (hops) : 0
Average AS-Path length (hops) : 0.00
Largest AS-Path (bytes) : 0
Average AS-Path size (bytes) : 0.00
Highest public ASN : 0
eva#

Fixes: #7422
Signed-off-by: Donald Sharp [email protected]

When generating a config with 1 prefix:

BGP IPv4 Unicast RIB statistics
Total Advertisements          :            0
Total Prefixes                :            0
Average prefix length         :         0.00
Unaggregateable prefixes      :            0
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            0
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            0
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1

We are not displaying it in the statistics data.  This is because FRR is walking the associated
table and comparing the current dest to the top of the tree.  I have no idea why this is
the case as that when you have 1 prefix you only have 1 node in your tree.  Looking at the
code this is the original code that was imported in 2006.  I cannot think of any reason why
FRR needs to exclude this particular node.

Fixed:
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1
eva# show bgp ipv4 statistics
BGP IPv4 Unicast RIB statistics (VRF default)
Total Advertisements          :            1
Total Prefixes                :            1
Average prefix length         :        32.00
Unaggregateable prefixes      :            1
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            1
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            1
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva#

Fixes: FRRouting#7422
Signed-off-by: Donald Sharp <[email protected]>
@polychaeta polychaeta added the bgp label Nov 3, 2020
@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 3, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/7447 2b6b4a5
Date 11/03/2020
Start 15:30:53
Finish 15:57:16
Run-Time 26:23
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-11-03-15:30:53.txt
Log autoscript-2020-11-03-15:31:54.log.bz2
Memory 473 475 419

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-15162/

This is a comment from an 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:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15162/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201103-08-g2b6b4a54c-0 (missing) -> 7.6-dev-20201103-08-g2b6b4a54c-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201103-08-g2b6b4a54c-0 (missing) -> 7.6-dev-20201103-08-g2b6b4a54c-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201103-08-g2b6b4a54c-0 (missing) -> 7.6-dev-20201103-08-g2b6b4a54c-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201103-08-g2b6b4a54c-0 (missing) -> 7.6-dev-20201103-08-g2b6b4a54c-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201103-08-g2b6b4a54c-0 (missing) -> 7.6-dev-20201103-08-g2b6b4a54c-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 7447, comparing to Git base SHA aeef9fc

No Changes in Static Analysis warnings compared to base

3 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-15162/artifact/shared/static_analysis/index.html

@ton31337 ton31337 merged commit 626d165 into FRRouting:master Nov 4, 2020
@donaldsharp donaldsharp deleted the table_stats branch June 23, 2021 11:17
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.

bgpd statistics when total advertised prefixes = 1 incorrectly shows 0
5 participants