summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-08-18 00:27:54 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-08-24 14:23:40 +0200
commit083ec940aba3966ba7e60b4b4f51a0bc6603ddd8 (patch)
tree4e4572ab077740b9c7404cc9622f8423ed68a748 /bgpd/rfapi
parentMerge pull request #11848 from rgirada/ospf_gr_nbr (diff)
downloadfrr-083ec940aba3966ba7e60b4b4f51a0bc6603ddd8.tar.xz
frr-083ec940aba3966ba7e60b4b4f51a0bc6603ddd8.zip
bgpd: Convert from bgp_clock() to monotime()
Let's convert to our actual library call instead of using yet another abstraction that makes it fun for people to switch daemons. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/rfapi')
-rw-r--r--bgpd/rfapi/bgp_rfapi_cfg.c2
-rw-r--r--bgpd/rfapi/rfapi.c6
-rw-r--r--bgpd/rfapi/rfapi_rib.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c
index 2437bd8cf..831f92996 100644
--- a/bgpd/rfapi/bgp_rfapi_cfg.c
+++ b/bgpd/rfapi/bgp_rfapi_cfg.c
@@ -94,7 +94,7 @@ DEFINE_QOBJ_TYPE(rfapi_l2_group_cfg);
*/
time_t rfapi_time(time_t *t)
{
- time_t clock = bgp_clock();
+ time_t clock = monotime(NULL);
if (t)
*t = clock;
return clock;
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c
index 382886e0b..d10ed0774 100644
--- a/bgpd/rfapi/rfapi.c
+++ b/bgpd/rfapi/rfapi.c
@@ -1006,7 +1006,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
bgp_aggregate_decrement(bgp, p, bpi, afi, safi);
bgp_attr_unintern(&bpi->attr);
bpi->attr = new_attr;
- bpi->uptime = bgp_clock();
+ bpi->uptime = monotime(NULL);
if (safi == SAFI_MPLS_VPN) {
@@ -1523,8 +1523,8 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target,
rfd->rsp_counter++; /* dedup: identify this generation */
rfd->rsp_time = rfapi_time(NULL); /* response content dedup */
rfd->ftd_last_allowed_time =
- bgp_clock()
- - bgp->rfapi_cfg->rfp_cfg.ftd_advertisement_interval;
+ monotime(NULL) -
+ bgp->rfapi_cfg->rfp_cfg.ftd_advertisement_interval;
if (l2o) {
if (!memcmp(l2o->macaddr.octet, rfapi_ethaddr0.octet,
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c
index 9d61ada7d..ffcd36557 100644
--- a/bgpd/rfapi/rfapi_rib.c
+++ b/bgpd/rfapi/rfapi_rib.c
@@ -797,7 +797,7 @@ int rfapiRibPreloadBi(
* Update last sent time for prefix
*/
trn = agg_node_get(rfd->rsp_times[afi], p); /* locks trn */
- trn->info = (void *)(uintptr_t)bgp_clock();
+ trn->info = (void *)(uintptr_t)monotime(NULL);
if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
@@ -1227,7 +1227,7 @@ callback:
*/
trn = agg_node_get(rfd->rsp_times[afi],
p); /* locks trn */
- trn->info = (void *)(uintptr_t)bgp_clock();
+ trn->info = (void *)(uintptr_t)monotime(NULL);
if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
@@ -2042,7 +2042,7 @@ rfapiRibPreload(struct bgp *bgp, struct rfapi_descriptor *rfd,
* update this NVE's timestamp for this prefix
*/
trn = agg_node_get(rfd->rsp_times[afi], &pfx); /* locks trn */
- trn->info = (void *)(uintptr_t)bgp_clock();
+ trn->info = (void *)(uintptr_t)monotime(NULL);
if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);