Subject: Re: [PATCH][RFC] TSO for VLAN devices without VLAN tag insertion

From: Patrick McHardy <[email-masked]>
Date: Thu, 12 Jun 2008 14:02:13 +0200

Ben Hutchings wrote:
> The SFC4000 controller can set IP header, TCP and UDP checksums in IPv4
> packets, with or without VLAN encapsulation.  However it does not do VLAN
> tag insertion.
> 
> When I try to make TSO work for VLAN devices via the new vlan_features,
> dev_queue_xmit() finds skb->ip_summed == CHECKSUM_PARTIAL &&
> skb->protocol == htons(ETH_P_8021Q) and calls skb_checksum_help(), which
> sets skb->ip_summed = CHECKSUM_NONE.
> 
> This causes netif_needs_gso() to return true when called by
> dev_hard_start_xmit(), and GSO then does its worst.
> 
> Below is a patch which worked for me, but I'm not sure whether it's the
> best way to fix the problem (so I'm not submitting or signing it off yet).

It looks reasonable - I can't think of a different way to handle
this case, although its a bit unfortunate that we have to put this
in dev_queue_xmit().