summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-09-13 11:13:13 +0200
committerOle Trøan <otroan@employees.org>2018-09-14 09:25:28 +0000
commit93008c26e9226fa86a7d2e5569b9e69c29d0996b (patch)
tree415c9aa36d91799c9595635c7d8213f2c725db95 /src/plugins
parent1fc44b6fec5a75b6ce57ed984965877bc4b49e47 (diff)
acl-plugin: do not do clib_smp_atomic_add on per-worker counters
Just do a regular increment, since we are not contending for these counters. This also makes the tests pass on ARM ThunderX (VPP-1395). Change-Id: I333aaa11d4145d13d322868900bc114df85a020d Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/acl/session_inlines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/acl/session_inlines.h b/src/plugins/acl/session_inlines.h
index 93683c4c4a1..cab4d7d4cc9 100644
--- a/src/plugins/acl/session_inlines.h
+++ b/src/plugins/acl/session_inlines.h
@@ -430,7 +430,7 @@ acl_fa_put_session (acl_main_t * am, u32 sw_if_index,
as the caller must have dealt with the timers. */
vec_validate (pw->fa_session_dels_by_sw_if_index, sw_if_index);
clib_mem_set_heap (oldheap);
- clib_smp_atomic_add (&pw->fa_session_dels_by_sw_if_index[sw_if_index], 1);
+ pw->fa_session_dels_by_sw_if_index[sw_if_index]++;
clib_smp_atomic_add (&am->fa_session_total_dels, 1);
}
@@ -569,7 +569,7 @@ acl_fa_add_session (acl_main_t * am, int is_input, int is_ip6,
vec_validate (pw->fa_session_adds_by_sw_if_index, sw_if_index);
clib_mem_set_heap (oldheap);
- clib_smp_atomic_add (&pw->fa_session_adds_by_sw_if_index[sw_if_index], 1);
+ pw->fa_session_adds_by_sw_if_index[sw_if_index]++;
clib_smp_atomic_add (&am->fa_session_total_adds, 1);
return sess;
}