[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TCP checksumming
From: |
Jonathan Larmour |
Subject: |
Re: [lwip-users] TCP checksumming |
Date: |
Mon, 10 Mar 2008 16:12:36 +0000 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070530) |
Bill Auerbach wrote:
>
>> And perhaps
>> we should include an example in the contrib folder to clarify
>> this for the future...?
>
> Sure. Or clarify the comments in inet_chksum.c since they are the only
> reference I've seen to mention performance gains by optimizing the checksum
> routine and it already provides a hint about how to go about it. I don't
> mind doing this if you can tell me quickly how are you generating patch
> files that I've seen others submit.
Correcting the comment seems right, so I've done this. I've also changed
the selection of the algorithm from a bunch of "#if 1"s and "#if 0"s to use
an optional define test since it's a trivial improvement. That way you can
select the algorithm used from lwipopts.h rather than editting inet_chksum.c.
Just for the future, generating patches is done with the diff utility. To
just compare two files with GNU diff, you can usually get away with "diff
-u <oldfile> <newfile>". To diff large trees of files also use -r. Using -p
adds a helpful comment in the diff about the function name. Personally I
use the following macro in my bash shell:
alias jdiff="diff -x CVS -x \*~ -x .#\* -urpN "
Or you can make a short bash script to do the same thing:
#!/bin/bash
diff -x CVS -x \*~ -x .#\* -urpN "$@"
Hope this helps,
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
** Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv> **
** April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
- Re: [lwip-users] TCP checksumming,
Jonathan Larmour <=