netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xen-netfront sets partial checksum at wrong offset
@ 2015-05-07 19:44 Venkat Venkatsubra
  2015-05-11 15:08 ` [Xen-devel] " Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 6+ messages in thread
From: Venkat Venkatsubra @ 2015-05-07 19:44 UTC (permalink / raw)
  To: netdev, xen-devel

Hello All,

When handle_incoming_queue (xen-netfront.c) calls checksum_setup()
the transport header didn't seem to be initialized yet.
skb_checksum_setup_ipv4 ends up initializing the checksum at incorrect offset. 
        if (recalculate)
                *csum = ~csum_tcpudp_magic(ip_hdr(skb)->saddr,
                                           ip_hdr(skb)->daddr,
                                           skb->len - off,
                                           ip_hdr(skb)->protocol, 0);

where csum is &tcp_hdr(skb)->check.

This problem got exposed when LRO was ON on the host.
It hits this case in checksum_setup().
        /*
         * A GSO SKB must be CHECKSUM_PARTIAL. However some buggy
         * peers can fail to set NETRXF_csum_blank when sending a GSO
         * frame. In this case force the SKB to CHECKSUM_PARTIAL and
         * recalculate the partial checksum.
         */

skb->ip_summed was CHECKSUM_UNNECESSARY. 
The guest was at 3.8.13 kernel.

I can send a patch if you think the problem exists in current releases too.

Thanks.

Venkat

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

end of thread, other threads:[~2015-05-29 10:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 19:44 xen-netfront sets partial checksum at wrong offset Venkat Venkatsubra
2015-05-11 15:08 ` [Xen-devel] " Konrad Rzeszutek Wilk
2015-05-11 17:25   ` Venkat Venkatsubra
2015-05-29 10:34     ` Jan Beulich
2015-05-29 10:39       ` Wei Liu
2015-05-29 10:50         ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).