Address the LOD that some are seeing, put the RX lock
back in rxeof (I could see little point in taking it out), and now release it before the stack entry. Also, make it so the 82574 does not configure for multiqueue when its not used in the stack.
This commit is contained in:
parent
5b51584fbc
commit
1b3b15fdbb
@ -347,8 +347,13 @@ static int em_debug_sbp = FALSE;
|
||||
TUNABLE_INT("hw.em.sbp", &em_debug_sbp);
|
||||
|
||||
/* Local controls for MSI/MSIX */
|
||||
#ifdef EM_MULTIQUEUE
|
||||
static int em_enable_msix = TRUE;
|
||||
static int em_msix_queues = 2; /* for 82574, can be 1 or 2 */
|
||||
#else
|
||||
static int em_enable_msix = FALSE;
|
||||
static int em_msix_queues = 0; /* disable */
|
||||
#endif
|
||||
TUNABLE_INT("hw.em.enable_msix", &em_enable_msix);
|
||||
TUNABLE_INT("hw.em.msix_queues", &em_msix_queues);
|
||||
|
||||
@ -1371,9 +1376,7 @@ em_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
|
||||
}
|
||||
EM_CORE_UNLOCK(adapter);
|
||||
|
||||
EM_RX_LOCK(rxr);
|
||||
rx_done = em_rxeof(rxr, count);
|
||||
EM_RX_UNLOCK(rxr);
|
||||
|
||||
EM_TX_LOCK(txr);
|
||||
em_txeof(txr);
|
||||
@ -1449,9 +1452,7 @@ em_handle_que(void *context, int pending)
|
||||
|
||||
|
||||
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
|
||||
EM_RX_LOCK(rxr);
|
||||
more_rx = em_rxeof(rxr, adapter->rx_process_limit);
|
||||
EM_RX_UNLOCK(rxr);
|
||||
|
||||
EM_TX_LOCK(txr);
|
||||
em_txeof(txr);
|
||||
@ -1511,10 +1512,8 @@ em_msix_rx(void *arg)
|
||||
struct adapter *adapter = rxr->adapter;
|
||||
bool more;
|
||||
|
||||
EM_RX_LOCK(rxr);
|
||||
++rxr->rx_irq;
|
||||
more = em_rxeof(rxr, adapter->rx_process_limit);
|
||||
EM_RX_UNLOCK(rxr);
|
||||
if (more)
|
||||
taskqueue_enqueue(rxr->tq, &rxr->rx_task);
|
||||
else
|
||||
@ -1553,9 +1552,7 @@ em_handle_rx(void *context, int pending)
|
||||
struct adapter *adapter = rxr->adapter;
|
||||
bool more;
|
||||
|
||||
EM_RX_LOCK(rxr);
|
||||
more = em_rxeof(rxr, adapter->rx_process_limit);
|
||||
EM_RX_UNLOCK(rxr);
|
||||
if (more)
|
||||
taskqueue_enqueue(rxr->tq, &rxr->rx_task);
|
||||
else
|
||||
@ -4100,7 +4097,7 @@ em_rxeof(struct rx_ring *rxr, int count)
|
||||
bool eop;
|
||||
struct e1000_rx_desc *cur;
|
||||
|
||||
EM_RX_LOCK_ASSERT(rxr);
|
||||
EM_RX_LOCK(rxr);
|
||||
|
||||
for (i = rxr->next_to_check, processed = 0; count != 0;) {
|
||||
|
||||
@ -4194,8 +4191,13 @@ skip:
|
||||
i = 0;
|
||||
|
||||
/* Send to the stack */
|
||||
if (sendmp != NULL)
|
||||
if (sendmp != NULL) {
|
||||
rxr->next_to_check = i;
|
||||
EM_RX_UNLOCK(rxr);
|
||||
(*ifp->if_input)(ifp, sendmp);
|
||||
EM_RX_LOCK(rxr);
|
||||
i = rxr->next_to_check;
|
||||
}
|
||||
|
||||
/* Only refresh mbufs every 8 descriptors */
|
||||
if (processed == 8) {
|
||||
@ -4211,6 +4213,7 @@ skip:
|
||||
}
|
||||
|
||||
rxr->next_to_check = i;
|
||||
EM_RX_UNLOCK(rxr);
|
||||
|
||||
#ifdef DEVICE_POLLING
|
||||
return (rxdone);
|
||||
|
Loading…
x
Reference in New Issue
Block a user