Re: [PATCH] lro: IP fragment checking

From: Andrew Gallatin
Date: Mon Dec 01 2008 - 19:19:37 EST


David Miller wrote:
From: Andrew Gallatin <gallatin@xxxxxxxx>
Date: Mon, 01 Dec 2008 16:53:14 -0500

What hardware does an explicit check for fragmentation?

If the packet is fragmented, the chip shouldn't even be
looking at the ports to make LRO deferral decisions let
alone pass it down as a LRO'able frame.

You seem to be assuming that all consumers of the Linux LRO
interface have support for LRO in hardware. Many (most?)
do not. The way software LRO works in these drivers is the
driver just sends all packets through lro_receive_skb() when
LRO is configured and enabled. The LRO layer then filters
out things which are not eligible for LRO. See, for example,
igb_receive_skb().

If you're arguing that the hardware should have checked for
fragmentation, then many (most?) things in lro_tcp_ip_check()
should be removed. They are all basic sanity checks for
packets that would not be considered for LRO by a hardware
implementation, but are required by a software implementation
where all packets are through the LRO code.

Drew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/