[dpdk-dev] [PATCH v2 08/10] sched: allow enabling SSE optimizations in config

Stephen Hemminger stephen at networkplumber.org
Fri Nov 13 18:58:34 CET 2015


From: Stephen Hemminger <shemming at brocade.com>

Make the SSE optimizations visible as a normal config option.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 config/common_bsdapp         | 1 +
 config/common_linuxapp       | 1 +
 lib/librte_sched/rte_sched.c | 8 ++------
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 8717fb7..6b2cdf5 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -400,6 +400,7 @@ CONFIG_RTE_SCHED_RED=n
 CONFIG_RTE_SCHED_COLLECT_STATS=n
 CONFIG_RTE_SCHED_SUBPORT_TC_OV=n
 CONFIG_RTE_SCHED_PORT_N_GRINDERS=8
+CONFIG_RTE_SCHED_VECTOR=y
 
 #
 # Compile the distributor library
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 9392dd8..2146915 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -408,6 +408,7 @@ CONFIG_RTE_SCHED_RED=n
 CONFIG_RTE_SCHED_COLLECT_STATS=n
 CONFIG_RTE_SCHED_SUBPORT_TC_OV=n
 CONFIG_RTE_SCHED_PORT_N_GRINDERS=8
+CONFIG_RTE_SCHED_VECTOR=y
 
 #
 # Compile the distributor library
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index a98c757..caf5f52 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -52,11 +52,7 @@
 #pragma warning(disable:2259) /* conversion may lose significant bits */
 #endif
 
-#ifndef RTE_SCHED_OPTIMIZATIONS
-#define RTE_SCHED_OPTIMIZATIONS		          0
-#endif
-
-#if RTE_SCHED_OPTIMIZATIONS
+#ifdef RTE_SCHED_VECTOR
 #include <immintrin.h>
 #endif
 
@@ -1668,7 +1664,7 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos)
 	return 1;
 }
 
-#if RTE_SCHED_OPTIMIZATIONS
+#ifdef RTE_SCHED_VECTOR
 
 static inline int
 grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)
-- 
2.1.4



More information about the dev mailing list