Date: Thu, 15 Feb 2007 14:40:40 -0800 (PST) From: John Polstra <jdp@polstra.com> To: Kip Macy <kip.macy@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: bge0: discard frame w/o packet header Message-ID: <XFMail.20070215144040.jdp@polstra.com> In-Reply-To: <b1fa29170702151350r32f6a356kb5cc463b43e6ae5a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15-Feb-2007 Kip Macy wrote: > I mean a bug in if_bge.c - there are a lot of ways that this could > happen - not calling M_GETHDR, mis-calling m_pullup etc. There's no obvious bug in that part of the driver, but I'm going to instrument it on the offending system to try to find out just what's going on. When a packet is received, the driver allocates an mbuf to replace the one that the received packet occupied. It does that in one of two ways. The normal case is to call m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR). For that to return an mbuf without M_PKTHDR set would require a pretty serious bug in the mbuf or UMA code. The less common case is that the driver discards the just-received packet and reuses the mbuf it occupied. It does that if the m_getcl call failed (i.e., we are out of mbufs) or if the flags in the descriptor show that the just-received packet had errors. If there's a driver bug it's probably in this code path, but I don't see it yet. Hopefully, the diagnostics I've added will point to the problem. John
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20070215144040.jdp>