From bf2556cfad12b040393aa6a33ea80a5adb0b51d6 Mon Sep 17 00:00:00 2001 From: luigi Date: Fri, 14 Dec 2001 05:56:35 +0000 Subject: Remove printf's on mbuf/cluster allocation failures. There are now equivalent and less dangerous (rate limited) messages in the mbuf allocation code. MFC after: 3 days --- sys/dev/sf/if_sf.c | 7 +------ sys/dev/sk/if_sk.c | 5 +---- sys/dev/ti/if_ti.c | 7 +------ sys/dev/vr/if_vr.c | 7 +------ 4 files changed, 4 insertions(+), 22 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index 487b48f..8ebc2f5b 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -908,16 +908,11 @@ static int sf_newbuf(sc, c, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("sf%d: no memory for rx list -- " - "packet dropped!\n", sc->sf_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("sf%d: no memory for rx list -- " - "packet dropped!\n", sc->sf_unit); m_freem(m_new); return(ENOBUFS); } diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 8604209..5ba23f5 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -672,11 +672,8 @@ static int sk_newbuf(sc_if, c, m) caddr_t *buf = NULL; MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("sk%d: no memory for rx list -- " - "packet dropped!\n", sc_if->sk_unit); + if (m_new == NULL) return(ENOBUFS); - } /* Allocate the jumbo buffer */ buf = sk_jalloc(sc_if); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 98b9b64..106f065 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -700,16 +700,11 @@ static int ti_newbuf_std(sc, i, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("ti%d: mbuf allocation failed " - "-- packet dropped!\n", sc->ti_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("ti%d: cluster allocation failed " - "-- packet dropped!\n", sc->ti_unit); m_freem(m_new); return(ENOBUFS); } diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index f037294..0956396 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -924,16 +924,11 @@ static int vr_newbuf(sc, c, m) if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) { - printf("vr%d: no memory for rx list " - "-- packet dropped!\n", sc->vr_unit); + if (m_new == NULL) return(ENOBUFS); - } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("vr%d: no memory for rx list " - "-- packet dropped!\n", sc->vr_unit); m_freem(m_new); return(ENOBUFS); } -- cgit v1.1