]> git.baikalelectronics.ru Git - kernel.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)
commitf985ab11da119d9670f22266f9697e105e16c947
treeee974ce5c61f56a2b9f64ed3b39fe2159308f049
parent03b1cd4f535162ab663b50ee565263e6d2b184e5
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