[v2,4/4] sched: Removed code defined under VECTOR Defines.

Message ID 20220218093650.2549927-5-megha.ajmera@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series sched: HQoS Library cleanup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Ajmera, Megha Feb. 18, 2022, 9:36 a.m. UTC
  Removed "RTE_SCHED_VECTOR" flag from HQoS.

Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
---
 lib/sched/rte_sched.c | 53 -------------------------------------------
 1 file changed, 53 deletions(-)
  

Comments

Cristian Dumitrescu Feb. 18, 2022, 11:03 a.m. UTC | #1
> -----Original Message-----
> From: Ajmera, Megha <megha.ajmera@intel.com>
> Sent: Friday, February 18, 2022 9:37 AM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>;
> thomas@monjalon.net; david.marchand@redhat.com
> Subject: [PATCH v2 4/4] sched: Removed code defined under VECTOR
> Defines.
> 
> Removed "RTE_SCHED_VECTOR" flag from HQoS.
> 
> Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
> ---
>  lib/sched/rte_sched.c | 53 -------------------------------------------
>  1 file changed, 53 deletions(-)
> 
> diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
> index 807134b48d..8ad5ca7e05 100644
> --- a/lib/sched/rte_sched.c
> +++ b/lib/sched/rte_sched.c
> @@ -24,16 +24,6 @@
>  #pragma warning(disable:2259) /* conversion may lose significant bits */
>  #endif
> 
> -#ifdef RTE_SCHED_VECTOR
> -#include <rte_vect.h>
> -
> -#ifdef RTE_ARCH_X86
> -#define SCHED_VECTOR_SSE4
> -#elif defined(__ARM_NEON)
> -#define SCHED_VECTOR_NEON
> -#endif
> -
> -#endif
> 
>  #ifndef RTE_SCHED_PORT_N_GRINDERS
>  #define RTE_SCHED_PORT_N_GRINDERS 8
> @@ -2446,47 +2436,6 @@ grinder_schedule(struct rte_sched_port *port,
>  	return 1;
>  }
> 
> -#ifdef SCHED_VECTOR_SSE4
> -
> -static inline int
> -grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t
> base_pipe)
> -{
> -	__m128i index = _mm_set1_epi32(base_pipe);
> -	__m128i pipes = _mm_load_si128((__m128i *)subport-
> >grinder_base_bmp_pos);
> -	__m128i res = _mm_cmpeq_epi32(pipes, index);
> -
> -	pipes = _mm_load_si128((__m128i *)(subport-
> >grinder_base_bmp_pos + 4));
> -	pipes = _mm_cmpeq_epi32(pipes, index);
> -	res = _mm_or_si128(res, pipes);
> -
> -	if (_mm_testz_si128(res, res))
> -		return 0;
> -
> -	return 1;
> -}
> -
> -#elif defined(SCHED_VECTOR_NEON)
> -
> -static inline int
> -grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t
> base_pipe)
> -{
> -	uint32x4_t index, pipes;
> -	uint32_t *pos = (uint32_t *)subport->grinder_base_bmp_pos;
> -
> -	index = vmovq_n_u32(base_pipe);
> -	pipes = vld1q_u32(pos);
> -	if (!vminvq_u32(veorq_u32(pipes, index)))
> -		return 1;
> -
> -	pipes = vld1q_u32(pos + 4);
> -	if (!vminvq_u32(veorq_u32(pipes, index)))
> -		return 1;
> -
> -	return 0;
> -}
> -
> -#else
> -
>  static inline int
>  grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t
> base_pipe)
>  {
> @@ -2500,8 +2449,6 @@ grinder_pipe_exists(struct rte_sched_subport
> *subport, uint32_t base_pipe)
>  	return 0;
>  }
> 
> -#endif /* RTE_SCHED_OPTIMIZATIONS */
> -
>  static inline void
>  grinder_pcache_populate(struct rte_sched_subport *subport,
>  	uint32_t pos, uint32_t bmp_pos, uint64_t bmp_slab)
> --
> 2.25.1

Same title comments:
	sched: remove code no longer needed
  

Patch

diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 807134b48d..8ad5ca7e05 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -24,16 +24,6 @@ 
 #pragma warning(disable:2259) /* conversion may lose significant bits */
 #endif
 
-#ifdef RTE_SCHED_VECTOR
-#include <rte_vect.h>
-
-#ifdef RTE_ARCH_X86
-#define SCHED_VECTOR_SSE4
-#elif defined(__ARM_NEON)
-#define SCHED_VECTOR_NEON
-#endif
-
-#endif
 
 #ifndef RTE_SCHED_PORT_N_GRINDERS
 #define RTE_SCHED_PORT_N_GRINDERS 8
@@ -2446,47 +2436,6 @@  grinder_schedule(struct rte_sched_port *port,
 	return 1;
 }
 
-#ifdef SCHED_VECTOR_SSE4
-
-static inline int
-grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)
-{
-	__m128i index = _mm_set1_epi32(base_pipe);
-	__m128i pipes = _mm_load_si128((__m128i *)subport->grinder_base_bmp_pos);
-	__m128i res = _mm_cmpeq_epi32(pipes, index);
-
-	pipes = _mm_load_si128((__m128i *)(subport->grinder_base_bmp_pos + 4));
-	pipes = _mm_cmpeq_epi32(pipes, index);
-	res = _mm_or_si128(res, pipes);
-
-	if (_mm_testz_si128(res, res))
-		return 0;
-
-	return 1;
-}
-
-#elif defined(SCHED_VECTOR_NEON)
-
-static inline int
-grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)
-{
-	uint32x4_t index, pipes;
-	uint32_t *pos = (uint32_t *)subport->grinder_base_bmp_pos;
-
-	index = vmovq_n_u32(base_pipe);
-	pipes = vld1q_u32(pos);
-	if (!vminvq_u32(veorq_u32(pipes, index)))
-		return 1;
-
-	pipes = vld1q_u32(pos + 4);
-	if (!vminvq_u32(veorq_u32(pipes, index)))
-		return 1;
-
-	return 0;
-}
-
-#else
-
 static inline int
 grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)
 {
@@ -2500,8 +2449,6 @@  grinder_pipe_exists(struct rte_sched_subport *subport, uint32_t base_pipe)
 	return 0;
 }
 
-#endif /* RTE_SCHED_OPTIMIZATIONS */
-
 static inline void
 grinder_pcache_populate(struct rte_sched_subport *subport,
 	uint32_t pos, uint32_t bmp_pos, uint64_t bmp_slab)