mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 18:56:40 +00:00
zebra: Convert time to uint64_t for zclient data structures
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
bce18b18fe
commit
ef03888333
@ -228,8 +228,7 @@ static void zserv_write(struct thread *thread)
|
|||||||
case BUFFER_ERROR:
|
case BUFFER_ERROR:
|
||||||
goto zwrite_fail;
|
goto zwrite_fail;
|
||||||
case BUFFER_PENDING:
|
case BUFFER_PENDING:
|
||||||
atomic_store_explicit(&client->last_write_time,
|
atomic_store_explicit(&client->last_write_time, monotime(NULL),
|
||||||
(uint32_t)monotime(NULL),
|
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
zserv_client_event(client, ZSERV_CLIENT_WRITE);
|
zserv_client_event(client, ZSERV_CLIENT_WRITE);
|
||||||
return;
|
return;
|
||||||
@ -264,8 +263,7 @@ static void zserv_write(struct thread *thread)
|
|||||||
case BUFFER_ERROR:
|
case BUFFER_ERROR:
|
||||||
goto zwrite_fail;
|
goto zwrite_fail;
|
||||||
case BUFFER_PENDING:
|
case BUFFER_PENDING:
|
||||||
atomic_store_explicit(&client->last_write_time,
|
atomic_store_explicit(&client->last_write_time, monotime(NULL),
|
||||||
(uint32_t)monotime(NULL),
|
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
zserv_client_event(client, ZSERV_CLIENT_WRITE);
|
zserv_client_event(client, ZSERV_CLIENT_WRITE);
|
||||||
return;
|
return;
|
||||||
@ -276,8 +274,8 @@ static void zserv_write(struct thread *thread)
|
|||||||
atomic_store_explicit(&client->last_write_cmd, wcmd,
|
atomic_store_explicit(&client->last_write_cmd, wcmd,
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
|
||||||
atomic_store_explicit(&client->last_write_time,
|
atomic_store_explicit(&client->last_write_time, monotime(NULL),
|
||||||
(uint32_t)monotime(NULL), memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -748,7 +746,7 @@ static struct zserv *zserv_client_create(int sock)
|
|||||||
client->wb = buffer_new(0);
|
client->wb = buffer_new(0);
|
||||||
TAILQ_INIT(&(client->gr_info_queue));
|
TAILQ_INIT(&(client->gr_info_queue));
|
||||||
|
|
||||||
atomic_store_explicit(&client->connect_time, (uint32_t) monotime(NULL),
|
atomic_store_explicit(&client->connect_time, monotime(NULL),
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
|
||||||
/* Initialize flags */
|
/* Initialize flags */
|
||||||
|
@ -216,15 +216,15 @@ struct zserv {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* monotime of client creation */
|
/* monotime of client creation */
|
||||||
_Atomic uint32_t connect_time;
|
_Atomic uint64_t connect_time;
|
||||||
/* monotime of last message received */
|
/* monotime of last message received */
|
||||||
_Atomic uint32_t last_read_time;
|
_Atomic uint64_t last_read_time;
|
||||||
/* monotime of last message sent */
|
/* monotime of last message sent */
|
||||||
_Atomic uint32_t last_write_time;
|
_Atomic uint64_t last_write_time;
|
||||||
/* command code of last message read */
|
/* command code of last message read */
|
||||||
_Atomic uint32_t last_read_cmd;
|
_Atomic uint64_t last_read_cmd;
|
||||||
/* command code of last message written */
|
/* command code of last message written */
|
||||||
_Atomic uint32_t last_write_cmd;
|
_Atomic uint64_t last_write_cmd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of instances configured with
|
* Number of instances configured with
|
||||||
|
Loading…
Reference in New Issue
Block a user