| 187 | } |
| 188 | |
| 189 | static inline void |
| 190 | queue_reset(struct pmd_core_cfg *cfg, struct queue_list_entry *qcfg) |
| 191 | { |
| 192 | const bool is_ready_to_sleep = qcfg->n_sleeps == cfg->sleep_target; |
| 193 | |
| 194 | /* reset empty poll counter for this queue */ |
| 195 | qcfg->n_empty_polls = 0; |
| 196 | /* reset the queue sleep counter as well */ |
| 197 | qcfg->n_sleeps = 0; |
| 198 | /* remove the queue from list of queues ready to sleep */ |
| 199 | if (is_ready_to_sleep) |
| 200 | cfg->n_queues_ready_to_sleep--; |
| 201 | /* |
| 202 | * no need change the lcore sleep target counter because this lcore will |
| 203 | * reach the n_sleeps anyway, and the other cores are already counted so |
| 204 | * there's no need to do anything else. |
| 205 | */ |
| 206 | } |
| 207 | |
| 208 | static inline bool |
| 209 | queue_can_sleep(struct pmd_core_cfg *cfg, struct queue_list_entry *qcfg) |
no outgoing calls
no test coverage detected