Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 1999 11:14:56 -0700 (PDT)
From:      wpaul@FreeBSD.ORG
To:        wollman@khavrinen.lcs.mit.edu, wpaul@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/13793
Message-ID:  <19990917181456.4D7BB154CF@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Synopsis: ti driver truncates some packets

State-Changed-From-To: open->closed
State-Changed-By: wpaul
State-Changed-When: Fri Sep 17 11:06:49 PDT 1999
State-Changed-Why: 

The bug here was that I was initializing the maximum packet size for the
mini receive ring incorrectly. The maximum length determines how small a
packet has to be in order for it to be DMAed into the mini receive ring
instead of the normal ring. I set the length to MHLEN, however the mini
ring receive buffers are actually sized at MHLEN - ETHER_ALIGN; the first
two bytes are shaved off in order to produce proper payload alignment.
It happens that MHLEN is 96, so frames of exactly 95 and 96 bytes in
size would be corrupted. In your failing case, the frame is 95 bytes long.

I patched if_ti.c in -current and -stable to fix this. You can also fix
this by changing:
 
        rcb->ti_max_len = MHLEN;

to:       

        rcb->ti_max_len = MHLEN - ETHER_ALIGN;
 
in ti_gibinit() if you're in a rush and don't want to cvsup again.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990917181456.4D7BB154CF>