Date: Tue, 17 Feb 2009 15:39:16 +0000 (UTC) From: Rafal Jaworowski <raj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188713 - head/sys/dev/tsec Message-ID: <200902171539.n1HFdGB8018653@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: raj Date: Tue Feb 17 15:39:16 2009 New Revision: 188713 URL: http://svn.freebsd.org/changeset/base/188713 Log: 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 Modified: head/sys/dev/tsec/if_tsec.c Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Tue Feb 17 14:59:47 2009 (r188712) +++ head/sys/dev/tsec/if_tsec.c Tue Feb 17 15:39:16 2009 (r188713) @@ -1332,7 +1332,12 @@ tsec_receive_intr_locked(struct tsec_sof 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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902171539.n1HFdGB8018653>