set IFF_OACTIVE to avoid hangs when the tx ring fills up
This commit is contained in:
parent
0d99488ded
commit
b2dda71e61
@ -1607,6 +1607,11 @@ cxgb_start_tx(struct ifnet *ifp, uint32_t txmax)
|
||||
if (err == 0 && m == NULL)
|
||||
err = ENOBUFS;
|
||||
|
||||
if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC) &&
|
||||
(ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
|
||||
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
|
||||
err = ENOSPC;
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
|
@ -766,6 +766,11 @@ sge_timer_reclaim(void *arg, int ncount)
|
||||
for (i = 0; i < n; i++) {
|
||||
m_freem_vec(m_vec[i]);
|
||||
}
|
||||
if (qs->port->ifp->if_drv_flags & IFF_DRV_OACTIVE &&
|
||||
txq->size - txq->in_use >= TX_START_MAX_DESC) {
|
||||
qs->port->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
|
||||
taskqueue_enqueue(qs->port->tq, &qs->port->start_task);
|
||||
}
|
||||
}
|
||||
|
||||
txq = &qs->txq[TXQ_OFLD];
|
||||
|
Loading…
x
Reference in New Issue
Block a user