Commit Graph

72 Commits

Author SHA1 Message Date
Chirag Shah
4a1f91a366 zebra: evpn mh sync mac install as inactive
EVPN MH ES reduendant VTEPs need to install
sync MAC as notify inactive and generate
ND:Proxy stamped extended community on Type-2
route.

Ticket:#3436621
Issue:3436621

Testing Done:

tor-11 originates type-2 MAC route:

tor-11# bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify master bridge static

tor-12 receives sync MAC route:

Before fix:
----------
tor-12:/# bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify master bridge static

After fix: inactive is set to MAC entry
----------
tor-12:/#bridge -d fdb show | grep 00:65:00:00:00:01
00:65:00:00:00:01 dev hostbond1 vlan 1000 notify inactive master bridge
static

Notice the difference in `inactive` post notify on tor-12
with the fix.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2023-04-14 14:50:24 -07:00
Donald Sharp
9a7d1e7427 zebra: Use zebra_vrf_lookup_by_id when we can
Let's make this as consistent as is possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-28 15:49:50 -04:00
Donald Sharp
e16d030c65 *: Convert THREAD_XXX macros to EVENT_XXX macros
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp
70d4d90c82 lib, zebra: Convert THREAD_TIMER_STRLEN to EVENT_TIMER_STRLEN
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp
5f6eaa9b96 *: Convert a bunch of thread_XX to event_XX
Convert these functions:

thread_getrusage
thread_cmd_init
thread_consumed_time
thread_timer_to_hhmmss
thread_is_scheduled
thread_ignore_late_timer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp
907a2395f4 *: Convert thread_add_XXX functions to event_add_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp
e6685141aa *: Rename struct thread to struct event
Effectively a massive search and replace of
`struct thread` to `struct event`.  Using the
term `thread` gives people the thought that
this event system is a pthread when it is not

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp
8383d53e43
Merge pull request #12780 from opensourcerouting/spdx-license-id
*: convert to SPDX License identifiers
2023-02-17 09:43:05 -05:00
Sharath Ramamurthy
0adeb5fdf4 zebra: vxlan interface refactoring changes
This change refactors the zebra_vxlan_if related functionality
to a new zebra_vxlan_if.c file. zebra_vxlan_if_up/down,
zebra_vxlan_if_add/update/del is moved zebra_vxlan_if.c

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
Sharath Ramamurthy
b95ce8fadb zebra: single vxlan device dataplace vni update changes
dplane_mac_info and dplane_neigh_info is modified to be vni aware.
dplane_rem_mac_add/del dplane_mac_init is modified to be vni aware.

During dplane context update (mac and neigh), we use the vni information
and if set, corresponding netlink attribute NDA_SRC_VNI is set and passed to the
dplane.

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
Sharath Ramamurthy
8d30ff3b5e zebra: data structure changes for single vxlan device
This changeset introduces the data structure changes needed for
single vxlan device functionality. A new struct zebra_vxlan_vni_info
encodes the iftype and vni information for vxlan device.

The change addresses related access changes of the new data structure
fields from different files

zebra_vty is modified to take care of the vni dump information according
to the new vni data structure for vxlan devices.

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
David Lamparter
acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Pooja Jagadeesh Doijode
283ef1b0d3 zebra: Evpn mac vni detail show command
New show command "show evpn mac vni xx detail [json]"
to display details of all the mac entries for the
requested VNI.

Output of show evpn mac vni xx detail json:
        {
          "numMacs":2,
          "macs":{
            "ca:be:63:7c:81:05":{
              "type":"local",
              "intf":"veth100",
              "ifindex":8,
              "uptime":"00:06:55",
              "localSequence":0,
              "remoteSequence":0,
              "detectionCount":0,
              "isDuplicate":false,
              "syncNeighCount":0,
              "neighbors":{
                "active":[
                  "fe80::c8be:63ff:fe7c:8105"
                ],
                "inactive":[
                ]
              }
            }
          }
        }

Also added remoteEs field in the JSON output of
"show evpn mac vni xx json".

Output of show evpn mac vni xx json:
"00:02:00:00:00:0d":{
  "type":"remote",
  "remoteEs":"03:44:38:39:ff:ff:02:00:00:02",
  "localSequence":0,
  "remoteSequence":0,
  "detectionCount":0,
  "isDuplicate":false
}

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2023-01-03 15:17:58 -08:00
Stephen Worley
da823882a5 zebra: use "get" naming for bgp accept lower knob
Use "get" as the name for checking the status of the bgp
accept lower seq knob. This already has an equivalent "set"
so makes sense to keep it consistent.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-11-01 14:09:15 -04:00
Stephen Worley
852d9f9757 bgpd,zebra,lib: bgp evpn vni macip into two tables
Re-work the bgp vni table to use separately keyed tables for type2
routes.

So, with type2 routes, we have the main table keyed off of the IP and a
new MAC table keyed off of MACs.

By separating out the two, we are able to run path selection separately
for the neigh and mac. Keeping the two separate is also more in-line
with what happens in zebra (they are managed comptletely seperate).

With this change type2 routes go into each table like so:

```
Remote MAC-IP -> IP Table & MAC Table
Remote MAC -> MAC Table

Local MAC-IP -> IP Table
Local MAC -> MAC Table
```

The difference for local is necessary because we should not ever allow
multiple paths for a local MAC.

Also cleaned up the commands for querying the vni tables:

```
show bgp vni all type ...
show bgp vni VNI type ...

```

Old commands will be deprecated in a separate commit.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-10-11 16:18:21 -04:00
Stephen Worley
1e1398e3da zebra: special sync routes lower seq handling
Add some special handling to accept lower seq routes for local
known routes when not ready. This aligns the code back a bit more
to where it was before to fix seen issues with sync routes.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-10-11 15:18:39 -04:00
Stephen Worley
7d99ad7f93 zebra: add knob to accept lower seq in evpn
Add a knob to accept lower seq number in evpn updates
from BGP in Zebra.

Note: Knob is enabled by default

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-10-07 15:36:57 -04:00
anlan_cs
0ef63eb5cc zebra: correctly display one debug flag about ES Peer
Since the `mac->flags` with `ZEBRA_MAC_ES_PEER_ACTIVE` is about ES Peer,
it should be displayed as `PEER Active`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-07-15 19:24:24 -04:00
anlan_cs
e3f05a8a1a zebra: adjust one variable name
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-06-16 10:15:12 -04:00
anlan_cs
81157cbd10 zebra: remove unnecessary check for "zevpn_vrf"
The global vrf in zebra is always non-NULL. In general, it is bound to
default vrf by `zebra_vrf_init()`, at other times bound to some specific
vrf. Anyway, non-NULL.

So remove all redundant checkings for the returned value of
`zebra_vrf_get_evpn()`.

Additionally, remove the unnecessary check for `zvrf` in
`zebra_vxlan_cleanup_tables()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-13 23:31:52 -04:00
Donatas Abraitis
6006b807b1 *: Properly use memset() when zeroing
Wrong: memset(&a, 0, sizeof(struct ...));
    Good:  memset(&a, 0, sizeof(a));

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-11 14:08:47 +03:00
anlan_cs
8e3aae66ce *: remove the checking returned value for hash_get()
Firstly, *keep no change* for `hash_get()` with NULL
`alloc_func`.

Only focus on cases with non-NULL `alloc_func` of
`hash_get()`.

Since `hash_get()` with non-NULL `alloc_func` parameter
shall not fail, just ignore the returned value of it.
The returned value must not be NULL.
So in this case, remove the unnecessary checking NULL
or not for the returned value and add `void` in front
of it.

Importantly, also *keep no change* for the two cases with
non-NULL `alloc_func` -
1) Use `assert(<returned_data> == <searching_data>)` to
   ensure it is a created node, not a found node.
   Refer to `isis_vertex_queue_insert()` of isisd, there
   are many examples of this case in isid.
2) Use `<returned_data> != <searching_data>` to judge it
   is a found node, then free <searching_data>.
   Refer to `aspath_intern()` of bgpd, there are many
   examples of this case in bgpd.

Here, <returned_data> is the returned value from `hash_get()`,
and <searching_data> is the data, which is to be put into
hash table.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-03 00:41:48 +08:00
Donald Sharp
07b12758be pimd, zebra: Fix spelling of fowarding
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-02 07:46:19 -04:00
anlan_cs
b83d220aa9 zebra: optimization on the mac addition for evpn-mh
When `zebra_evpn_mac_svi_add()` adds one found mac by
`zebra_evpn_mac_lookup()` and the found mac is without
svi flag, then call `zebra_evpn_mac_svi_add()` to create
one appropriate mac, but it will call `zebra_evpn_mac_lookup()`
the second time. So lookup twice, the procedure is redundant.

Just an optimization for it, make sure only lookup once.

Modify `zebra_evpn_mac_gw_macip_add()` to check the `macp`
parameter passed by caller, so it can distinguish whether
really need lookup or not.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-03-24 22:31:50 +08:00
anlan_cs
5ff58d0a47 zebra: minor changes on "zebra_evpn_mac_gw_macip_add" function
Two minor changes:
    1) Change `zebra_evpn_mac_gw_macip_add()` 's return type to `void`.
    2) Since `zebra_evpn_mac_gw_macip_add()` has already `assert` the returned
    `mac`, the check of its return value makes no sense. And keep setting
    `mac->flags` inside `zebra_evpn_mac_gw_macip_add()` is more reasonable. So
    just move the setting `mac->flags` inside `zebra_evpn_mac_gw_macip_add()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-02-18 22:49:47 -05:00
Chirag Shah
d5fdae8f45 zebra: fix crash in evpn neigh cleanup all
zebra crash is seen during shutdown (frr restart).

During shutdown, remote neigh and remote mac clean up
is triggered first, followed by per vni all neigh
(including local) and macs cleanup is triggered.

The crash occurs when a remote mac is cleaned up first
and its reference is remained in local neigh.
When local neigh attempt removes itself from its associated
mac's neigh_list it triggers inaccessible memory crash.

The fix is during mac deletion if its neigh_list is non-empty
then retain the MAC in AUTO state.
This can arise when MAC and neigh duo are in different state
(remote/local). Otherwise, the order of cleanup operation
is neighs followed by macs.

The auto mac will be cleaned up when per vni all neighs and macs
are cleaned up.

Ticket:CM-29826
Reviewed By:CCR-10369
Testing Done:

Configure evpn symmetric config where
MAC is in remote state and neigh is in local state.
Perform frr restart then crash is not seen.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-03-03 14:59:56 -08:00
Donald Sharp
cc9f21da22 *: Change thread->func to return void instead of int
The int return value is never used.  Modify the code
base to just return a void instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-23 19:56:04 -05:00
anlan_cs
07361b8fdf zebra: cleanup checking zebra_evpn_mac_add function's return value
This function is sure to return correct value by "assert", so the
checking its return value should be removed.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2021-12-22 21:13:26 -05:00
Igor Ryzhov
096f7609f9 *: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure.
There's no need anymore to store a separate vrf_id field.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-22 20:47:23 +03:00
Donatas Abraitis
4e9a98636f *: Remove unused variables
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
Donatas Abraitis
08edf9c6af zebra: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
Anuradha Karuppiah
51aa26938b zebra: remove ifp reference against the macs before deleting the ifp->mac_list
Fix this crash seen in our topotests:

root@eva:/var/tmp/frr/zebra.928140# more crashlog
ZEBRA: Received signal 11 at 1636047065 (si_addr 0x0, PC 0x7fc01495a7a5); aborting...
ZEBRA: zlog_signal+0x18c                  7fc01496419a     7ffd595e1f50 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: core_handler+0xe3                  7fc0149a205e     7ffd595e2070 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: funlockfile+0x50                   7fc014841140     7ffd595e21c0 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fc01482d000)
ZEBRA:     ---- signal ----
ZEBRA: list_delete_node+0x3c              7fc01495a7a5     7ffd595e2750 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_evpn_mac_ifp_unlink+0x9f     5600718b6518     7ffd595e2770 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_clear_fwd_info+0x18     5600718b6654     7ffd595e27a0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_del+0x110           5600718b90b5     7ffd595e27c0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_mac_del_hash_entry+0xef     5600718b93a7     7ffd595e28f0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: hash_iterate+0x57                  7fc014949fa8     7ffd595e2920 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_evpn_mac_del_all+0x6d        5600718b9418     7ffd595e2970 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_cleanup_all+0x5a        5600718b5322     7ffd595e29e0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_evpn_vxlan_cleanup_all+0x88     5600719106ff     7ffd595e2a10 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: hash_iterate+0x57                  7fc014949fa8     7ffd595e2a50 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: zebra_vxlan_cleanup_tables+0x3a     56007191a230     7ffd595e2aa0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: zebra_vrf_disable+0x187            5600718fd656     7ffd595e2ad0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: vrf_disable+0x8b                   7fc0149bc88f     7ffd595e2b40 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_delete+0x5b                    7fc0149bc65e     7ffd595e2b60 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_terminate_single+0x38          7fc0149bcd71     7ffd595e2b80 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: vrf_terminate+0xe5                 7fc0149bce59     7ffd595e2ba0 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: sigint+0x1de                       560071883117     7ffd595e2bc0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: quagga_sigevent_process+0x73       7fc0149a1e6c     7ffd595e2c10 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: thread_fetch+0x4f                  7fc0149b8884     7ffd595e2c30 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: frr_run+0x230                      7fc01495980c     7ffd595e2cb0 /lib/libfrr.so.0 (mapped at 0x7fc0148b3000)
ZEBRA: main+0x3e4                         5600718835b3     7ffd595e2dc0 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: __libc_start_main+0xea             7fc01468cd0a     7ffd595e2e90 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7fc014666000)
ZEBRA: _start+0x2a                        56007186a46a     7ffd595e2f60 /usr/lib/frr/zebra (mapped at 0x5600717ef000)
ZEBRA: no thread information available
root@eva:/var/tmp/frr/zebra.928140#

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-04 18:15:27 -04:00
Anuradha Karuppiah
09de6e4550 zebra: defer local MAC dataplane install on an ES till the ES-EVI is created
When an ES is deleted and re-added bgpd can start sending MAC-IP sync updates
before the dataplane and zebra have setup the VLAN membership for the ES. Such
MAC entries are not installed in the dataplane till the ES-EVI is created.

Ticket: #2668488

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-10-15 10:43:41 -07:00
Donald Sharp
72de4110dc zebra: Convert to struct zebra_neigh as per our internal standard
We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02 10:33:23 -04:00
Donald Sharp
3198b2b347 zebra: Convert to struct zebra_mac as per our internal standard
We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02 10:33:22 -04:00
Donald Sharp
f6371c343a zebra: Convert to struct zebra_evpn as per our internal standard
We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02 10:33:22 -04:00
Mark Stapp
7f7e49d11a zebra: use workqueue for vxlan remote macip updates
Enqueue incoming vxlan remote macip updates on the main
workqueue, instead of performing the updates immediately,
in-line.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-07-19 10:36:12 -04:00
Mark Stapp
1a3bd37f7c zebra: use more const
Use const in many more evpn apis, especially for macaddr,
ipaddr arguments.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-07-19 10:36:12 -04:00
Mark Stapp
272e11bfc4 zebra: give some evpn apis better names
Use more useful names for a few evpn apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-07-19 08:43:48 -04:00
Donald Sharp
da55bcbcb3 zebra: Reduce size of vni hash tables to a more reasonable start size
We are creating 2 hash tables per vni in zebra.  Once we start to
scale the number of vni's we start to see some serious memory
usage in zebra.  Let's reduce the memory usage at startup
for scale of vni's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-05-05 10:08:06 -04:00
David Lamparter
224ccf29d9 zebra: kill zebra_memory.h, use MTYPE_STATIC
This one also needed a bit of shuffling around, but MTYPE_RE is the only
one left used across file boundaries now.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22 20:02:17 +01:00
David Lamparter
ef7b8be459 zebra: use printfrr exts in EVPN/VXLAN code
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-14 22:56:07 +01:00
Anuradha Karuppiah
8e1337c5dd zebra: del/add remote mac if there is a change from es->non-es dst and vicevera
This is needed as kernel currently doesn't allow a mac replace if the dst
changes from a L2NHG to a single-VTEP and viceversa.

Ticket: CM-31561

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
8b07f173e8 zebra: link local MACs to destination port for efficient lacp-bypass processing
When an ES-bond comes out of bypass FRR needs to flush the local MACs learnt
while the bond was in bypass. To do that efficiently local MACs are linked
to the dest-access port. This only happens if the access-port is in
LACP-bypass or if it is non-ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:24 -08:00
Anuradha Karuppiah
00a7710c25 zebra: support for lacp bypass with EVPN MH
Feature overview:
=================
A 802.3ad bond can be setup to allow lacp-bypass. This is done to enable
servers to pxe boot without a LACP license i.e. allows the bond to go oper
up (with a single link) without LACP converging.

If an ES-bond is oper-up in an "LACP-bypass" state MH treats it as a non-ES
bond. This involves the following special handling -
1. If the bond is in a bypass-state the associated ES is placed in a
bypass state.
2. If an ES is in a bypass state -
a. DF election is disabled (i.e. assumed DF)
b. SPH filter is not installed.
3. MACs learnt via the host bond are advertised with a zero ESI.
When the ES moves out of "bypass" the MACs are moved from a zero-ESI to
the correct non-zero id. This is treated as a local station move.

Implementation:
===============
When (a) an ES is detached from a hostbond or (b) an ES-bond goes into
LACP bypass zebra deletes all the local macs (with that ES as destination)
in the kernel and its local db. BGP re-sends any imported MAC-IP routes
that may exist with this ES destination as remote routes i.e. zebra can
end up programming a MAC that was perviously local as remote pointing
to a VTEP-ECMP group.

When an ES is attached to a hostbond or an ES-bond goes
LACP-up (out of bypss) zebra again deletes all the local macs in the
kernel and its local db. At this point BGP resends any imported MAC-IP
routes that may exist with this ES destination as sync routes i.e.
zebra can end up programming a MAC that was perviously remote
as local pointing to an access port.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:09:33 -08:00
Anuradha Karuppiah
e4c3ece6e0 zebra: fix problem with SVI MAC not being sent to BGP
For MH the SVI MAC is advertised to prevent flooding of ARP replies.
But because of a bug the SVI MAC was being added to the zebra database
but not sent to bgpd for advertising.

Ticket: CM-33329

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-02-19 08:11:15 -08:00
Anuradha Karuppiah
243b74eda6 zebra: changes to advertise SVI mac by default if evpn-mh is enabled
Added support for advertising SVI MAC if EVPN-MH is enabled.

In the case of EVPN MH arp replies from an attached server can be sent to
the ES-peer. To prevent flooding of the reply the SVI MAC needs to be
advertised by default.

Note:
advertise-svi-ip could have been used as an alternate way to advertise
SVI MAC. However that config cannot be turned on if SVI IPs are
re-used (which is done to avoid wasting IP addresses in a subnet).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-19 08:11:15 -08:00
Pat Ruddy
46d6f5a2c6 zebra: resolve multiple functions for local MAC delete
the old VXLAN function for local MAC deletion was still in
existence and being called from the VXLAN code whilst the new
generic function was not being called at all. Resolve this so
the generic function matches the old function and is called
exclusively.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-02-03 12:22:00 +00:00
Donald Sharp
700cae7698 zebra: in zebra_evpn_mac.c use size_t for buffer length
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13 13:22:29 -05:00
Donald Sharp
b16e800423 zebra: Create a dump function for mac->flags and use it
Create a function that can dump the mac->flags in human readable
output and convert all debugs to use it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13 13:22:29 -05:00