[U-Boot] [PATCH/RFC] net: defragment IP packets

Robin Getz rgetz at blackfin.uclinux.org
Sun Jul 26 00:09:07 CEST 2009


On Fri 24 Jul 2009 04:04, Alessandro Rubini pondered:
> This patch add a quick and dirty defrag step in IP reception. This
> allows to increase the TFTP block size and get more performance in
> slow links (but at that point it should be made configurable).
> 
> The overhead is negligible, verified with an ARM9 CPU and 10MB data
> file, changing the server MTU from 1500 to 800 and then 550.  However,
> on a LAN connection, I didn't see advantes with using a 4k block
> size with default MTU.

I do...

Filesize : 4613551 bytes (4.3Mbytes)

tftp modified, so it doesn't print out hashes (have have things slow down for 
the UART printing) - to make sure we are getting a true network 
measurement...

+#ifndef CONFIG_TFTP_QUIET
                        if (((TftpBlock - 1) % 10) == 0) {
                                putc ('#');
                        } else if ((TftpBlock % (10 * HASHES_PER_LINE)) == 0) 
                                puts ("\n\t ");
+#endif


block size   seconds
512           9.43      144.78%  (+2.92 seconds)
1468          6.52      100.00%  (default)
2048          6.27       96.20%  (-0.25 seconds)
3072          5.69       87.40%  (-0.82 seconds)
4096          5.46       83.81%  (-1.05 seconds)
5120          5.26       80.76%  (-1.25 seconds)
6144          5.13       78.79%  (-1.38 seconds)
7168          5.09       78.13%  (-1.42 seconds)
8192          5.01       76.92%  (-1.50 seconds)
10240         4.94       75.83%  (-1.58 seconds)
12288         4.87       74.74%  (-1.65 seconds)
14336         4.85       74.49%  (-1.66 seconds)
16384         4.82       73.95%  (-1.70 seconds)

Saving that 1.7 seconds is worth it to me...

On a slower connection - I would guess that the difference is going to be more 
dramatic...

I needed to modify your patch a little bit to get it working on my platform.

If Ben/Wolfgang are interested in taking this - I'll fix up my mods, and send 
it back.

-Robin


More information about the U-Boot mailing list