summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/cpu.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-05-06 17:34:49 +0200
committerDamjan Marion <dmarion@me.com>2021-05-07 05:09:27 +0000
commite3e355507508ccbe1a14b78e0654775af8d932fe (patch)
treeebe9c5c8f74cb542da311587de7f35a8be0e8ab3 /src/vppinfra/cpu.c
parentcec1b2776b4b6967d400bc86551765ac7fa4643e (diff)
vppinfra: add universal array mask_compare and compress funcs
Type: improvement Change-Id: I6d812339f626ea630ad9354632d2f9506122d379 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/cpu.c')
-rw-r--r--src/vppinfra/cpu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vppinfra/cpu.c b/src/vppinfra/cpu.c
index d2edc61cfbf..045d1f727f4 100644
--- a/src/vppinfra/cpu.c
+++ b/src/vppinfra/cpu.c
@@ -238,6 +238,18 @@ clib_get_current_numa_node ()
return node;
}
+__clib_export u8 *
+format_march_variant (u8 *s, va_list *args)
+{
+ clib_march_variant_type_t t = va_arg (*args, clib_march_variant_type_t);
+ char *variants[] = { [0] = "default",
+#define _(s, n) [CLIB_MARCH_VARIANT_TYPE_##s] = n,
+ foreach_march_variant
+#undef _
+ };
+ return format (s, "%s", variants[t]);
+}
+
/*
* fd.io coding-style-patch-verification: ON
*