X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fspdk%2Fdpdk%2Fexamples%2Fservice_cores%2Fmain.c;h=c7c792810d998a3c035e11f7321fbc651b8a8374;hb=9f95a23ce0ce15b5cd2b85dc8aaf3906fbf7f463;hp=2cd572904269dbfbd6733b55602214b05dcacf4c;hpb=048b4641096fe966f6d4b1d982fa5ebd37d72d84;p=ceph.git diff --git a/ceph/src/spdk/dpdk/examples/service_cores/main.c b/ceph/src/spdk/dpdk/examples/service_cores/main.c index 2cd572904..c7c792810 100644 --- a/ceph/src/spdk/dpdk/examples/service_cores/main.c +++ b/ceph/src/spdk/dpdk/examples/service_cores/main.c @@ -118,6 +118,12 @@ apply_profile(int profile_id) struct profile *p = &profiles[profile_id]; const uint8_t core_off = 1; + if (p->num_cores > rte_lcore_count() + 1) { + printf("insufficent cores to run (%s)", + p->name); + return; + } + for (i = 0; i < p->num_cores; i++) { uint32_t core = i + core_off; ret = rte_service_lcore_add(core);