mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
set IFF_OACTIVE to avoid hangs when the tx ring fills up
This commit is contained in:
parent
0d99488ded
commit
b2dda71e61
2 changed files with 10 additions and 0 deletions
|
|
@ -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…
Reference in a new issue