LCOV - code coverage report
Current view: top level - root/contrail/vrouter/dpdk - vr_dpdk_cpuflags.c (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 14 14 100.0 %
Date: 2026-08-03 02:19:58 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright(c) 2018 Intel Corporation
       3             :  */
       4             : 
       5             : #include "vr_types.h"
       6             : #include "vr_cpuid.h"
       7             : 
       8             : #include "rte_cpuflags.h"
       9             : 
      10             : struct vr_cpu_type_t vr_cpu_type;
      11             : 
      12          53 : void vr_dpdk_init_cpuid(struct vr_cpu_type_t *cpu)
      13             : {
      14          53 :     memset(cpu, 0, sizeof(struct vr_cpu_type_t));
      15             : #ifdef __VR_X86_64__
      16          53 :     cpu->has_sse = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE);
      17          53 :     cpu->has_sse2 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE2);
      18          53 :     cpu->has_sse3 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE3);
      19          53 :     cpu->has_ssse3 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSSE3);
      20          53 :     cpu->has_sse41 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_1);
      21          53 :     cpu->has_sse42 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_2);
      22          53 :     cpu->has_popcnt = rte_cpu_get_flag_enabled(RTE_CPUFLAG_POPCNT);
      23          53 :     cpu->has_rtm = rte_cpu_get_flag_enabled(RTE_CPUFLAG_RTM);
      24          53 :     cpu->has_avx = rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX);
      25          53 :     cpu->has_avx2 = rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2);
      26          53 :     cpu->has_avx512f = rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F);
      27             : #endif
      28          53 : }
      29             : 

Generated by: LCOV version 1.14