]> asedeno.scripts.mit.edu Git - linux.git/commit
udp: Do not pass checksum as a parameter to GSO segmentation
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 7 May 2018 18:08:34 +0000 (11:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 May 2018 02:30:06 +0000 (22:30 -0400)
commit9a0d41b3598ff62ecb26661bbfb1d523586cdea3
treeee974ce5c61f56a2b9f64ed3b39fe2159308f049
parentb21c034b3df833b5d9db1cfdc3938dbb0d7995c6
udp: Do not pass checksum as a parameter to GSO segmentation

This patch is meant to allow us to avoid having to recompute the checksum
from scratch and have it passed as a parameter.

Instead of taking that approach we can take advantage of the fact that the
length that was used to compute the existing checksum is included in the
UDP header.

Finally to avoid the need to invert the result we can just call csum16_add
and csum16_sub directly. By doing this we can avoid a number of
instructions in the loop that is handling segmentation.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/udp.h
net/ipv4/udp_offload.c
net/ipv6/udp_offload.c