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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: John Fastabend
Date: Saturday, March 6, 2010 - 12:27 pm

Herbert Xu wrote:
Herbert,

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.

thanks,
John.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [net-next-2.6 PATCH v2] net: consolidate netif_needs_g ..., John Fastabend, (Sat Mar 6, 12:27 pm)