Thread (276 messages) 276 messages, 29 authors, 2020-10-16

Re: [dpdk-dev] [PATCH 20.11 02/12] eal: add default SIMD bitwidth values

From: David Christensen <hidden>
Date: 2020-08-07 17:00:08


On 8/7/20 9:31 AM, David Christensen wrote:
On 8/7/20 8:58 AM, Ciara Power wrote:
quoted
Each arch has a define for the default SIMD bitwidth value, this is used
on EAL init to set the config max SIMD bitwidth.
What's the intended use case?
quoted
Cc: Ruifeng Wang <redacted>
Cc: Jerin Jacob <redacted>
Cc: Honnappa Nagarahalli <redacted>
Cc: David Christensen <redacted>

Signed-off-by: Ciara Power <redacted>
---
  lib/librte_eal/arm/include/rte_vect.h      | 2 ++
  lib/librte_eal/common/eal_common_options.c | 3 +++
  lib/librte_eal/include/generic/rte_vect.h  | 2 ++
  lib/librte_eal/ppc/include/rte_vect.h      | 2 ++
  lib/librte_eal/x86/include/rte_vect.h      | 2 ++
  5 files changed, 11 insertions(+)
diff --git a/lib/librte_eal/arm/include/rte_vect.h 
b/lib/librte_eal/arm/include/rte_vect.h
index 01c51712a1..7487a53862 100644
--- a/lib/librte_eal/arm/include/rte_vect.h
+++ b/lib/librte_eal/arm/include/rte_vect.h
@@ -14,6 +14,8 @@
  extern "C" {
  #endif

+#define RTE_DEFAULT_SIMD_BITWIDTH 256
+
  typedef int32x4_t xmm_t;

  #define    XMM_SIZE    (sizeof(xmm_t))
diff --git a/lib/librte_eal/common/eal_common_options.c 
b/lib/librte_eal/common/eal_common_options.c
index 90f4e8f5c3..c2a9624f89 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -35,6 +35,7 @@
  #ifndef RTE_EXEC_ENV_WINDOWS
  #include <rte_telemetry.h>
  #endif
+#include <rte_vect.h>

  #include "eal_internal_cfg.h"
  #include "eal_options.h"
@@ -344,6 +345,8 @@ eal_reset_internal_config(struct internal_config 
*internal_cfg)
      internal_cfg->user_mbuf_pool_ops_name = NULL;
      CPU_ZERO(&internal_cfg->ctrl_cpuset);
      internal_cfg->init_complete = 0;
+    internal_cfg->max_simd_bitwidth.bitwidth = 
RTE_DEFAULT_SIMD_BITWIDTH;
+    internal_cfg->max_simd_bitwidth.locked = 0;
  }
Build error on HEAD:

../lib/librte_eal/common/eal_common_options.c: In function 
‘eal_reset_internal_config’:
../lib/librte_eal/common/eal_common_options.c:347:14: error: ‘struct 
internal_config’ has no member named ‘max_simd_bitwidth’
   internal_cfg->max_simd_bitwidth.bitwidth = RTE_DEFAULT_SIMD_BITWIDTH;
               ^~
../lib/librte_eal/common/eal_common_options.c:348:14: error: ‘struct 
internal_config’ has no member named ‘max_simd_bitwidth’
   internal_cfg->max_simd_bitwidth.locked = 0;
               ^~
Sorry, jumped the gun when testing the patch, missed the preceeding patch.

Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help