ajay,
it is always more efficient to send the last fragment first since only
when the last fragment is received does the recipient know the total size
of the datagram (size of the datagram is the offset of fragment with MF
bit set to 0 plus the size of that fragment).
additionally, reassembly of reverse-order fragments *could* be optimized
(although it isn't anywhere that i know of) to work extremely quickly:
-receive the last fragment and allocate a buffer of the final size of the
datagram.
-with each additional fragment, position it such that the final part of it
overwrites the header of the previous fragment.
-when you receive the first fragment, you're done.
nevertheless, it doesn't look like linux always sends fragments in reverse
order, but i'm still trying to familiarize myself with the code. i know
that fragmented udp is always sent in reverse order, and i suspected that
all fragments were sent in revers order but i couldn't verify that.
todd
On Thu, 13 Jan 2000, Ajay Agrawal wrote:
> Date: Thu, 13 Jan 2000 11:25:47 +0530
> From: Ajay Agrawal <ajay@hiqnetworks.com>
> To: linux-kernel@vger.rutgers.edu
>
> Hi,
> I observer that when the linux IP, fragments the packet, it sends the first
> fragment packet (containing the Transport layer information) at the last. In
> short if the packets arrive in the transmitted order at the destination the
> last fragment is received first and the first fragment at the last.
> Why is it so?
>
> Thanks and regards
>
> Ajay
>
> ____
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:23 EST