From: Herbert Xu <[EMAIL PROTECTED]> Date: Mon, 15 Oct 2007 13:54:57 +0800
> On Mon, Oct 15, 2007 at 12:57:23PM +0800, Herbert Xu wrote: > > > > However, the fact that you're triggering this code at all tells > > us that there is another bug further up the chain that's causing > > us to generate partial checksums even though the NIC doesn't > > support it. Can you please give me the output of > > Nevermind, tcp_fragment can generate such packets out of > convenience. > > Here's a little optimisation to avoid copying the packet in > this case. > > [NET]: Avoid copying TCP packets unnecessarily > > TCP packets all have writable heads, that is, even though it's cloned, it is > writable up to the end of the TCP header. This patch makes skb_checksum_help > aware of this fact by using skb_clone_writable and avoiding a copy for TCP. > > I've also modified the BUG_ON tests to be unsigned. The only case where this > makes a difference is if csum_start points to a location before skb->data. > Since skb->data should always include the header where the checksum field > is (and all currently callers adhere to that), this change is safe and may > uncover bugs later. > > Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Applied, thanks Herbert! - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html