public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Ilija Kocho <ilijak@siva.com.mk>
To: ecos-discuss@ecos.sourceware.org,
	 eCos developers <ecos-devel@ecos.sourceware.org>
Subject: Re: [ECOS] Re: How to use IP/UDP/TCP checksum offload HW?
Date: Tue, 07 Jun 2011 08:55:00 -0000	[thread overview]
Message-ID: <4DEDE781.5040108@siva.com.mk> (raw)
In-Reply-To: <D257F904-78F1-4789-9F4B-FFEB1A12DA56@netic.com>

On 07.06.2011 04:18, Laurie Gellatly wrote:
>
> On 07/06/2011, at 10:57 AM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
>> On 2011-06-07, Laurie Gellatly <laurie.gellatly@netic.com> 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
>>
> So how do we progress this?
> Should we offline exchange the mods we've each tried (code and CDL)?

I am going to need the same soon only with lwIP. Recent on-chip Ethernet
controllers provide for some IP processing so IMO we should address this
issue generally. Is there place for some community project?

Ilija.

           reply	other threads:[~2011-06-07  8:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <D257F904-78F1-4789-9F4B-FFEB1A12DA56@netic.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DEDE781.5040108@siva.com.mk \
    --to=ilijak@siva.com.mk \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).