]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix conditions to determine checksum offload
authorTom Herbert <tom@herbertland.com>
Mon, 14 Dec 2015 19:19:45 +0000 (11:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 21:50:20 +0000 (16:50 -0500)
commitf9675dceec4e17a016374d5b7a7a511b2bc772ea
tree32d6e3173c2bd3e92084884f8006d5a2a73e3ffb
parent1219f4b925f026ae4841e3d93a7b9403d922f8f1
tcp: Fix conditions to determine checksum offload

In tcp_send_sendpage and tcp_sendmsg we check the route capabilities to
determine if checksum offload can be performed. This check currently
does not take the IP protocol into account for devices that advertise
only one of NETIF_F_IPV6_CSUM or NETIF_F_IP_CSUM. This patch adds a
function to check capabilities for checksum offload with a socket
called sk_check_csum_caps. This function checks for specific IPv4 or
IPv6 offload support based on the family of the socket.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ipv4/tcp.c