Commit Graph

17 Commits

Author SHA1 Message Date
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
cb37cb336a *: Rename thread.[ch] to event.[ch]
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.

In this commit rename the thread.[ch] files to event.[ch].

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:16 -04:00
Donald Sharp
edacb45c0c zebra: Make GR debug logs at least vrf aware
The GR debug logs are doing all sorts of wonderful stuff
but they were not actually displaying anything useful to the operator
about what vrf we are operating in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-08 13:26:16 -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
Mark Stapp
c0ce4875ff zebra: use real MTYPEs for various objects
Don't use MTYPE_TMP for many things in zebra: add specific
mem types.

Signed-off-by: Mark Stapp <mjs@labn.net>
2022-12-05 10:55:35 -05: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
Donatas Abraitis
df8d723c5f *: Add FOREACH_AFI_SAFI_NSF(afi, safi) macro to reduce nesting
Used for graceful-restart mostly.

Especially for bgp_show_neighbor_graceful_restart_capability_per_afi_safi()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-13 14:29:54 +02:00
Renato Westphal
98cb53f96a zebra, ospfd: fix typos in the graceful restart code
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-06-08 11:41:33 -03:00
Donatas Abraitis
2dbe669bdf :* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22 09:07:41 +03:00
Emanuele Di Pascale
cd7108ba92 zebra: avoid using c++ keywords in headers
to make sure that c++ code can include them, avoid using reserved
keywords like 'delete' or 'new'.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-05-14 16:42:47 +02:00
Quentin Young
5567e8010d lib, zebra: remove nullity check before XFREE...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-03-09 18:16:32 -04:00
Quentin Young
ca8a844cc5
Merge pull request #5850 from Spantik/gr_fix
Zebra: Zebra gr dynamic client handling
2020-03-04 23:40:26 -05:00
Santosh P K
6f4aee61a2 Zebra: Zebra gr dynamic client handling.
When a client connects to zebra with GR capabilities and
then restarts, it might disconnect again even before hello is
sent leading zebra cores.

GR should be supported only for dynamic neighbor who are capable
of restarting.

Signed-off-by: Santosh P K <sapk@vmware.com>
2020-02-21 06:26:48 -08:00
Quentin Young
294a0baea4 zebra: remove null check before XFREE in GR code
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-19 21:38:23 -05:00
Quentin Young
a093ad8569 zebra: reduce scope of XCALLOC for gr processing
Somewhat gnarly code flow here that might be leaking memory - can't tell
if it's a test artifact or not, but in any case this reduces the
situations in which we need to alloc a block.

And we don't need to check XCALLOC for success...
And we don't need to null check before XFREE...
Or set XFREE'd pointers to NULL...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-19 21:38:23 -05:00
Santosh P K
b9e6727acd zebra: Capabality and stale route handling for GR client.
Handling capability received from client. It may contain
GR enable/disable, Stale time changes, RIB update complete
for given AFi, ASAFI and instance. It also has changes for
stale route handling.

Signed-off-by: Santosh P K <sapk@vmware.com>
2020-01-31 03:36:37 -08:00
Santosh P K
851140a7bb zebra: Handling of connection disconnect and connect with GR.
Zebra will have special handling for clients with GR enabled.
When client disconnects with GR enabled, then a stale client
will be created and its RIB will be retained till stale timer
or client comes up and updated its RIB.

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: Soman K S <somanks@vmware.com>
Signed-off-by: Santosh P K <sapk@vmware.com>
2020-01-30 10:26:04 -08:00