From owner-freebsd-net@FreeBSD.ORG Thu Oct 21 23:27:48 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3875416A4CE for ; Thu, 21 Oct 2004 23:27:48 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2189243D2D for ; Thu, 21 Oct 2004 23:27:48 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.8) with ESMTP id i9LNRlBQ058455; Thu, 21 Oct 2004 16:27:47 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id i9LNRl9V058454; Thu, 21 Oct 2004 16:27:47 -0700 (PDT) (envelope-from rizzo) Date: Thu, 21 Oct 2004 16:27:47 -0700 From: Luigi Rizzo To: Juan Rodriguez Message-ID: <20041021162747.A58326@xorpc.icir.org> References: <96b30c400410211617466e7ea9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <96b30c400410211617466e7ea9@mail.gmail.com>; from juan.fco.rodriguez@gmail.com on Fri, Oct 22, 2004 at 12:17:29AM +0100 cc: freebsd-net@freebsd.org Subject: Re: if_ed.c "NIC memory corrupt - invalid packet length" error X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 23:27:48 -0000 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"