6.2R Patch to allow broken frames

Peter B pb at ludd.ltu.se
Tue Jan 1 22:31:38 PST 2008


>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


More information about the freebsd-hackers mailing list