Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/if_ix.c
Show First 20 Lines • Show All 1,189 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
ixgbe_handle_que(void *context, int pending) | ixgbe_handle_que(void *context, int pending) | ||||
{ | { | ||||
struct ix_queue *que = context; | struct ix_queue *que = context; | ||||
struct adapter *adapter = que->adapter; | struct adapter *adapter = que->adapter; | ||||
struct tx_ring *txr = que->txr; | struct tx_ring *txr = que->txr; | ||||
struct ifnet *ifp = adapter->ifp; | struct ifnet *ifp = adapter->ifp; | ||||
bool more; | |||||
if (ifp->if_drv_flags & IFF_DRV_RUNNING) { | if (ifp->if_drv_flags & IFF_DRV_RUNNING) { | ||||
ixgbe_rxeof(que); | more = ixgbe_rxeof(que); | ||||
IXGBE_TX_LOCK(txr); | IXGBE_TX_LOCK(txr); | ||||
ixgbe_txeof(txr); | ixgbe_txeof(txr); | ||||
#ifndef IXGBE_LEGACY_TX | #ifndef IXGBE_LEGACY_TX | ||||
if (!drbr_empty(ifp, txr->br)) | if (!drbr_empty(ifp, txr->br)) | ||||
ixgbe_mq_start_locked(ifp, txr); | ixgbe_mq_start_locked(ifp, txr); | ||||
#else | #else | ||||
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) | if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) | ||||
ixgbe_start_locked(txr, ifp); | ixgbe_start_locked(txr, ifp); | ||||
#endif | #endif | ||||
IXGBE_TX_UNLOCK(txr); | IXGBE_TX_UNLOCK(txr); | ||||
if (more) { | |||||
taskqueue_enqueue(que->tq, &que->que_task); | |||||
return; | |||||
} | |||||
} | } | ||||
/* Reenable this interrupt */ | /* Reenable this interrupt */ | ||||
if (que->res != NULL) | if (que->res != NULL) | ||||
ixgbe_enable_queue(adapter, que->msix); | ixgbe_enable_queue(adapter, que->msix); | ||||
else | else | ||||
ixgbe_enable_intr(adapter); | ixgbe_enable_intr(adapter); | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 2,949 Lines • Show Last 20 Lines |