| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- tracepoint() -> frrtrace()
- tracelog() -> frrtracelog()
- tracepoint_enabled() -> frrtrace_enabled()
Also removes copypasta'd #ifdefs for those LTTng macros, those are
handled in lib/trace.h
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
|
|
|
|
|
|
| |
Add tracepoints for route process, input filter and output filter.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
|
|
|
|
|
|
|
|
| |
Add tracepoints for:
- packet pushed to internal rx queue
- packet dequeued from rx queue and processed
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
|
|\
| |
| | |
bgpd: Convert inet_ntoa to %pI4
|
| |
| |
| |
| | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \
| | |
| | | |
Abstract rn->lock accessing and cleanup usage to %pFX and %pRN
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Create appropriate accessor functions for the rn->lock
data. We should be accessing this data through accessor
functions since it is private data to the data structure.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \
| |/
|/| |
lib,bgpd: more evpn route-type numerical command versions
|
| |
| |
| |
| |
| |
| |
| | |
Add numberical evpn route-type support to route-map evpn
commands.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| | |
Add number evpn route type support for debug commands.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| | |
Make the debug evpn help commands use evpn string constants
for evpn route type info.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add numberical evpn route type support to some more
show commands.
Also, simplify some of the code there to call common type parsing
function. Some of the bounds checking there is also unncessary given
how our cli node matching works.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
|\ \
| | |
| | | |
Bgp dest print
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use the appropriate bgp_dest_get_prefix accessor function
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some more of the bgp_node usage snuck in from big commits in
the past month or so from feature work. Do some work
to put it back to bgp_dest for incoming future work.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Search and destroy places where we used prefix2str
that could be replaced with %pFX or %pBD in bgpd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
`%pRN` is not appropriate anymore.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|/ /
| |
| |
| |
| |
| | |
Remove bgp_evpn_route2str and replace calls with prefix2str
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| | |
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \
| |/
|/| |
*: Use proper semantics for turning off thread
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have this pattern in the code base:
if (thread)
THREAD_OFF(thread);
If we look at THREAD_OFF we check to see if thread
is non-null too. So we have a double check.
This is unnecessary. Convert to just using THREAD_OFF
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \
| | |
| | | |
bgpd: fix crash in bgp instance creation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use consolidate api in bgp_get and bgp northbound
create callback.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In bgp global commands northbound local-as modify callback
check for backend db for checking existing bgp instance.
In an instance where no router bgp with old ASN cleaned up
followed by new bgp instance with new AS is created,
the nb_running_get_entry in validation phase returns stale
bgp reference, which leads to rejection of the router bgp command.
Uncovered via:
toptotest evpn_type5_test_topo1/test_evpn_type5_topo1.py
test_bgp_attributes_for_evpn_address_family_p1
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Avoid similar name function as bgp_crate()
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bgp_show_neighbor_route() was rewriting safi from LU to uni
before checking if the peer was enabled for LU. This resulted
in the peer's address-family check looking for unicast, which
would always fail for LU peers since unicast + LU are
mutually-exclusive AFIs.
This moves this safi reassignment after the peer AFI check,
ensuring that the peer's address-family check looks for LU
while the call to bgp_show() still uses uni.
-- highlights from manual testing
config:
router bgp 2
neighbor 1.1.1.1 remote-as external
neighbor 1.1.1.1 disable-connected-check
neighbor 1.1.1.1 update-source 2.2.2.2
!
address-family ipv4 unicast
no neighbor 1.1.1.1 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 1.1.1.1 activate
exit-address-family
before:
spine01# show bgp ipv4 unicast neighbors 1.1.1.1 routes
% No such neighbor or address family
spine01# show bgp ipv4 labeled-unicast neighbors 1.1.1.1 routes
% No such neighbor or address family
after:
spine01# show bgp ipv4 unicast neighbors 1.1.1.1 routes
% No such neighbor or address family
spine01# show bgp ipv4 label neighbors 1.1.1.1 routes
BGP table version is 1, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 1.1.1.1 0 0 1 i
Displayed 1 routes and 1 total paths
Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
|
|/
|
|
|
|
|
|
|
| |
if (pcout > (pcount * peer->max_threshold[afi][safi] / 100 ))
is always true. So the very first route received will always
trigger the warning. We actually want the warning to happen
when we hit the threshold.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\
| |
| | |
bgpd: Use default VRF name if using `router bgp` command
|
| |
| |
| |
| |
| |
| |
| |
| | |
When we enter `router bgp` it enters non-VRF instance which is default.
No need to check for VRF/VIEW name, kinda dead code.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \
| |/
|/| |
lib,bgpd: EVPN help string cleanup
|
| |
| |
| |
| |
| |
| |
| | |
Re-use some of the HELP_STR macros rather than copypastaing
strings everywhere.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
|
|/
|
|
| |
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\
| |
| | |
bgpd: fix SA warnings in bgp northbound
|
| |
| |
| |
| |
| |
| | |
Fix a couple of new SA warnings in the new bgp northbound.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|
|\ \
| | |
| | | |
bgpd: aggregate-address on matching MED only
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add code to handle MED matching:
- When MED matches act as normal.
- When MED doesn't match do the following:
* Uninstall the aggregate route
* Unsuppress routes (if using summary-only)
- When MED didn't match, but now matches:
* Install the aggregate route
* Suppress all routes (if using summary-only)
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use `DEFPY` instead of `DEFUN` to remove duplicated code.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
| | |
| | |
| | |
| | | |
This reverts commit 82a843fa3df4adff6d2eaffbaba96eb136fcaebb.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current code in bgp bestpath selection would accept the newest
locally originated path as the best path. Making the selection
non-deterministic. Modify the code to always come to the
same bestpath conclusion when you have multiple locally originated
paths in bestpath selection.
Before:
eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
Last update: Wed Sep 16 15:03:03 2020
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin incomplete, metric 0, weight 32768, valid, sourced
Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)# redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin incomplete, metric 0, weight 32768, valid, sourced
Last update: Wed Sep 16 15:03:32 2020
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#
Notice the route choosen depends on order received
Fixed behavior:
eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
Last update: Wed Sep 16 15:03:03 2020
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin incomplete, metric 0, weight 32768, valid, sourced
Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)# redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
Not advertised to any peer
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin incomplete, metric 0, weight 32768, valid, sourced
Last update: Wed Sep 16 15:03:32 2020
Local
0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#
Ticket: CM-31490
Found-by: Trey Aspelund <taspelund@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For `no router bgp` without ASN check candidate
config for default bgp instance presence to avoid
failure from checking backend db where bgp instance
may not be created.
This situation can be seen in transactional cli mode
with following config.
bharat(config)# router bgp 101
bharat(config-router)# exit
bharat(config)# no router bgp
% No BGP process is configured
bharat(config)# no router bgp
% No BGP process is configured
bharat(config)#
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
move `router bgp` nb callback at `bgp` node level
to have access to bgp context at neighbor and peer-group
level and align create/destroy callbacks call during
no router bgp.
Earlier `no router bgp` is performed first global destroy
callback is called which essentially removes `bgp context`
then it calls to remove (parallel nodes) neighbor and peer-group
which does not have access to bgp context.
Moving router bgp at bgp solves this destroy callback ordering issue.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move bgp (router bgp) context at "bgp" node
level from (instead of) "global" level.
This change allows access of bgp context at neighbor
and peer-group node levels.
+--rw bgp <--- (store `struct bgp` at bgp node xpath)
+--rw global!
| ...
| +--rw afi-safis
| ...
+--rw neighbors
| +--rw neighbor* [remote-address]
| ...
| | +--rw afi-safis
| ...
| +--rw unnumbered-neighbor* [interface]
| ...
+--rw peer-groups
+--rw peer-group* [peer-group-name]
...
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Omit routing protocol augment name from callbacks name.
(Omitted: routing_control_plane_protocols_control_plane_protocol_)
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On bgpd bootstrap register routing hook which ensures
only single bgp named instance created per vrf routing
hierarchy.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| | |
Convert global congigurations clis to transactional
clis using northbound plugin callbacks.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| | |
Register bgpd northbound callbacks to bgp daemon
bootstrap.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit contains splitting of auto-generated bgp northbound callbacks
into separate files.
Include the files into bgp makefile.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
|/
|
|
| |
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
|
|
|
|
|
|
| |
Some daemons were actually missing from the static definitions: nhrpd,
babeld, eigrpd and bfdd.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|