Merge pull request #8808 from ton31337/feature/tracepoints_for_bgp_dest_lock_unlock

bgpd: Add tracepoints for bgp_dest_lock_node/bgp_dest_unlock_node
This commit is contained in:
Donald Sharp 2021-06-09 09:09:15 -04:00 committed by GitHub
commit fe673f2fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@
#include "linklist.h" #include "linklist.h"
#include "bgpd.h" #include "bgpd.h"
#include "bgp_advertise.h" #include "bgp_advertise.h"
#include "bgpd/bgp_trace.h"
struct bgp_table { struct bgp_table {
/* table belongs to this instance */ /* table belongs to this instance */
@ -175,6 +176,7 @@ static inline struct bgp_dest *bgp_dest_parent_nolock(struct bgp_dest *dest)
*/ */
static inline void bgp_dest_unlock_node(struct bgp_dest *dest) static inline void bgp_dest_unlock_node(struct bgp_dest *dest)
{ {
frrtrace(1, frr_bgp, bgp_dest_unlock, dest);
bgp_delete_listnode(dest); bgp_delete_listnode(dest);
route_unlock_node(bgp_dest_to_rnode(dest)); route_unlock_node(bgp_dest_to_rnode(dest));
} }
@ -248,6 +250,7 @@ bgp_node_lookup(const struct bgp_table *const table, const struct prefix *p)
*/ */
static inline struct bgp_dest *bgp_dest_lock_node(struct bgp_dest *dest) static inline struct bgp_dest *bgp_dest_lock_node(struct bgp_dest *dest)
{ {
frrtrace(1, frr_bgp, bgp_dest_lock, dest);
struct route_node *rn = route_lock_node(bgp_dest_to_rnode(dest)); struct route_node *rn = route_lock_node(bgp_dest_to_rnode(dest));
return bgp_dest_from_rnode(rn); return bgp_dest_from_rnode(rn);