ipv4 gro receive IHL

3 messages, 2 authors, 2012-10-23 · open the first message on its own page

ipv4 gro receive IHL

From: David Miller <davem@davemloft.net>
Date: 2012-10-23 03:46:07

Eric why do we force the length field to '5' in the ip_fast_csum()
call of inet_gro_receive()?  This happened as part of commit
a9e050f4e7f9d36afe0dcc0bddba864ee442715e ("net: tcp: GRO should be ECN
friendly")

This will cause the checksum check to fail for any IPV4 header with
options.

If that's intended, the way to do this is to reject by checking the
iph->ihl value, rather than doing so obscurely via the checksum call.

Re: ipv4 gro receive IHL

From: Eric Dumazet <hidden>
Date: 2012-10-23 06:01:39

On Mon, 2012-10-22 at 23:46 -0400, David Miller wrote:
Eric why do we force the length field to '5' in the ip_fast_csum()
call of inet_gro_receive()?  This happened as part of commit
a9e050f4e7f9d36afe0dcc0bddba864ee442715e ("net: tcp: GRO should be ECN
friendly")

This will cause the checksum check to fail for any IPV4 header with
options.

If that's intended, the way to do this is to reject by checking the
iph->ihl value, rather than doing so obscurely via the checksum call.
--
Hi David

GRO on IPv4 only supports ihl = 5, this is tested in :

if (*(u8 *)iph != 0x45)
    goto out_unlock;


I also was planning to add some code to ip_fast_csum(addr, X) to have a
fast path (no conditional jump) for the case where X is the constant 5


Thanks !

Re: ipv4 gro receive IHL

From: David Miller <davem@davemloft.net>
Date: 2012-10-23 06:27:16

From: Eric Dumazet <redacted>
Date: Tue, 23 Oct 2012 08:01:34 +0200
GRO on IPv4 only supports ihl = 5, this is tested in :

if (*(u8 *)iph != 0x45)
    goto out_unlock;

I also was planning to add some code to ip_fast_csum(addr, X) to have a
fast path (no conditional jump) for the case where X is the constant 5
Oh indeed, thanks for clearing that up.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help