From 1ec5839e1fda85b58e8cb18c768fc24dac5554aa Mon Sep 17 00:00:00 2001 From: gene Date: Fri, 25 Apr 1997 22:15:27 +0000 Subject: Cool. Drop oversized packets rather than splitting into mbufs. NetBSD log: >From Mycroft: If we fail to allocate a cluster to hold a large packet, >simply drop it rather than using a chain of tiny mbufs. --- sys/arch/mac68k/dev/if_ae.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c index e2a2dcb4fd5..b86ffde3894 100644 --- a/sys/arch/mac68k/dev/if_ae.c +++ b/sys/arch/mac68k/dev/if_ae.c @@ -1,5 +1,5 @@ -/* $OpenBSD: if_ae.c,v 1.12 1997/04/17 17:46:41 gene Exp $ */ -/* $NetBSD: if_ae.c,v 1.61 1997/04/14 16:28:34 scottr Exp $ */ +/* $OpenBSD: if_ae.c,v 1.13 1997/04/25 22:15:26 gene Exp $ */ +/* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -960,8 +960,11 @@ aeget(sc, src, total_len) } if (total_len >= MINCLSIZE) { MCLGET(m, M_DONTWAIT); - if (m->m_flags & M_EXT) - len = MCLBYTES; + if ((m->m_flags & M_EXT) == 0) { + m_freem(top); + return 0; + } + len = MCLBYTES; } m->m_len = len = min(total_len, len); src = ae_ring_copy(sc, src, mtod(m, caddr_t), len); -- cgit v1.2.3