Commit Graph

14 Commits

Author SHA1 Message Date
Donald Sharp
a05111ba3d zebra: Add uptime to show evpn arp-cache vni .. detail
Add uptime data to `show evpn arp-cache vni ... detail` command.

Effectively when we create a neighbor entry store the time it
was created.  When we modify the neighbor entry store the time it
was modified.  Display under detail output and json output.

New output:
eva# show evpn arp-cache vni all detail

VNI 1000 #ARP (IPv4 and IPv6, local and remote) 8

IP: 45.0.0.5
 Type: remote
 State: active
 Uptime: 00:01:59
 MAC: 0a:fd:87:ca:7c:00
 Sync-info: -
 Remote VTEP: 192.168.100.18
 Local Seq: 0 Remote Seq: 0
IP: fe80::8fd:87ff:feca:7c00
 Type: remote
 State: active
 Uptime: 00:01:59
 MAC: 0a:fd:87:ca:7c:00
 Sync-info: -
 Remote VTEP: 192.168.100.18
 Local Seq: 0 Remote Seq: 0
IP: fe80::14e5:c2ff:fe50:fa59
 Type: local
 State: active
 Uptime: 00:02:04
 MAC: 16:e5:c2:50:fa:59
 Sync-info: -
 Local Seq: 0 Remote Seq: 0
IP: 45.0.0.3
 Type: remote
 State: active
 Uptime: 00:02:02
 MAC: 0e:50:e8:cf:6b:eb
 Sync-info: -
 Remote VTEP: 192.168.100.16
 Local Seq: 0 Remote Seq: 0
IP: 45.0.0.2
 Type: local
 State: active
 Uptime: 00:02:05
 MAC: 16:e5:c2:50:fa:59
 Sync-info: -
 Local Seq: 0 Remote Seq: 0
IP: fe80::c50:e8ff:fecf:6beb
 Type: remote
 State: active
 Uptime: 00:02:02
 MAC: 0e:50:e8:cf:6b:eb
 Sync-info: -
 Remote VTEP: 192.168.100.16
 Local Seq: 0 Remote Seq: 0
IP: 45.0.0.4
 Type: remote
 State: active
 Uptime: 00:01:55
 MAC: 02:ad:5f:d8:da:80
 Sync-info: -
 Remote VTEP: 192.168.100.17
 Local Seq: 0 Remote Seq: 0
IP: fe80::ad:5fff:fed8:da80
 Type: remote
 State: active
 Uptime: 00:01:55
 MAC: 02:ad:5f:d8:da:80
 Sync-info: -
 Remote VTEP: 192.168.100.17
 Local Seq: 0 Remote Seq: 0
eva#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-26 16:47:07 -04:00
Mark Stapp
9bcef951be zebra: replace inet_ntoa
Stop using inet_ntoa - use %pI4 or inet_ntop instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-22 13:37:25 -04:00
Donald Sharp
bc3cd39bc4 zebra: n->mac is derefed in all paths
No need to check for n->mac existence as that all paths
leading to this code have n->mac already derefed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-11 10:47:37 -04:00
Anuradha Karuppiah
2b9e207e0e zebra: stop neigh hold timer when the neigh is deleted
The neigh hold timer was firing after the neigh was deleted resulting
in the following crash -
[
    at ./zebra/zebra_evpn_neigh.h:155
    at zebra/zebra_evpn_neigh.c:447
    at lib/thread.c:1578
    at zebra/main.c:488
]

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-09-23 06:46:19 -07:00
Anuradha Karuppiah
fb8f609d48 zebra: fixup a neigh del bug introduced by a previous commit for MAC-IP sync
Problem commit -
[
b169fd6fd5 zebra: support for MAC-IP sync routes
]

That commit had accidentally replaced a mac-ip del to bgp with a mac
del (consequence of a bad cut-paste).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-09-16 17:32:33 -07:00
Pat Ruddy
2bdd4461c1 zebra: clean up SA warning in EVPN code
Use asserts rather thank test where the values should definitely
not be NULL.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 18:03:21 +01:00
Chirag Shah
707b76d795 zebra: Revert "zebra: probe local inactive neigh"
Reverting probing of neigh entry. There is a timing where
probe and remote macip add request comes at the same time resulting
in neigh to remain in local state event though it should be remote.

In mobility case, the host moves to remote VTEP, first MAC only type-2
route is received which triggers a PROBE of neighs (associated to MAC).
PROBE request can go via network port to remote VTEP.

PROBE request picks up local neigh with MAC entry's outgoing port is
remote VTEP tunnel port.
The PROBE reply and MAC-IP (containing IP) almost comes same time at
DUT.

DUT first processes remote macip and installs neigh as remote.
Followed by receives neigh as REACHABLE which marks neigh as LOCAL.

FRR does have BPF filter which does not allow its own netlink request
to receive. Otherwise frr's request to program neigh as remote can move
neigh from local to remote.

Though ordering can not be guranteed that REACHABLE (PROBE's repsonse)
can come at anytime and move it to LOCAL.

This fix would not suffice the needs of converging LOCAL inactive neighs
to remove from DB. As mobility draft sugges to PROBE local neigh when
MAC moves to remote but it is not working with current framework.

Ticket:CM-22864

This reverts commit 44bc8ae550

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-08-12 12:39:34 +01:00
Pat Ruddy
8b5fdf2e66 zebra: extract core EVPN functions from zebra_vxlan.c
extract the core EVPN functions from zebra_vxlan.c and put them in
a new file zebra_evpn.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
33064a6289 zebra: extract neighbor processing from kernel_neigh_del
extract the neighbor uninstall part of
zebra_vxlan_handle_kernel_neigh_del into a new function
zebra_evpn_neigh_del_ip in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
32fe7dfd9b zebra: extract neighbor processing from process_remote_macip_del
extract the neighbor uninstall  part of process_remote_macip_add
into a new function zebra_evpn_neigh_remote_uninstall in
zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
224315f3e4 zebra: extract neigbor processing from zevpn_gw_macip_add
extract the neighbor part of process_remote_macip_add into a new
function zebra_evpn_neigh_gw_macip_add in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
036daaca3e zebra: extract neigbor processing from remote_macip_add
extract the neighbor part of process_remote_macip_add into a new
function process_neigh_remote_macip_add in zebra_evpn_neigh.c.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
7cbae20ade zebra: extract neighbor functions from zebra_vxlan.c
Move neighbor processing functions to new zebra_evpn_neigh.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00
Pat Ruddy
6336e12b94 zebra: clone zebra_vxlan.c to zebra_evpn_neigh.c
clone zebra_vxlan.c to create a file zebra_evpn_neigh.c for neighbor
dB functions whilst retaining the history of zebra_vxlan.c

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:34 +01:00