From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/3] Defragment IP packets
Date: Thu, 30 Jul 2009 11:02:44 +0200 [thread overview]
Message-ID: <cover.1248943812.git.rubini@unipv.it> (raw)
This patch-set implements the defragment code. PAtch 3 is just for me,
to enable it. It may also be a good thing to have, so people can look
for actual users and find one. If needed, I'll add another patch for
documentation.
I've done as RFC815 says although an unlikely insane fragment is not handled
(see code and patch comment).
Robin's suggestions have been include by two:
- ports are not checked (tftp code doesn't check either), only ID
- the ckeck is done in an inline function, not in the main function:
I agree call/ret is worse than if, but there is no call here.
(I split the function in two to make it clear, but it's most
likely not even needed).
Ben asked:
1. Configurable block size (via a well-named CONFIG).
Choose a good default value.
Done. The default is as before, as our polling ether may discard pacjets
if the burst is too fast. Mine receives only 4-5 fragments, so 8192
is not viable for me (4k works quite good). I suspect some may just cache
1 packet, so even two fragments won't work for them, thus the unchanged
default.
2. Handle out-of-order fragments, and some test results
showing that it works.
This the end of a transfer with 4096 block size:
frag 1480 - 1480
frag 0 - 1480
frag 2960 - 1148
---- done, len 4108
frag 2960 - 1148
frag 0 - 1480
frag 1480 - 1480
---- done, len 4108
frag 1480 - 1480
frag 0 - 1480
frag 2960 - 1148
---- done, len 4108
frag 0 - 1480
frag 1480 - 664
---- done, len 2144
The image, written over zeroed memory, crc'd and booted correctly.
Then I removed the prints.
3. Make the feature configurable
CONFIG_IP_DEFRAG
4. Test with a TFTP server that doesn't have blksize feature enabled
Done. Actually, my code is not called in this case.
/alessandro
Alessandro Rubini (3):
net: defragment IP packets
tftp: get the tftp block size from config file and from the environment
arm nomadik: select defrag and 4k tftp block size
include/configs/nhk8815.h | 3 +
net/net.c | 172 +++++++++++++++++++++++++++++++++++++++++++--
net/tftp.c | 13 +++-
3 files changed, 181 insertions(+), 7 deletions(-)
next reply other threads:[~2009-07-30 9:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 9:02 Alessandro Rubini [this message]
2009-07-30 9:02 ` [U-Boot] [PATCH 1/3] net: defragment IP packets Alessandro Rubini
2009-07-30 9:03 ` [U-Boot] [PATCH 2/3] tftp: get the tftp block size from config file and from the environment Alessandro Rubini
2009-07-30 9:03 ` [U-Boot] [PATCH 3/3] arm nomadik: select defrag and 4k tftp block size Alessandro Rubini
[not found] ` <8124a390e4cbcfee291c7583a585c9d030aadf7a.1248943812.git.rubini @unipv.it>
2009-07-30 9:25 ` [U-Boot] [PATCH 2/3 V2] tftp: get tftpblocksize from cfg file and env Alessandro Rubini
[not found] ` <7b8035d1-8543-4b85-ba00-ac21ff1a60df@lists.denx.de>
2009-07-30 23:15 ` [U-Boot] [PATCH 1/3] net: defragment IP packets Robin Getz
2009-07-31 7:46 ` Alessandro Rubini
2009-07-31 11:50 ` Robin Getz
2009-07-31 12:16 ` Alessandro Rubini
2009-07-31 13:40 ` Robin Getz
2009-07-31 14:02 ` Alessandro Rubini
2009-07-31 15:14 ` Robin Getz
2009-07-31 15:44 ` Alessandro Rubini
2009-07-31 15:33 ` Robin Getz
2009-08-05 16:59 ` Robin Getz
2009-08-05 17:18 ` Alessandro Rubini
2009-08-05 17:24 ` Ben Warren
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=cover.1248943812.git.rubini@unipv.it \
--to=rubini-list@gnudd.com \
--cc=u-boot@lists.denx.de \
/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