Commit Graph

19 Commits

Author SHA1 Message Date
Chirag Shah
f4eac84c5a yang: nbr plist nb conversion for more afi-safis
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-01-09 23:06:02 -08:00
Donatas Abraitis
2adac2562a bgpd: Do not send BGP UPDATE if the route actually not changed
Reference: https://www.cmand.org/communityexploration

                     --y2--
                    /  |   \
  c1 ---- x1 ---- y1   |   z1
                    \  |   /
                     --y3--

1. z1 announces 192.168.255.254/32 to y2, y3.
2. y2 and y3 tags this prefix at ingress with appropriate
communities 65004:2 (y2) and 65004:3 (y3).
3. x1 filters all communities at the egress to c1.
4. Shutdown the link between y1 and y2.
5. y1 will generate a BGP UPDATE message regarding the next-hop change.
6. x1 will generate a BGP UPDATE message regarding community change.

To avoid sending duplicate BGP UPDATE messages we should make sure
we send only actual route updates. In this example, x1 will skip
BGP UPDATE to c1 because the actual route is the same
(filtered communities - nothing changes).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-11 14:51:05 +02:00
Donatas Abraitis
7c98d487b8 *: Replace typo (supress => suppress)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-11-17 12:13:38 +02:00
Chirag Shah
7c54def292 bgpd: default originate transactional callbacks
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:39:41 -07:00
Chirag Shah
cc4440c317 bgpd: shorten names for default originate nb callbacks
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:29:16 -07:00
Chirag Shah
04261decb9 bgpd: convert max prefix clis to transactional
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:27:53 -07:00
Chirag Shah
afe03f6094 *: shorten name of prefix-limit options
shorten prefix-limit's option name in yang model.
change restart timer to uint16.
Stubbed northbound callbacks with above changes.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:27:49 -07:00
Chirag Shah
f4b8ec0721 bgpd: neighbor peergrp config to transactional cli
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:27:03 -07:00
Chirag Shah
90e21f3535 bgpd: add nb support for suppress-map in aggregate cmd
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Chirag Shah
fa423774ff bgpd: add match-med nb support in aggregate cmd
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Chirag Shah
37a87b8f98 bgpd: convert addr-family clis to transactional clis
Convert IPv4 and IPv6 unicast address family clis
to transactional clis and implementation of
northbound callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Chirag Shah
3b66fcef58 yang: update bgp module afi-safi parameters
add vnc-direct route-type.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:14 -07:00
Chirag Shah
feded4118b bgpd: rename router bgp callbacks
Avoid similar name function as bgp_crate()

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-12 16:13:59 -07:00
Chirag Shah
5e42cb2fb0 bgpd: move router bgp nb callback
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>
2020-10-03 11:25:38 -07:00
Chirag Shah
87ce25646b bgpd: correct bgp global context
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>
2020-10-03 11:25:38 -07:00
Chirag Shah
906ebeec98 bgpd: shorten northbound callback names
Omit routing protocol augment name from callbacks name.

(Omitted: routing_control_plane_protocols_control_plane_protocol_)

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:38 -07:00
Chirag Shah
374069da83 bgpd: register nb routing hook
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>
2020-10-03 11:25:37 -07:00
Chirag Shah
ff8a8a7ac1 bgpd: convert global config to transactional cli
Convert global congigurations clis to transactional
clis using northbound plugin callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:37 -07:00
Chirag Shah
a1950c80a5 bgpd: bgp northbound callbacks prototypes
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>
2020-10-03 11:25:37 -07:00