fib: Use the same adjacency that BFD is using 30/35330/3
authorNeale Ranns <neale@graphiant.com>
Tue, 15 Feb 2022 08:28:19 +0000 (08:28 +0000)
committerNeale Ranns <neale@graphiant.com>
Wed, 16 Feb 2022 14:21:08 +0000 (14:21 +0000)
commit32fd89b608a78cc1810fa666f06575483fa86975
tree8cea33b26426d978f7604363ea6a9b7f72638048
parent558a354c8fdf3ec2f7189b36d9f55437615b3681
fib: Use the same adjacency that BFD is using

Type: improvement

When the adj subsystem is notified of a BFD session, it attempts to find the appropriate adjacency from the session's key.
This could lead to a mismatch between the adj used by BFD and that of FIB. The BFD session stores the adj it is using, so FIB uses that instead.
Since adj is now using the same adj as BFD, it does not need to maintain its own locks.
In BFD it is necessary to initialise the adj index used in INVALID and ensure it is not unlock before listeners are notified of the session delete.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I9630867b10bb18969475299a0c754942a8df0f44
src/plugins/unittest/fib_test.c
src/vnet/adj/adj_bfd.c
src/vnet/bfd/bfd_main.c
src/vnet/bfd/bfd_udp.c