From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21279 invoked by alias); 7 Jun 2011 00:57:36 -0000 Received: (qmail 21270 invoked by uid 22791); 7 Jun 2011 00:57:36 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 00:57:20 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QTkbb-0004YB-PO for ecos-discuss@sources.redhat.com; Tue, 07 Jun 2011 02:57:15 +0200 Received: from 67-220-17-92.usiwireless.com ([67.220.17.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jun 2011 02:57:15 +0200 Received: from grant.b.edwards by 67-220-17-92.usiwireless.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jun 2011 02:57:15 +0200 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Tue, 07 Jun 2011 00:57:00 -0000 Message-ID: References: <1478E21E-D36A-4451-9F69-0042CBF57E91@netic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: slrn/0.9.9p1 (Linux) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: How to use IP/UDP/TCP checksum offload HW? X-SW-Source: 2011-06/txt/msg00029.txt.bz2 On 2011-06-07, Laurie Gellatly wrote: > I tried to enable this before without success. Ah yes, I saw your (unanswered) post from a few years back asking about this. I was hoping there had been some progress since then. > I agree that its a waste of processor time when it can be performed > in hardware. The last time I did some profiling, IP checksum calculation was a pretty significant bottleneck for TCP throughput. Back in the NetBSD stack days, I got about a 20% improvement in throughput by writing my own assembly-language IP checksum routine for ARM7. The FreeBSD C implementation and more recent versions of gcc do almost as well as hand-tuned assembly, but it's still a big percentage of CPU usage in TCP communications -- and it will be even worse now that I have a chip that does scatter-gather DMA. A part for US $4 that has IP checksum offloading and scatter-gather DMA. Back when I was a new grad... > Must we look at the latest BSD code to see how to implement this? Maybe. Or there might be a simpler way to do it. I would guess that the current FreeBSD has an API to configure this on a per-interface basis at run-time. If we can assume that there is only one external interface, then we don't need any API or runtime checks, just a few strategic #if/#endif pairs and some CDL to control them. -- Grant -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss