- int min_prio =
- sched_get_priority_min(cfg->mac2phy_worker.thread_sched_policy);
- int max_prio =
- sched_get_priority_max(cfg->mac2phy_worker.thread_sched_policy);
- entry =
- rte_cfgfile_get_entry(cfg_file, "MAC2PHY_WORKER", "thread_priority");
- if (entry) {
- cfg->mac2phy_worker.thread_priority = (uint8_t) atoi(entry);
- if (cfg->mac2phy_worker.thread_priority < min_prio &&
- cfg->mac2phy_worker.thread_priority > max_prio) {
- printf("Thread priority valid range is %d to %d: configured: %d\n",
- min_prio, max_prio, cfg->mac2phy_worker.thread_priority);
- exit(-1);
- }
- }
-
- entry = rte_cfgfile_get_entry(cfg_file, "PHY2MAC_WORKER", "core_id");
- if (entry) {
- cfg->phy2mac_worker.core_id = (uint8_t) atoi(entry);
- if (cfg->phy2mac_worker.core_id >= (uint8_t) num_cpus) {
- printf("Core Id is not in the range 0 to %d configured: %d\n",
- num_cpus, cfg->phy2mac_worker.core_id);
- exit(-1);
- }
- }
-
- entry =
- rte_cfgfile_get_entry(cfg_file, "PHY2MAC_WORKER",
- "thread_sched_policy");
- if (entry) {
- cfg->phy2mac_worker.thread_sched_policy = (uint8_t) atoi(entry);
- if (cfg->phy2mac_worker.thread_sched_policy != SCHED_FIFO &&
- cfg->phy2mac_worker.thread_sched_policy != SCHED_RR) {
- printf("Thread Policy valid range is Schedule Policy [1: SCHED_FIFO"
- " 2: SCHED_RR] configured: %d\n",
- cfg->phy2mac_worker.thread_sched_policy);
- exit(-1);
- }
- }
-
- entry =
- rte_cfgfile_get_entry(cfg_file, "PHY2MAC_WORKER", "thread_priority");
- if (entry) {
- cfg->phy2mac_worker.thread_priority = (uint8_t) atoi(entry);
- if (cfg->phy2mac_worker.thread_priority < min_prio &&
- cfg->phy2mac_worker.thread_priority > max_prio) {
- printf("Thread priority valid range is %d to %d configured: %d\n",
- min_prio, max_prio, cfg->phy2mac_worker.thread_priority);
- exit(-1);
- }
- }
-
- entry = rte_cfgfile_get_entry(cfg_file, "URLLC_WORKER", "core_id");
- if (entry) {
- cfg->urllc_worker.core_id = (uint8_t) atoi(entry);
- if (cfg->urllc_worker.core_id >= (uint8_t) num_cpus) {
- printf("Core Id is not in the range 0 to %d configured: %d\n",
- num_cpus, cfg->urllc_worker.core_id);
- exit(-1);
- }
- }
-
- entry =
- rte_cfgfile_get_entry(cfg_file, "URLLC_WORKER", "thread_sched_policy");
- if (entry) {
- cfg->urllc_worker.thread_sched_policy = (uint8_t) atoi(entry);
- if (cfg->urllc_worker.thread_sched_policy != SCHED_FIFO &&
- cfg->urllc_worker.thread_sched_policy != SCHED_RR) {
- printf("Thread Policy valid range is Schedule Policy [1: SCHED_FIFO"
- " 2: SCHED_RR] configured: %d\n",
- cfg->urllc_worker.thread_sched_policy);
- exit(-1);
- }
- }
-
- entry =
- rte_cfgfile_get_entry(cfg_file, "URLLC_WORKER", "thread_priority");
- if (entry) {
- cfg->urllc_worker.thread_priority = (uint8_t) atoi(entry);
- if (cfg->urllc_worker.thread_priority < min_prio &&
- cfg->urllc_worker.thread_priority > max_prio) {
- printf("Thread priority valid range is %d to %d configured: %d\n",
- min_prio, max_prio, cfg->urllc_worker.thread_priority);
- exit(-1);
- }
- }