[ovs-dev] [PATCH] datapath: Consistently maintain checksum offloading state.

Ben Pfaff blp at nicira.com
Mon Mar 1 17:59:28 UTC 2010


On Sun, Feb 28, 2010 at 04:01:42PM -0500, Jesse Gross wrote:
> When adding a VLAN tag it is necessary for us to setup checksum
> pointers for offloaded packets manually.  However, this process
> clobbers some of the fields that other components need to determine
> the current status.  Here we mark the packet with its status upon
> ingress in our own format that does not get clobbered and is
> consistent across kernel versions.

What gets clobbered?  What you say makes sense, but I don't see where it
happens, or to what.

> @@ -606,7 +609,7 @@ int vswitch_skb_checksum_setup(struct sk_buff *skb)
>  	if (skb->protocol != htons(ETH_P_IP))
>  		goto out;
>  
> -	if (!skb_pull_up_to(skb, skb_network_header(skb) + 1))
> +	if (!skb_pull_up_to(skb, skb_network_header(skb) + sizeof(struct iphdr)))
>  		goto out;
>  
>  	iph = ip_hdr(skb);

The above change looks like an important fix in its own right.  How much
of the problem was actually in that one line?




More information about the dev mailing list