FreeBSD/sys/dev/e1000/if_em.c
/* Combined RX/TX handler, used by Legacy and MSI */
Combined RX/TX handler, used by Legacy and MSI
Combined RX / TX handler used by Legacy and MSI
static void
em_handle_que(void *context, int pending)
{
	struct adapter	*adapter = context;
	if_t ifp = adapter->ifp;
	struct tx_ring	*txr = adapter->tx_rings;
	struct rx_ring	*rxr = adapter->rx_rings;
	if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
		bool more = em_rxeof(rxr, adapter->rx_process_limit, NULL);
		EM_TX_LOCK(txr);
		em_txeof(txr);
#ifdef EM_MULTIQUEUE
		if (!drbr_empty(ifp, txr->br))
			em_mq_start_locked(ifp, txr);
#else
		if (!if_sendq_empty(ifp))
			em_start_locked(ifp, txr);
#endif
		EM_TX_UNLOCK(txr);
		if (more) {
			taskqueue_enqueue(adapter->tq, &adapter->que_task);
			return;
		}
	}
	em_enable_intr(adapter);
	return;
}
static void em_handle_que ( void * context , int pending ) { struct adapter * adapter = context ; if_t ifp = adapter -> ifp ; struct tx_ring * txr = adapter -> tx_rings ; struct rx_ring * rxr = adapter -> rx_rings ; if ( if_getdrvflags ( ifp ) & IFF_DRV_RUNNING ) { bool more = em_rxeof ( rxr , adapter -> rx_process_limit , NULL ) ; EM_TX_LOCK ( txr ) ; em_txeof ( txr ) ; #ifdef EM_MULTIQUEUE if ( ! drbr_empty ( ifp , txr -> br ) ) em_mq_start_locked ( ifp , txr ) ; #else if ( ! if_sendq_empty ( ifp ) ) em_start_locked ( ifp , txr ) ; #endif EM_TX_UNLOCK ( txr ) ; if ( more ) { taskqueue_enqueue ( adapter -> tq , & adapter -> que_task ) ; return ; } } em_enable_intr ( adapter ) ; return ; }
Combined RX/TX handler, used by Legacy and MSI
Combined RX / TX handler used by Legacy and MSI