aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-19 14:56:49 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-21 14:24:14 -0500
commitdead7cdb0daec58490891e59f4fae0c5c76fa5f3 (patch)
tree4d3f1f7752d6da21e667434aee42131fbda57694 /net/ipv4/tcp.c
parent74d4a8f8d378ddbe7caf3331804c3d5a276a9b1a (diff)
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.c11
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);
1063int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, 1063int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset,
1064 size_t size, int flags) 1064 size_t size, int flags)
1065{ 1065{
1066 if (!(sk->sk_route_caps & NETIF_F_SG) || 1066 if (!(sk->sk_route_caps & NETIF_F_SG))
1067 !sk_check_csum_caps(sk))
1068 return sock_no_sendpage_locked(sk, page, offset, size, flags); 1067 return sock_no_sendpage_locked(sk, page, offset, size, flags);
1069 1068
1070 tcp_rate_check_app_limited(sk); /* is sending application-limited? */ 1069 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)
1190 goto out_err; 1189 goto out_err;
1191 } 1190 }
1192 1191
1193 zc = sk_check_csum_caps(sk) && sk->sk_route_caps & NETIF_F_SG; 1192 zc = sk->sk_route_caps & NETIF_F_SG;
1194 if (!zc) 1193 if (!zc)
1195 uarg->zerocopy = 0; 1194 uarg->zerocopy = 0;
1196 } 1195 }
@@ -1287,11 +1286,7 @@ new_segment:
1287 goto wait_for_memory; 1286 goto wait_for_memory;
1288 1287
1289 process_backlog = true; 1288 process_backlog = true;
1290 /* 1289 skb->ip_summed = CHECKSUM_PARTIAL;
1291 * Check whether we can use HW checksum.
1292 */
1293 if (sk_check_csum_caps(sk))
1294 skb->ip_summed = CHECKSUM_PARTIAL;
1295 1290
1296 skb_entail(sk, skb); 1291 skb_entail(sk, skb);
1297 copy = size_goal; 1292 copy = size_goal;