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

Function swtim_service_func

dpdk/lib/eventdev/rte_event_timer_adapter.c:838–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838static int
839swtim_service_func(void *arg)
840{
841 struct rte_event_timer_adapter *adapter = arg;
842 struct swtim *sw = swtim_pmd_priv(adapter);
843 uint16_t nb_evs_flushed = 0;
844 uint16_t nb_evs_invalid = 0;
845 const uint64_t prior_enq_count = sw->stats.ev_enq_count;
846
847 if (swtim_did_tick(sw)) {
848 rte_timer_alt_manage(sw->timer_data_id,
849 (unsigned int *)(uintptr_t)sw->poll_lcores,
850 sw->n_poll_lcores,
851 swtim_callback);
852
853 /* Return expired timer objects back to mempool */
854 rte_mempool_put_bulk(sw->tim_pool, (void **)sw->expired_timers,
855 sw->n_expired_timers);
856 sw->n_expired_timers = 0;
857
858 sw->stats.adapter_tick_count++;
859 }
860
861 event_buffer_flush(&sw->buffer,
862 adapter->data->event_dev_id,
863 adapter->data->event_port_id,
864 &nb_evs_flushed,
865 &nb_evs_invalid);
866
867 sw->stats.ev_enq_count += nb_evs_flushed;
868 sw->stats.ev_inv_count += nb_evs_invalid;
869
870 rte_event_maintain(adapter->data->event_dev_id,
871 adapter->data->event_port_id, 0);
872
873 return prior_enq_count == sw->stats.ev_enq_count ? -EAGAIN : 0;
874}
875
876/* The adapter initialization function rounds the mempool size up to the next
877 * power of 2, so we can take the difference between that value and what the

Callers

nothing calls this directly

Calls 6

swtim_pmd_privFunction · 0.85
swtim_did_tickFunction · 0.85
rte_timer_alt_manageFunction · 0.85
rte_mempool_put_bulkFunction · 0.85
event_buffer_flushFunction · 0.85
rte_event_maintainFunction · 0.85

Tested by

no test coverage detected