void sfc_ev_mgmt_qpoll(struct sfc_adapter *sa) { if (rte_spinlock_trylock(&sa->mgmt_evq_lock)) { if (sa->mgmt_evq_running) sfc_ev_qpoll(sa->mgmt_evq); rte_spinlock_unlock(&sa->mgmt_evq_lock); } }
static int event_eth_rx_adapter_service_func(void *args) { struct rte_event_eth_rx_adapter *rx_adapter = args; struct rte_eth_event_enqueue_buffer *buf; buf = &rx_adapter->event_enqueue_buffer; if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0) return 0; if (eth_rx_poll(rx_adapter) == 0 && buf->count) flush_event_buffer(rx_adapter); rte_spinlock_unlock(&rx_adapter->rx_lock); return 0; }