bge0: discard frame w/o packet header
jdp at polstra.com
Thu Feb 15 22:40:41 UTC 2007
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
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.
More information about the freebsd-net