Subject: Re: [net-next-2.6 PATCH v2] net: consolidate netif_needs_gso() checks

From: John Fastabend <[email-masked]>
Date: Mon, 08 Mar 2010 08:56:47 -0800

Herbert Xu wrote:
> On Sat, Mar 06, 2010 at 11:27:50AM -0800, John Fastabend wrote:
>   
>> It looks like dev_gso_segment() could be used to "Verify header  
>> integrity only" according to the comment?  If this is true I think the  
>> logic should probably be
>>
>> 		if (netif_needs_gso(dev, skb)) {
>> 			if (unlikely(dev_gso_segment(skb)))
>> 				goto out_kfree_skb;
>> 			if (skb->next)
>> 				goto gso;
>> 		} 		do your thing
>>
>> 		
>>
>> That way we linearize the skb if necessary in the case were  
>> dev_gso_segment() only verifies the header and does not return a list of  
>> segments.
>>     
>
> If we needed to linearise the skb then dev_gso_segment should
> perform the segmentation.  Is there a case where it doesn't?
>
> Cheers,
Nope as far as I can tell all cases are covered my concerns were 
unfounded.  Thanks for the review, I'll get this updated and resent.

-John.