aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-19 14:56:52 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-21 14:24:14 -0500
commit98be9b12096fb46773b4a509d3822fd17c82218e (patch)
treefdee55dc628e78ddae4acbb7f1e97821aae779ae /net/ipv4/tcp_ipv4.c
parent4a64fd6ccf127973d1e2b2fc2f8024e550130617 (diff)
tcp: remove dead code after CHECKSUM_PARTIAL adoption
Since all skbs in write/rtx queues have CHECKSUM_PARTIAL, we can remove dead code. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f3e52bc98980..2c6aec2643e8 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -561,16 +561,9 @@ void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr)
561{ 561{
562 struct tcphdr *th = tcp_hdr(skb); 562 struct tcphdr *th = tcp_hdr(skb);
563 563
564 if (skb->ip_summed == CHECKSUM_PARTIAL) { 564 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0);
565 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); 565 skb->csum_start = skb_transport_header(skb) - skb->head;
566 skb->csum_start = skb_transport_header(skb) - skb->head; 566 skb->csum_offset = offsetof(struct tcphdr, check);
567 skb->csum_offset = offsetof(struct tcphdr, check);
568 } else {
569 th->check = tcp_v4_check(skb->len, saddr, daddr,
570 csum_partial(th,
571 th->doff << 2,
572 skb->csum));
573 }
574} 567}
575 568
576/* This routine computes an IPv4 TCP checksum. */ 569/* This routine computes an IPv4 TCP checksum. */