Date: Tue, 12 Aug 2008 15:33:14 +0000 (UTC) From: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-net@freebsd.org Subject: Re: Rx/tx hardware checksumming statistics? Message-ID: <g7safq$27kj$1@lorvorc.mips.inka.de> References: <g7ktnq$glp$1@lorvorc.mips.inka.de> <20080811021703.GC50045@cdnetworks.co.kr> <g7pau9$2us0$1@lorvorc.mips.inka.de> <20080812022853.GD54362@cdnetworks.co.kr>
next in thread | previous in thread | raw e-mail | index | archive | help
Pyun YongHyeon <pyunyh@gmail.com> wrote: > > 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. > > Note, the controller can only offload IP, TCP and UDP checksumming. > ICMP should be handled by software. Yes, but the IP/ICMP packet should still be subject to IP checksumming. What I see with an 8111C (RL_FLAG_DESCV2): * incoming IP/TCP packet => IP checksum processed in hardware => TCP checksum processed in hardware * incoming IP/UDP packet => IP checksum processed in hardware => UDP checksum processed in hardware * incoming IP/ICMP packet => IP checksum _not_ processed in hardware With an old 8169S the latter case is different: * incoming IP/ICMP packet => IP checksum processed in hardware > > limitations also apply to the FreeBSD driver, but without the > > No, FreeBSD have no such limitation, re(4) takes full advantage of > hardware assistance if the controller in question is known to work > with the feature. I cannot find any difference between the respective drivers suggesting that the behavior above would be any different on FreeBSD. There are no relevant differences in the RX checksumming section in re_rxeof(). > > counters, how can you tell? > > I think you can check the output of ifconfig(4). This does not tell you if an individual received packet has been marked CSUM_IP_CHECKED|CSUM_IP_VALID. -- Christian "naddy" Weisgerber naddy@mips.inka.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?g7safq$27kj$1>