svm: fix inadequate atomic load for chunk mgr 77/32477/3
authorDave Wallace <dwallacelf@gmail.com>
Thu, 27 May 2021 23:44:50 +0000 (19:44 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 28 May 2021 16:08:09 +0000 (16:08 +0000)
- Fixes intermittent LDP cut thru iperf3 test
  failure on AARCH64

Type: fix

Change-Id: Id21a078d642e03d974bacacd1f4d0faa42fb6652
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
src/svm/fifo_segment.c
test/test_vcl.py

index d8b3b25..cb1f08a 100644 (file)
@@ -154,7 +154,7 @@ fss_chunk_free_list_push (fifo_segment_header_t *fsh,
 
   csp = fs_chunk_sptr (fsh, c);
   ASSERT (csp <= FS_CL_HEAD_MASK);
-  old_head = clib_atomic_load_relax_n (&fss->free_chunks[fl_index]);
+  old_head = clib_atomic_load_acq_n (&fss->free_chunks[fl_index]);
 
   do
     {
@@ -174,7 +174,7 @@ fss_chunk_free_list_push_list (fifo_segment_header_t *fsh,
 
   headsp = fs_chunk_sptr (fsh, head);
   ASSERT (headsp <= FS_CL_HEAD_MASK);
-  old_head = clib_atomic_load_relax_n (&fss->free_chunks[fl_index]);
+  old_head = clib_atomic_load_acq_n (&fss->free_chunks[fl_index]);
 
   do
     {
@@ -194,7 +194,7 @@ fss_chunk_free_list_pop (fifo_segment_header_t *fsh, fifo_segment_slice_t *fss,
 
   ASSERT (fss_chunk_fl_index_is_valid (fss, fl_index));
 
-  old_head = clib_atomic_load_relax_n (&fss->free_chunks[fl_index]);
+  old_head = clib_atomic_load_acq_n (&fss->free_chunks[fl_index]);
 
   /* Lock-free stacks are affected by ABA if a side allocates a chunk and
    * shortly thereafter frees it. To circumvent that, reuse the upper bits
index a574f7f..2688816 100755 (executable)
@@ -6,7 +6,7 @@ import os
 import subprocess
 import signal
 from framework import VppTestCase, VppTestRunner, running_extended_tests, \
-    Worker, is_platform_aarch64
+    Worker
 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath, FibPathProto
 
 iperf3 = '/usr/bin/iperf3'
@@ -291,8 +291,6 @@ class LDPCutThruTestCase(VCLTestCase):
                            "sock_test_client", self.client_echo_test_args)
 
     @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
-    @unittest.skipIf(is_platform_aarch64,
-                     "intermittently fails on AARCH64 CI jobs")
     def test_ldp_cut_thru_iperf3(self):
         """ run LDP cut thru iperf3 test """