udp: Use uh->len instead of skb->len to compute checksum in segmentation
authorAlexander Duyck <aduyck@mirantis.com>
Fri, 5 Feb 2016 23:28:20 +0000 (15:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 13:55:34 +0000 (08:55 -0500)
commitdbef491ebe7f3a4fb1b9111878b86a426fd540b7
treeed9f7d5c31117b0413b97e3d37f8739df6954a21
parentfdaefd62fd658b266a8f389cdf7991630b4bc7b4
udp: Use uh->len instead of skb->len to compute checksum in segmentation

The segmentation code was having to do a bunch of work to pull the
skb->len and strip the udp header offset before the value could be used to
adjust the checksum.  Instead of doing all this work we can just use the
value that goes into uh->len since that is the correct value with the
correct byte order that we need anyway.  By using this value we can save
ourselves a bunch of pain as there is no need to do multiple byte swaps.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp_offload.c
This page took 0.026002 seconds and 5 git commands to generate.