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

Function sw_stop

dpdk/drivers/event/sw/sw_evdev.c:819–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819static void
820sw_stop(struct rte_eventdev *dev)
821{
822 struct sw_evdev *sw = sw_pmd_priv(dev);
823 int32_t runstate;
824
825 /* Stop the scheduler if it's running */
826 runstate = rte_service_runstate_get(sw->service_id);
827 if (runstate == 1)
828 rte_service_runstate_set(sw->service_id, 0);
829
830 while (rte_service_may_be_active(sw->service_id))
831 rte_pause();
832
833 /* Flush all events out of the device */
834 while (!(sw_qids_empty(sw) && sw_ports_empty(sw))) {
835 sw_event_schedule(dev);
836 sw_drain_ports(dev);
837 sw_drain_queues(dev);
838 }
839
840 sw_clean_qid_iqs(dev);
841 sw_xstats_uninit(sw);
842 sw->started = 0;
843 rte_smp_wmb();
844
845 if (runstate == 1)
846 rte_service_runstate_set(sw->service_id, 1);
847}
848
849static int
850sw_close(struct rte_eventdev *dev)

Callers

nothing calls this directly

Calls 12

sw_pmd_privFunction · 0.85
rte_service_runstate_getFunction · 0.85
rte_service_runstate_setFunction · 0.85
sw_qids_emptyFunction · 0.85
sw_ports_emptyFunction · 0.85
sw_event_scheduleFunction · 0.85
sw_drain_portsFunction · 0.85
sw_drain_queuesFunction · 0.85
sw_clean_qid_iqsFunction · 0.85
sw_xstats_uninitFunction · 0.85
rte_pauseFunction · 0.50

Tested by

no test coverage detected