]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
net: defragment IP packets
authorAlessandro Rubini <rubini-list@gnudd.com>
Fri, 7 Aug 2009 11:58:56 +0000 (13:58 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 25 Aug 2009 20:35:54 +0000 (13:35 -0700)
commit5cfaa4e54d0eb8232fa1cf092d955fdaed5b673d
treeca7ad9207d11c9b410f340640c95214ba7aecd12
parent307ecb6db04eebdc06b8c87d48bf48d3cbd5e9d7
net: defragment IP packets

The defragmenting code is enabled by CONFIG_IP_DEFRAG; the code is
useful for TFTP and NFS transfers.  The user can specify the maximum
defragmented payload as CONFIG_NET_MAXDEFRAG (default 16k).
Since NFS has a bigger per-packet overhead than TFTP, the static
reassembly buffer can hold CONFIG_NET_MAXDEFRAG + the NFS overhead.

The packet buffer is used as an array of "hole" structures, acting as
a double-linked list. Each new fragment can split a hole in two,
reduce a hole or fill a hole. No support is there for a fragment
overlapping two diffrent holes (i.e., thre new fragment is across an
already-received fragment).

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
net/net.c