summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-11-19 18:44:35 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-11-19 18:44:35 +0000
commit0545c3738438dedbbec4650b5c0e4aa28a1b38ef (patch)
tree7390e93888dfb7e2cdd62cbda12e9a7337cbc568
parent01defa9e0a396b7271e9048d885c2c40a721431e (diff)
*: only use 32-bit atomics
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--bgpd/bgpd.h2
-rw-r--r--lib/thread.h2
-rw-r--r--zebra/zebra_dplane.c8
-rw-r--r--zebra/zserv.c2
-rw-r--r--zebra/zserv.h4
5 files changed, 9 insertions, 9 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 70193104b4..606da03a8d 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -1004,7 +1004,7 @@ struct peer {
struct thread *t_process_packet;
/* Thread flags. */
- _Atomic uint16_t thread_flags;
+ _Atomic uint32_t thread_flags;
#define PEER_THREAD_WRITES_ON (1 << 0)
#define PEER_THREAD_READS_ON (1 << 1)
#define PEER_THREAD_KEEPALIVES_ON (1 << 2)
diff --git a/lib/thread.h b/lib/thread.h
index 70090cf784..4de9a65562 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -125,7 +125,7 @@ struct cpu_thread_history {
_Atomic unsigned long total, max;
} real;
struct time_stats cpu;
- _Atomic uint8_t types;
+ _Atomic uint32_t types;
const char *funcname;
};
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 61eba92c98..3e61418b64 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -135,8 +135,8 @@ struct zebra_dplane_provider {
dplane_provider_fini_fp dp_fini;
- _Atomic uint64_t dp_in_counter;
- _Atomic uint64_t dp_error_counter;
+ _Atomic uint32_t dp_in_counter;
+ _Atomic uint32_t dp_error_counter;
/* Embedded list linkage */
TAILQ_ENTRY(zebra_dplane_provider) dp_q_providers;
@@ -171,10 +171,10 @@ static struct zebra_dplane_globals {
/* Limit number of pending, unprocessed updates */
_Atomic uint32_t dg_max_queued_updates;
- _Atomic uint64_t dg_routes_in;
+ _Atomic uint32_t dg_routes_in;
_Atomic uint32_t dg_routes_queued;
_Atomic uint32_t dg_routes_queued_max;
- _Atomic uint64_t dg_route_errors;
+ _Atomic uint32_t dg_route_errors;
/* Event-delivery context 'master' for the dplane */
struct thread_master *dg_master;
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 3c3bf4077b..b40e9e2af5 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -875,7 +875,7 @@ static void zebra_show_client_detail(struct vty *vty, struct zserv *client)
char cbuf[ZEBRA_TIME_BUF], rbuf[ZEBRA_TIME_BUF];
char wbuf[ZEBRA_TIME_BUF], nhbuf[ZEBRA_TIME_BUF], mbuf[ZEBRA_TIME_BUF];
time_t connect_time, last_read_time, last_write_time;
- uint16_t last_read_cmd, last_write_cmd;
+ uint32_t last_read_cmd, last_write_cmd;
vty_out(vty, "Client: %s", zebra_route_string(client->proto));
if (client->instance)
diff --git a/zebra/zserv.h b/zebra/zserv.h
index f21ea17fe8..f7967f54f0 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -157,9 +157,9 @@ struct zserv {
/* monotime of last message sent */
_Atomic uint32_t last_write_time;
/* command code of last message read */
- _Atomic uint16_t last_read_cmd;
+ _Atomic uint32_t last_read_cmd;
/* command code of last message written */
- _Atomic uint16_t last_write_cmd;
+ _Atomic uint32_t last_write_cmd;
};
#define ZAPI_HANDLER_ARGS \