From owner-freebsd-net@FreeBSD.ORG Mon Aug 11 02:19:17 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 C4A39106567C for ; Mon, 11 Aug 2008 02:19:17 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id 890678FC17 for ; Mon, 11 Aug 2008 02:19:17 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3040192rvf.43 for ; Sun, 10 Aug 2008 19:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R1aR0bpS0EX7JUeLKo7m+p5xpOJTYCMf9LvpuX8sEh0=; b=DY/rPoa5f+qjHVhr4MJgevL+GEvODNTOmWIQYWUbLl4tDNKJqh4mYSFSbn+gMPrBxH z1rE2vd16r4soNjxuDMSateUlGvpg0FTRhiwnBq6+SBKnJPz3/p3HYhIy1wf+FovhYgn q9s4e2pZn8ZFa+xUjGriJsDTQWHsHaZexGIaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Kd/B1z1C+Qfh5W03lbNoaM6i7jpiZwB+hn5SDOCvDudq3rG6quch6MyELjq5UW7LG7 YdeMcBNFHZ2r0kx0FxEGlcHNGrP7U6RLPBAjnDDMU3HJnT35cl3JsOF9DPMYr/5Uh51d Qz+GwtCvtVDPttijAkUkOAp9BnvlDrpjp3/AM= Received: by 10.141.45.16 with SMTP id x16mr3134547rvj.34.1218421157040; Sun, 10 Aug 2008 19:19:17 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id g31sm7719148rvb.2.2008.08.10.19.19.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 10 Aug 2008 19:19:16 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m7B2H5Uc050622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Aug 2008 11:17:05 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m7B2H3N2050620; Mon, 11 Aug 2008 11:17:03 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 11 Aug 2008 11:17:03 +0900 From: Pyun YongHyeon To: Christian Weisgerber Message-ID: <20080811021703.GC50045@cdnetworks.co.kr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: Rx/tx hardware checksumming statistics? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com 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 02:19:17 -0000 On Sat, Aug 09, 2008 at 08:12:42PM +0000, Christian Weisgerber wrote: > OpenBSD keeps count of the packets that have undergone IPv4 header/ > TCP/UDP checksumming in hardware. These statics are available with > netstat -s, e.g.: > > ip: > ... > 492152 input datagrams checksum-processed by hardware > 911338 output datagrams checksum-processed by hardware > ... > > This comes in quite handy to check whether checksum offloading > actually works and which protocols are successfully processed this > way. > 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. You can still have a chance that checksum offloading does not work even if the counter constantly increase over time. In addition, OpenBSD have a no way to disable checksum offloading feature of hardware on the fly so you have to rebuild the driver to disable checksum offloading in case of broken/buggy hardware. > On FreeBSD, netstat -s does not provide this information. Are these > statistics available in some other way? How would I check whether AFAIK there is no such counters in FreeBSD. > packets have actually been checksummed in hardware? > If checksum offloading didn't work you couldn't get a working connection at all. -- Regards, Pyun YongHyeon