aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session-apps')
-rw-r--r--src/vnet/session-apps/echo_client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c
index 1ece0196dde..c3d838d49cc 100644
--- a/src/vnet/session-apps/echo_client.c
+++ b/src/vnet/session-apps/echo_client.c
@@ -263,8 +263,8 @@ echo_client_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
{
stream_session_t *s;
- __sync_fetch_and_add (&ecm->tx_total, sp->bytes_sent);
- __sync_fetch_and_add (&ecm->rx_total, sp->bytes_received);
+ clib_atomic_fetch_add (&ecm->tx_total, sp->bytes_sent);
+ clib_atomic_fetch_add (&ecm->rx_total, sp->bytes_received);
s = session_get_from_handle_if_valid (sp->vpp_session_handle);
if (s)
@@ -276,7 +276,7 @@ echo_client_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vec_delete (connections_this_batch, 1, i);
i--;
- __sync_fetch_and_add (&ecm->ready_connections, -1);
+ clib_atomic_fetch_add (&ecm->ready_connections, -1);
}
else
{
@@ -408,7 +408,7 @@ echo_clients_session_connected_callback (u32 app_index, u32 api_context,
}
vec_add1 (ecm->connection_index_by_thread[thread_index], session_index);
- __sync_fetch_and_add (&ecm->ready_connections, 1);
+ clib_atomic_fetch_add (&ecm->ready_connections, 1);
if (ecm->ready_connections == ecm->expected_connections)
{
ecm->run_test = ECHO_CLIENTS_RUNNING;