[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] xen-netfront sets partial checksum at wrong offset



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.