Remove error messages on mbuf allocation failures, now

this is done more safely in kern/subr_mbuf.c

Two-days'-delay-thanks-to: @home shutting down service
This commit is contained in:
Luigi Rizzo 2001-12-04 02:30:53 +00:00
parent 1c4c22583c
commit 40129585e3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87330
3 changed files with 5 additions and 26 deletions

View File

@ -2272,16 +2272,11 @@ static int dc_newbuf(sc, i, m)
if (m == NULL) {
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("dc%d: no memory for rx list "
"-- packet dropped!\n", sc->dc_unit);
if (m_new == NULL)
return(ENOBUFS);
}
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("dc%d: no memory for rx list "
"-- packet dropped!\n", sc->dc_unit);
m_freem(m_new);
return(ENOBUFS);
}
@ -2949,15 +2944,12 @@ static int dc_coal(sc, m_head)
m = *m_head;
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("dc%d: no memory for tx list", sc->dc_unit);
if (m_new == NULL)
return(ENOBUFS);
}
if (m->m_pkthdr.len > MHLEN) {
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("dc%d: no memory for tx list", sc->dc_unit);
return(ENOBUFS);
}
}

View File

@ -2272,16 +2272,11 @@ static int dc_newbuf(sc, i, m)
if (m == NULL) {
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("dc%d: no memory for rx list "
"-- packet dropped!\n", sc->dc_unit);
if (m_new == NULL)
return(ENOBUFS);
}
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("dc%d: no memory for rx list "
"-- packet dropped!\n", sc->dc_unit);
m_freem(m_new);
return(ENOBUFS);
}
@ -2949,15 +2944,12 @@ static int dc_coal(sc, m_head)
m = *m_head;
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("dc%d: no memory for tx list", sc->dc_unit);
if (m_new == NULL)
return(ENOBUFS);
}
if (m->m_pkthdr.len > MHLEN) {
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("dc%d: no memory for tx list", sc->dc_unit);
return(ENOBUFS);
}
}

View File

@ -1217,16 +1217,11 @@ static int sis_newbuf(sc, c, m)
if (m == NULL) {
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("sis%d: no memory for rx list "
"-- packet dropped!\n", sc->sis_unit);
if (m_new == NULL)
return(ENOBUFS);
}
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("sis%d: no memory for rx list "
"-- packet dropped!\n", sc->sis_unit);
m_freem(m_new);
return(ENOBUFS);
}