MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clb_multiwait

Function clb_multiwait

dpdk/lib/power/rte_power_pmd_mgmt.c:250–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250static uint16_t
251clb_multiwait(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
252 struct rte_mbuf **pkts __rte_unused, uint16_t nb_rx,
253 uint16_t max_pkts __rte_unused, void *arg)
254{
255 const unsigned int lcore = rte_lcore_id();
256 struct queue_list_entry *queue_conf = arg;
257 struct pmd_core_cfg *lcore_conf;
258 const bool empty = nb_rx == 0;
259
260 lcore_conf = &lcore_cfgs[lcore];
261
262 /* early exit */
263 if (likely(!empty))
264 /* early exit */
265 queue_reset(lcore_conf, queue_conf);
266 else {
267 struct rte_power_monitor_cond pmc[lcore_conf->n_queues];
268 int ret;
269
270 /* can this queue sleep? */
271 if (!queue_can_sleep(lcore_conf, queue_conf))
272 return nb_rx;
273
274 /* can this lcore sleep? */
275 if (!lcore_can_sleep(lcore_conf))
276 return nb_rx;
277
278 /* gather all monitoring conditions */
279 ret = get_monitor_addresses(lcore_conf, pmc,
280 lcore_conf->n_queues);
281 if (ret < 0)
282 return nb_rx;
283
284 rte_power_monitor_multi(pmc, lcore_conf->n_queues, UINT64_MAX);
285 }
286
287 return nb_rx;
288}
289
290static uint16_t
291clb_umwait(uint16_t port_id, uint16_t qidx, struct rte_mbuf **pkts __rte_unused,

Callers

nothing calls this directly

Calls 6

rte_lcore_idFunction · 0.85
queue_resetFunction · 0.85
queue_can_sleepFunction · 0.85
lcore_can_sleepFunction · 0.85
get_monitor_addressesFunction · 0.85
rte_power_monitor_multiFunction · 0.50

Tested by

no test coverage detected