Handle mbuf exhaustion scenario in tsec(4).

Without this fix the system would hang under heavy networking load.

Submitted by:	Leon Theunissen leon ! parsec dot co dot za
This commit is contained in:
Rafal Jaworowski 2009-02-17 15:39:16 +00:00
parent 64f90c9dff
commit ab160495d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188713

View File

@ -1332,7 +1332,12 @@ tsec_receive_intr_locked(struct tsec_softc *sc, int count)
if (tsec_new_rxbuf(sc->tsec_rx_mtag, rx_data[i].map,
&rx_data[i].mbuf, &rx_data[i].paddr)) {
ifp->if_ierrors++;
continue;
/*
* We ran out of mbufs; didn't consume current
* descriptor and have to return it to the queue.
*/
TSEC_BACK_CUR_RX_DESC(sc);
break;
}
/* Attach new buffer to descriptor and clear flags */