]> git.itanic.dy.fi Git - linux-stable/commit
r8169: fix rx checksum offload
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 6 Sep 2010 03:04:05 +0000 (20:04 -0700)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:18 +0000 (23:40 +0100)
commitd4114d4e08bba51c56d77ee3a3741e98ed107dc5
treef5c5eb70b3a779d147485c6e026440559cf0b827
parent3acc1eff9aab5dc224463d6fdc1fc98912f97a6f
r8169: fix rx checksum offload

commit adea1ac7effbddbe60a9de6d63462bfe79289e59 upstream.

While porting GRO to r8169, I found this driver has a bug in its rx
path.

All skbs given to network stack had their ip_summed set to
CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.

The reason is driver sets skb->ip_summed on the original skb before the
copy eventually done by copybreak. The fresh skb gets the ip_summed =
CHECKSUM_NONE value, forcing network stack to recompute checksum, and
preventing my GRO patch to work.

Fix is to make the ip_summed setting after skb copy.

Note : rx_copybreak current value is 16383, so all frames are copied...

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/net/r8169.c