summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_forward.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-15 01:47:15 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-15 12:26:34 -0700
commita030847e9f0eed2a080f6114381c649a7aa43d25 (patch)
tree60beb818cf95e16ab598b8177355eba845fc5015 /net/ipv4/ip_forward.c
parent172a863f2bfbacf4b6bfc06db219b946a058ce1a (diff)
downloadlinux-a030847e9f0eed2a080f6114381c649a7aa43d25.tar.gz
linux-a030847e9f0eed2a080f6114381c649a7aa43d25.tar.bz2
linux-a030847e9f0eed2a080f6114381c649a7aa43d25.zip
[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 <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_forward.c')
0 files changed, 0 insertions, 0 deletions