All of lore.kernel.org
 help / color / mirror / Atom feed
* ipv4 gro receive IHL
@ 2012-10-23  3:46 David Miller
  2012-10-23  6:01 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-10-23  3:46 UTC (permalink / raw)
  To: edumazet; +Cc: netdev


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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ipv4 gro receive IHL
  2012-10-23  3:46 ipv4 gro receive IHL David Miller
@ 2012-10-23  6:01 ` Eric Dumazet
  2012-10-23  6:27   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-10-23  6:01 UTC (permalink / raw)
  To: David Miller; +Cc: edumazet, netdev

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 !

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ipv4 gro receive IHL
  2012-10-23  6:01 ` Eric Dumazet
@ 2012-10-23  6:27   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-10-23  6:27 UTC (permalink / raw)
  To: eric.dumazet; +Cc: edumazet, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-23  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23  3:46 ipv4 gro receive IHL David Miller
2012-10-23  6:01 ` Eric Dumazet
2012-10-23  6:27   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.