]> git.droids-corp.org - dpdk.git/commitdiff
eal: switch to architecture specific pause function
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 5 Jun 2017 08:58:43 +0000 (14:28 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 3 Jul 2017 21:58:51 +0000 (23:58 +0200)
Remove rte_pause() definition from rte_common.h and
switchover to architecture specific rte_pause.h

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
29 files changed:
examples/distributor/main.c
examples/l2fwd-jobstats/main.c
examples/performance-thread/l3fwd-thread/main.c
examples/tep_termination/main.c
examples/vhost/main.c
examples/vhost_xen/main.c
lib/librte_distributor/rte_distributor.c
lib/librte_distributor/rte_distributor_v20.c
lib/librte_eal/common/eal_common_launch.c
lib/librte_eal/common/eal_common_timer.c
lib/librte_eal/common/include/arch/ppc_64/rte_spinlock.h
lib/librte_eal/common/include/arch/x86/rte_spinlock.h
lib/librte_eal/common/include/generic/rte_rwlock.h
lib/librte_eal/common/include/generic/rte_spinlock.h
lib/librte_eal/common/include/rte_common.h
lib/librte_eal/common/include/rte_eal_memconfig.h
lib/librte_eal/linuxapp/eal/eal_interrupts.c
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_ring/rte_ring.h
lib/librte_timer/rte_timer.c
test/test/test_common.c
test/test/test_cryptodev.c
test/test/test_cryptodev_blockcipher.c
test/test/test_distributor_perf.c
test/test/test_eventdev_sw.c
test/test/test_ring_perf.c
test/test/test_timer.c
test/test/test_timer_perf.c
test/test/test_timer_racecond.c

index 8071f919555733c07c873dfe9e048d8cdf62f3d2..cf8982a71184810d26908f8b2a4d5c13ba8098ae 100644 (file)
@@ -43,6 +43,7 @@
 #include <rte_debug.h>
 #include <rte_prefetch.h>
 #include <rte_distributor.h>
+#include <rte_pause.h>
 
 #define RX_RING_SIZE 512
 #define TX_RING_SIZE 512
index e6e6c2286571816ddf128deeaff6535ae1f37177..d21e8338eac7ea8b646a655c2beb1222dfe8dbaa 100644 (file)
@@ -67,6 +67,7 @@
 #include <rte_jobstats.h>
 #include <rte_timer.h>
 #include <rte_alarm.h>
+#include <rte_pause.h>
 
 #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
 
index 8237ac65e6e2aaf67dc1336ef34f6e1b4cc561ae..fb847d13ea8157fa72f4d38b01949642464b7a72 100644 (file)
@@ -73,6 +73,7 @@
 #include <rte_tcp.h>
 #include <rte_udp.h>
 #include <rte_string_fns.h>
+#include <rte_pause.h>
 
 #include <cmdline_parse.h>
 #include <cmdline_parse_etheraddr.h>
index 83c2189fff845888ca562805af856959a00f940b..aee36c6e48be3a4a272e089a6cd5166be98c82ae 100644 (file)
@@ -50,6 +50,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_vhost.h>
+#include <rte_pause.h>
 
 #include "main.h"
 #include "vxlan.h"
index b625c52a0c3940a942bcf7c80543fbf5c38bd2e0..30abaecfa939a293c8265635549dd66c73186d90 100644 (file)
@@ -52,6 +52,7 @@
 #include <rte_vhost.h>
 #include <rte_ip.h>
 #include <rte_tcp.h>
+#include <rte_pause.h>
 
 #include "main.h"
 
index ed26e28ade51d500b72e033e94534a34a30e1024..69213a4b9c275bd041c0b6bd235735bb8f2fae55 100644 (file)
@@ -48,6 +48,7 @@
 #include <rte_ethdev.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
+#include <rte_pause.h>
 
 #include "main.h"
 #include "virtio-net.h"
index e4dfa7f0e3f21c6c841e29446ee4198764f4863c..32dd18edcae054886b4f1aa4ecd0b4f8a9a3ba76 100644 (file)
@@ -42,6 +42,8 @@
 #include <rte_string_fns.h>
 #include <rte_eal_memconfig.h>
 #include <rte_compat.h>
+#include <rte_pause.h>
+
 #include "rte_distributor_private.h"
 #include "rte_distributor.h"
 #include "rte_distributor_v20.h"
index bb6c5d709ffc5f53295f629cc29e7e454e4473f1..b09abecd525ce6eb15f341d37e23d6704ab9b7e8 100644 (file)
@@ -41,6 +41,8 @@
 #include <rte_compat.h>
 #include <rte_string_fns.h>
 #include <rte_eal_memconfig.h>
+#include <rte_pause.h>
+
 #include "rte_distributor_v20.h"
 #include "rte_distributor_private.h"
 
index 1848466062ea3aad9eec80e365c64850989c1f64..137c191dd1b982d94cfd008f85345928ee90e910 100644 (file)
@@ -41,6 +41,7 @@
 #include <rte_memzone.h>
 #include <rte_eal.h>
 #include <rte_atomic.h>
+#include <rte_pause.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
 
index 72656176e611c5eb56557f236e69dcfee804f552..ed0b16d05e804833c68e94403de69937086d5c89 100644 (file)
@@ -41,6 +41,7 @@
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
+#include <rte_pause.h>
 
 #include "eal_private.h"
 
index af139c9d35ed51ee1edc926e83152283ea80a8ca..39815d9ee4d5a091fbc0b84015a2b5a130c41fa6 100644 (file)
@@ -38,6 +38,7 @@ extern "C" {
 #endif
 
 #include <rte_common.h>
+#include <rte_pause.h>
 #include "generic/rte_spinlock.h"
 
 /* Fixme: Use intrinsics to implement the spinlock on Power architecture */
index 8e630c219ead4ca3740a2d3cbb9bda52503b9425..5675c2b45c6daa45c6417c69dcf8f94349258e35 100644 (file)
@@ -43,6 +43,7 @@ extern "C" {
 #include "rte_cpuflags.h"
 #include "rte_branch_prediction.h"
 #include "rte_common.h"
+#include "rte_pause.h"
 
 #define RTE_RTM_MAX_RETRIES (10)
 #define RTE_XABORT_LOCK_BUSY (0xff)
index 7a0fdc55c8d50a36d5017aee235b16d301b85441..fdb3113d360d38feee1a4c4a73c8610423cdbc4c 100644 (file)
@@ -52,6 +52,7 @@ extern "C" {
 
 #include <rte_common.h>
 #include <rte_atomic.h>
+#include <rte_pause.h>
 
 /**
  * The rte_rwlock_t type.
index e51fc56baddb630caa2ac38ddc8e57ac791c306f..54f83a4c56f25d72d1025ea16dea40c122596fbd 100644 (file)
@@ -51,6 +51,7 @@
 #ifdef RTE_FORCE_INTRINSICS
 #include <rte_common.h>
 #endif
+#include <rte_pause.h>
 
 /**
  * The rte_spinlock_t type.
index 2251bfaec32a7b76e176faf3bc196f2d2cb1601f..99596de0a2598dd818442cfddcfa51583a286842 100644 (file)
@@ -304,21 +304,6 @@ rte_align64pow2(uint64_t v)
 
 /*********** Other general functions / macros ********/
 
-#ifdef __SSE2__
-#include <emmintrin.h>
-/**
- * PAUSE instruction for tight loops (avoid busy waiting)
- */
-static inline void
-rte_pause (void)
-{
-       _mm_pause();
-}
-#else
-static inline void
-rte_pause(void) {}
-#endif
-
 /**
  * Searches the input parameter for the least significant set bit
  * (starting from zero).
index 2b5e0b170656ce1f8577af45c7deca84b17ced6e..b9eee702effe6c5d877322642cff636624b62b91 100644 (file)
@@ -39,6 +39,7 @@
 #include <rte_memzone.h>
 #include <rte_malloc_heap.h>
 #include <rte_rwlock.h>
+#include <rte_pause.h>
 
 #ifdef __cplusplus
 extern "C" {
index 2e3bd12a43c9c101a9b823f451d94dbfb71d6f24..3e9ac41ee582119871f938817210f264a95a6dab 100644 (file)
@@ -64,6 +64,7 @@
 #include <rte_malloc.h>
 #include <rte_errno.h>
 #include <rte_spinlock.h>
+#include <rte_pause.h>
 
 #include "eal_private.h"
 #include "eal_vfio.h"
index 1b7a0da9f0b86888775afb54f511790ad8118df5..80391cfac9bfced16ee378303890a74599db61f8 100644 (file)
@@ -57,6 +57,7 @@
 #include <rte_spinlock.h>
 #include <rte_ring.h>
 #include <rte_compat.h>
+#include <rte_pause.h>
 
 #include "rte_hash.h"
 #include "rte_cuckoo_hash.h"
index 18684a53d17fb13eed3910b4acc361e2fcc90ad2..f5880dfca873440d94d355a0efc5912f885d3627 100644 (file)
@@ -101,6 +101,7 @@ extern "C" {
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
 #include <rte_memzone.h>
+#include <rte_pause.h>
 
 #define RTE_TAILQ_RING_NAME "RTE_RING"
 
index 43e61782dd7766ef31c10f52850a16e704adfa41..dda9baf5506d5941e76f4cb032980d08444c582b 100644 (file)
@@ -51,6 +51,7 @@
 #include <rte_branch_prediction.h>
 #include <rte_spinlock.h>
 #include <rte_random.h>
+#include <rte_pause.h>
 
 #include "rte_timer.h"
 
index 8effa2f9edf38ac2cd8dd6754eb27031d551b795..6e803f5d357aa5377f36231eda7b840e4d5551b7 100644 (file)
@@ -35,6 +35,7 @@
 #include <string.h>
 #include <rte_common.h>
 #include <rte_hexdump.h>
+#include <rte_pause.h>
 
 #include "test.h"
 
index f8f15c0631fe6013312b76680119a366d9cee009..8766cad02016b6fe0d21caba29eb9311ff5849ff 100644 (file)
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
+#include <rte_pause.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
index 603c77652c580536e1a5723a8b8ea6f829048270..ce350e39fb7973dcafef133cb2056c6f3a082aa4 100644 (file)
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
+#include <rte_pause.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
index 732d86d0edc7b13eb99f42ecaa155cfcf0550f33..7d69887b9724a8357776594a1c9f84a46bba672e 100644 (file)
@@ -40,6 +40,7 @@
 #include <rte_common.h>
 #include <rte_mbuf.h>
 #include <rte_distributor.h>
+#include <rte_pause.h>
 
 #define ITER_POWER_CL 25 /* log 2 of how many iterations  for Cache Line test */
 #define ITER_POWER 21 /* log 2 of how many iterations we do when timing. */
index 7da6c256e80cb8da66f0565e88c84cbabdfd59a6..ba8c053e5a79ad3b94d0f42bd24c3da5bb686898 100644 (file)
@@ -47,8 +47,9 @@
 #include <rte_debug.h>
 #include <rte_ethdev.h>
 #include <rte_cycles.h>
-
 #include <rte_eventdev.h>
+#include <rte_pause.h>
+
 #include "test.h"
 
 #define MAX_PORTS 16
index ed89896b360569af10c756438db12f0c7e50d90d..84d200332550a3464e70a49520cf4dbc50fb9f06 100644 (file)
@@ -37,6 +37,7 @@
 #include <rte_ring.h>
 #include <rte_cycles.h>
 #include <rte_launch.h>
+#include <rte_pause.h>
 
 #include "test.h"
 
index 2f6525a50622917fa5986eb86f32f49109146876..de0c312fa69e81d43fc082995b4b6bdebf8aa5a2 100644 (file)
 #include <rte_timer.h>
 #include <rte_random.h>
 #include <rte_malloc.h>
+#include <rte_pause.h>
 
 #define TEST_DURATION_S 1 /* in seconds */
 #define NB_TIMER 4
index fa77efbd25fe2a5631a30761acceef8cd38b9eb7..467ae13daa30ba5dd3f54b78c892113a347785c6 100644 (file)
@@ -42,6 +42,7 @@
 #include <rte_lcore.h>
 #include <rte_random.h>
 #include <rte_malloc.h>
+#include <rte_pause.h>
 
 #define MAX_ITERATIONS 1000000
 
index 7824ec4bf6191f9b76300102e5f20d44d51811ba..5e08f06bed0a034b7d21ef48fb69dfcd8fe89f26 100644 (file)
@@ -42,6 +42,7 @@
 #include <rte_lcore.h>
 #include <rte_random.h>
 #include <rte_malloc.h>
+#include <rte_pause.h>
 
 #undef TEST_TIMER_RACECOND_VERBOSE