]> git.baikalelectronics.ru Git - kernel.git/commit
udp: Add support for doing checksum unnecessary conversion
authorTom Herbert <therbert@google.com>
Sun, 31 Aug 2014 22:12:43 +0000 (15:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Sep 2014 04:36:28 +0000 (21:36 -0700)
commitb01154ad15b87c45bb09a73753eee752a7def4b4
tree9bf6029678d74ef6ad12e832d48d769caf88a4ed
parent1747cbb053ebcc2625b367a52b08023b1624435a
udp: Add support for doing checksum unnecessary conversion

Add support for doing CHECKSUM_UNNECESSARY to CHECKSUM_COMPLETE
conversion in UDP tunneling path.

In the normal UDP path, we call skb_checksum_try_convert after locating
the UDP socket. The check is that checksum conversion is enabled for
the socket (new flag in UDP socket) and that checksum field is
non-zero.

In the UDP GRO path, we call skb_gro_checksum_try_convert after
checksum is validated and checksum field is non-zero. Since this is
already in GRO we assume that checksum conversion is always wanted.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h
net/ipv4/udp.c
net/ipv4/udp_offload.c
net/ipv6/udp.c
net/ipv6/udp_offload.c