MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_cpu_get_flag_enabled

Function rte_cpu_get_flag_enabled

dpdk/lib/eal/ppc/rte_cpuflags.c:88–103  ·  view source on GitHub ↗

* Checks if a particular flag is available on current machine. */

Source from the content-addressed store, hash-verified

86 * Checks if a particular flag is available on current machine.
87 */
88int
89rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature)
90{
91 const struct feature_entry *feat;
92 hwcap_registers_t regs = {0};
93
94 if ((unsigned int)feature >= RTE_DIM(rte_cpu_feature_table))
95 return -ENOENT;
96
97 feat = &rte_cpu_feature_table[feature];
98 if (feat->reg == REG_NONE)
99 return -EFAULT;
100
101 rte_cpu_get_features(regs);
102 return (regs[feat->reg] >> feat->bit) & 1;
103}
104
105const char *
106rte_cpu_get_flag_name(enum rte_cpu_flag_t feature)

Callers 15

get_vector_fnFunction · 0.50
get_vector_fnFunction · 0.50
rte_member_create_sketchFunction · 0.50
rte_member_create_htFunction · 0.50
rte_thash_gfni_supportedFunction · 0.50
rte_fbk_hash_createFunction · 0.50
rte_hash_createFunction · 0.50
rte_hash_crc_set_algFunction · 0.50
rte_efd_createFunction · 0.50
rte_cpu_is_supportedFunction · 0.50
acl_check_alg_armFunction · 0.50

Calls 1

rte_cpu_get_featuresFunction · 0.70

Tested by

no test coverage detected