[RFC PATCH 1/2] power: fix power library with --lcores
Stephen Hemminger
stephen at networkplumber.org
Wed Jul 24 16:39:32 CEST 2024
On Wed, 24 Jul 2024 13:03:35 +0000
Sivaprasad Tummala <sivaprasad.tummala at amd.com> wrote:
> + lcore_cpus = rte_lcore_cpuset(lcore_id);
> + if (CPU_COUNT(&lcore_cpus) != 1) {
> + POWER_LOG(ERR, "Power library doesn't support lcore %u mapping "
> + "to %u cpus", lcore_id, CPU_COUNT(&lcore_cpus));
> + return -1;
> + }
> + for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
> + if (CPU_ISSET(cpu, &lcore_cpus))
> + break;
> + }
You are copy and pasting the same code into multiple places which
indicates it should be an API function.
More information about the dev
mailing list