Rx/tx hardware checksumming statistics?

Christian Weisgerber naddy at mips.inka.de
Mon Aug 11 12:22:36 UTC 2008


Pyun YongHyeon <pyunyh at gmail.com> wrote:

> I don't think it indicates whether checksum offloading actually
> works as OpenBSD blindly set a flag, which was derived from
> hardware, to indicate hardware performed the checksum computation.

Yes.  It counts the instances where the network stack assumes that
the hardware successfully verified the checksum.  That is an
interesting number.

OpenBSD's re(4) driver is ported from FreeBSD.  Recently, Brad Smith
has been merging the tx/rx checksum offload support for the newer
chips (RTL8111C etc.) into the OpenBSD driver and I have done some
testing for him.  Looking at the counters, I have noticed:
* IP header rx checksumming is only registered for IP/TCP and IP/UDP
  packets, but not for other protocols, such as IP/ICMP.
* If VLAN tagging is enabled, no rx checksumming is registered at
  all.

I don't have documentation for the Realtek chips, so I don't know
if the hardware really cannot perform these operations or if the
driver simply fails to take advantage of them.  Presumably the same
limitations also apply to the FreeBSD driver, but without the
counters, how can you tell?

-- 
Christian "naddy" Weisgerber                          naddy at mips.inka.de



More information about the freebsd-net mailing list