aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-19 14:56:50 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-21 14:24:14 -0500
commit65ec60973af97dab72094490b4d2e9b8e169456c (patch)
treec8e2f3aa4a65758aa62f7121b16c4264eb845811 /net/ipv4/tcp.c
parentdead7cdb0daec58490891e59f4fae0c5c76fa5f3 (diff)
tcp: tcp_sendmsg() only deals with CHECKSUM_PARTIAL
We no longer have skbs with skb->ip_summed == CHECKSUM_NONE in TCP write queues. We can remove dead code in tcp_sendmsg(). 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 7c4140271887..a33539798bf6 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1254,14 +1254,10 @@ restart:
1254 1254
1255 while (msg_data_left(msg)) { 1255 while (msg_data_left(msg)) {
1256 int copy = 0; 1256 int copy = 0;
1257 int max = size_goal;
1258 1257
1259 skb = tcp_write_queue_tail(sk); 1258 skb = tcp_write_queue_tail(sk);
1260 if (skb) { 1259 if (skb)
1261 if (skb->ip_summed == CHECKSUM_NONE) 1260 copy = size_goal - skb->len;
1262 max = mss_now;
1263 copy = max - skb->len;
1264 }
1265 1261
1266 if (copy <= 0 || !tcp_skb_can_collapse_to(skb)) { 1262 if (copy <= 0 || !tcp_skb_can_collapse_to(skb)) {
1267 bool first_skb; 1263 bool first_skb;
@@ -1290,7 +1286,6 @@ new_segment:
1290 1286
1291 skb_entail(sk, skb); 1287 skb_entail(sk, skb);
1292 copy = size_goal; 1288 copy = size_goal;
1293 max = size_goal;
1294 1289
1295 /* All packets are restored as if they have 1290 /* All packets are restored as if they have
1296 * already been sent. skb_mstamp isn't set to 1291 * already been sent. skb_mstamp isn't set to
@@ -1374,7 +1369,7 @@ new_segment:
1374 goto out; 1369 goto out;
1375 } 1370 }
1376 1371
1377 if (skb->len < max || (flags & MSG_OOB) || unlikely(tp->repair)) 1372 if (skb->len < size_goal || (flags & MSG_OOB) || unlikely(tp->repair))
1378 continue; 1373 continue;
1379 1374
1380 if (forced_push(tp)) { 1375 if (forced_push(tp)) {