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/arm/rte_cpuflags.c:137–152  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

135 * Checks if a particular flag is available on current machine.
136 */
137int
138rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature)
139{
140 const struct feature_entry *feat;
141 hwcap_registers_t regs = {0};
142
143 if ((unsigned int)feature >= RTE_DIM(rte_cpu_feature_table))
144 return -ENOENT;
145
146 feat = &rte_cpu_feature_table[feature];
147 if (feat->reg == REG_NONE)
148 return -EFAULT;
149
150 rte_cpu_get_features(regs);
151 return (regs[feat->reg] >> feat->bit) & 1;
152}
153
154const char *
155rte_cpu_get_flag_name(enum rte_cpu_flag_t feature)

Callers

nothing calls this directly

Calls 1

rte_cpu_get_featuresFunction · 0.70

Tested by

no test coverage detected