Date: Thu, 21 Oct 2004 16:27:47 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Juan Rodriguez <juan.fco.rodriguez@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: if_ed.c "NIC memory corrupt - invalid packet length" error Message-ID: <20041021162747.A58326@xorpc.icir.org> In-Reply-To: <96b30c400410211617466e7ea9@mail.gmail.com>; from juan.fco.rodriguez@gmail.com on Fri, Oct 22, 2004 at 12:17:29AM %2B0100 References: <96b30c400410211617466e7ea9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 22, 2004 at 12:17:29AM +0100, Juan Rodriguez wrote: > Hello, > > I'm getting this error now and then, so I've tried to look at the > file "if_ed.c" where the message is printed to sort it out... most of the time the message is because of a runt packet, or a residue of some collision, or the like. I'd probably just comment out the printf() if it bothers you. > I'd be glad if somebody could tell me what's the reason of this line > inside "ed_rint()" function: > > /* > * because buffers are aligned on 256-byte boundary, > * the length computed above is off by 256 in almost > * all cases. Fix it... > */ > if (len & 0xff) > len -= 256 ; > > I wonder what can happen here if we've got a length value well because the comment refers to the code above, you should supply that as well or there is nothing we can comment about. Apart from that, i vaguely remember having touched this part of the code and it was taking care of bugs in the NIC which at times would compute a wrong length. In any case it is mostly unrelated to the above which has an easier explaination cheers luigi > that is less than 256. We could end up with a negative value... > could it be this the source that causes the problem ? > > PS: I'm kinda newbie so I might be saying stupid things! :) > Thanks > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041021162747.A58326>