summaryrefslogtreecommitdiffstats
path: root/src/plugins/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/map')
-rw-r--r--src/plugins/map/map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/map/map.h b/src/plugins/map/map.h
index d96c7b88cb7..6dc5232bf43 100644
--- a/src/plugins/map/map.h
+++ b/src/plugins/map/map.h
@@ -503,7 +503,7 @@ void
map_ip4_reass_free(map_ip4_reass_t *r, u32 **pi_to_drop);
#define map_ip4_reass_lock() while (clib_atomic_test_and_set (map_main.ip4_reass_lock)) { CLIB_PAUSE (); }
-#define map_ip4_reass_unlock() do {CLIB_MEMORY_BARRIER(); *map_main.ip4_reass_lock = 0;} while(0)
+#define map_ip4_reass_unlock() clib_atomic_release (map_main.ip4_reass_lock)
static_always_inline void
map_ip4_reass_get_fragments(map_ip4_reass_t *r, u32 **pi)
@@ -528,7 +528,7 @@ void
map_ip6_reass_free(map_ip6_reass_t *r, u32 **pi_to_drop);
#define map_ip6_reass_lock() while (clib_atomic_test_and_set (map_main.ip6_reass_lock)) { CLIB_PAUSE (); }
-#define map_ip6_reass_unlock() do {CLIB_MEMORY_BARRIER(); *map_main.ip6_reass_lock = 0;} while(0)
+#define map_ip6_reass_unlock() clib_atomic_release (map_main.ip6_reass_lock)
int
map_ip6_reass_add_fragment(map_ip6_reass_t *r, u32 pi,