From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 2 06:31:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7534216A41B for ; Wed, 2 Jan 2008 06:31:38 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0230F13C455 for ; Wed, 2 Jan 2008 06:31:37 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (root@brother.ludd.ltu.se [130.240.16.78]) by mother.ludd.ltu.se (8.13.6+Sun/8.12.10) with ESMTP id m026VXr4006563; Wed, 2 Jan 2008 07:31:33 +0100 (MET) Received: from brother.ludd.ltu.se (pb@localhost [127.0.0.1]) by brother.ludd.ltu.se (8.13.6+Sun/8.12.2) with ESMTP id m026VXWD018892; Wed, 2 Jan 2008 07:31:33 +0100 (MET) Received: (from pb@localhost) by brother.ludd.ltu.se (8.13.6+Sun/8.13.6/Submit) id m026VV3s018890; Wed, 2 Jan 2008 07:31:31 +0100 (MET) From: Peter B Message-Id: <200801020631.m026VV3s018890@brother.ludd.ltu.se> To: pyunyh@gmail.com Date: Wed, 2 Jan 2008 07:31:31 +0100 (MET) In-Reply-To: <20080102042210.GC27551@cdnetworks.co.kr> from "Pyun YongHyeon" at Jan 02, 2008 01:22:10 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 02 Jan 2008 12:38:55 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: 6.2R Patch to allow broken frames X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 06:31:38 -0000 >Some ethernet controllers allow receving broken frames but I'm not >sure whether it really helps on production box execept debugging aid. >Receving broken frames would waste PCI bandwidth as well as systems >resources as it would be dropped anyway in upper layer. It's intended as an aid to debug malfunctions. And this patch makes it possible to enable/disable it at will. For fpga + phy, it helps to see exactly what's sent over the wire, and what the phy likely see at it's input. This is especially true for the crc32, which took some effort to get it right in verilog. By enableing broken frames I could see that the rest of the packet was ok and what crc the code generated. Things like last step xor etc.. Is much easier to spot. >I guess you can see increasing input errors(if_ierrors) in case of >receving broken frames. Did the counter is not enough? Just seing that there is an error won't help much. One needs to see exactly what's sent, ie nibble by nibble. Ofcourse the intended tool to get the results is tcpdump(1). Higher levels arn't likely to benefit much. Except for verifying error resilence. Involved files: /usr/src/sbin/ifconfig/ifconfig.c /usr/src/sbin/ifconfig/ifconfig.h /usr/src/sys/dev/tx/if_tx.c /usr/src/sys/net/if.h