From owner-freebsd-net@FreeBSD.ORG Mon Aug 11 12:22:36 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8E0A1065673 for ; Mon, 11 Aug 2008 12:22:36 +0000 (UTC) (envelope-from mailnull@mips.inka.de) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6023D8FC08 for ; Mon, 11 Aug 2008 12:22:36 +0000 (UTC) (envelope-from mailnull@mips.inka.de) Received: from mail-in-07-z2.arcor-online.net (mail-in-07-z2.arcor-online.net [151.189.8.19]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id E73C31F4FE9 for ; Mon, 11 Aug 2008 14:22:34 +0200 (CEST) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by mail-in-07-z2.arcor-online.net (Postfix) with ESMTP id D0C672C73EB for ; Mon, 11 Aug 2008 14:22:34 +0200 (CEST) Received: from lorvorc.mips.inka.de (dslb-088-067-125-228.pools.arcor-ip.net [88.67.125.228]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id AAAEB10566E for ; Mon, 11 Aug 2008 14:22:34 +0200 (CEST) Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.14.2/8.14.2) with ESMTP id m7BCMXnq097162 for ; Mon, 11 Aug 2008 14:22:33 +0200 (CEST) (envelope-from mailnull@lorvorc.mips.inka.de) Received: (from mailnull@localhost) by lorvorc.mips.inka.de (8.14.2/8.14.2/Submit) id m7BCMXdH097161 for freebsd-net@freebsd.org; Mon, 11 Aug 2008 14:22:33 +0200 (CEST) (envelope-from mailnull) From: naddy@mips.inka.de (Christian Weisgerber) Date: Mon, 11 Aug 2008 12:22:33 +0000 (UTC) Message-ID: References: <20080811021703.GC50045@cdnetworks.co.kr> Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-net@freebsd.org X-Virus-Scanned: ClamAV 0.93.3/8005/Mon Aug 11 13:39:24 2008 on mail-in-01.arcor-online.net X-Virus-Status: Clean Subject: Re: Rx/tx hardware checksumming statistics? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 12:22:36 -0000 Pyun YongHyeon 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@mips.inka.de