]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit68c6a4d21ead3339ff1faf4e1004d17499126f45
treeed9f7d5c31117b0413b97e3d37f8739df6954a21
parente549bc509d5ff6c9e0c80fa4d8bf7e2bcfd90b14
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