diff options
author | Eric Dumazet <edumazet@google.com> | 2018-02-19 11:56:49 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-21 14:24:14 -0500 |
commit | dead7cdb0daec58490891e59f4fae0c5c76fa5f3 (patch) | |
tree | 4d3f1f7752d6da21e667434aee42131fbda57694 /net/ipv4/tcp.c | |
parent | 74d4a8f8d378ddbe7caf3331804c3d5a276a9b1a (diff) | |
download | linux-next-dead7cdb0daec58490891e59f4fae0c5c76fa5f3.tar.gz |
tcp: remove sk_check_csum_caps()
Since TCP relies on GSO, we do not need this helper anymore.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 6f35c12af85a..7c4140271887 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1063,8 +1063,7 @@ EXPORT_SYMBOL_GPL(do_tcp_sendpages); int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags) { - if (!(sk->sk_route_caps & NETIF_F_SG) || - !sk_check_csum_caps(sk)) + if (!(sk->sk_route_caps & NETIF_F_SG)) return sock_no_sendpage_locked(sk, page, offset, size, flags); tcp_rate_check_app_limited(sk); /* is sending application-limited? */ @@ -1190,7 +1189,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) goto out_err; } - zc = sk_check_csum_caps(sk) && sk->sk_route_caps & NETIF_F_SG; + zc = sk->sk_route_caps & NETIF_F_SG; if (!zc) uarg->zerocopy = 0; } @@ -1287,11 +1286,7 @@ new_segment: goto wait_for_memory; process_backlog = true; - /* - * Check whether we can use HW checksum. - */ - if (sk_check_csum_caps(sk)) - skb->ip_summed = CHECKSUM_PARTIAL; + skb->ip_summed = CHECKSUM_PARTIAL; skb_entail(sk, skb); copy = size_goal; |