Emit a warning if the mbuf or mbuf cluster allocation failed.

Requested by: Mike Barcroft
This commit is contained in:
Jonathan Lemon 2001-11-02 05:10:40 +00:00
parent f23badd91d
commit d9cdd9607f

View File

@ -1767,6 +1767,8 @@ fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
if (m != NULL) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
device_printf(sc->dev,
"cluster allocation failed, packet dropped!\n");
m_freem(m);
if (oldm == NULL)
return 1;
@ -1774,6 +1776,8 @@ fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
m->m_data = m->m_ext.ext_buf;
}
} else {
device_printf(sc->dev,
"mbuf allocation failed, packet dropped!\n");
if (oldm == NULL)
return 1;
m = oldm;