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

Function sfc_ev_start

dpdk/drivers/net/sfc/sfc_ev.c:817–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815}
816
817int
818sfc_ev_start(struct sfc_adapter *sa)
819{
820 int rc;
821
822 sfc_log_init(sa, "entry");
823
824 rc = efx_ev_init(sa->nic);
825 if (rc != 0)
826 goto fail_ev_init;
827
828 /* Start management EVQ used for global events */
829
830 /*
831 * Management event queue start polls the queue, but it cannot
832 * interfere with other polling contexts since mgmt_evq_running
833 * is false yet.
834 */
835 rc = sfc_ev_qstart(sa->mgmt_evq, sa->mgmt_evq_index);
836 if (rc != 0)
837 goto fail_mgmt_evq_start;
838
839 rte_spinlock_lock(&sa->mgmt_evq_lock);
840 sa->mgmt_evq_running = true;
841 rte_spinlock_unlock(&sa->mgmt_evq_lock);
842
843 if (sa->intr.lsc_intr) {
844 rc = sfc_ev_qprime(sa->mgmt_evq);
845 if (rc != 0)
846 goto fail_mgmt_evq_prime;
847 }
848
849 /*
850 * Start management EVQ polling. If interrupts are disabled
851 * (not used), it is required to process link status change
852 * and other device level events to avoid unrecoverable
853 * error because the event queue overflow.
854 */
855 sfc_ev_mgmt_periodic_qpoll_start(sa);
856
857 /*
858 * Rx/Tx event queues are started/stopped when corresponding
859 * Rx/Tx queue is started/stopped.
860 */
861
862 return 0;
863
864fail_mgmt_evq_prime:
865 sfc_ev_qstop(sa->mgmt_evq);
866
867fail_mgmt_evq_start:
868 efx_ev_fini(sa->nic);
869
870fail_ev_init:
871 sfc_log_init(sa, "failed %d", rc);
872 return rc;
873}
874

Callers 1

sfc_try_startFunction · 0.85

Calls 8

efx_ev_initFunction · 0.85
sfc_ev_qstartFunction · 0.85
sfc_ev_qprimeFunction · 0.85
sfc_ev_qstopFunction · 0.85
efx_ev_finiFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected