aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b7325e0b406a..af1946c52c37 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -371,7 +371,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
371 TCP_ECN_send(sk, tp, skb, tcp_header_size); 371 TCP_ECN_send(sk, tp, skb, tcp_header_size);
372 } 372 }
373 373
374 tp->af_specific->send_check(sk, th, skb->len, skb); 374 icsk->icsk_af_ops->send_check(sk, skb->len, skb);
375 375
376 if (likely(tcb->flags & TCPCB_FLAG_ACK)) 376 if (likely(tcb->flags & TCPCB_FLAG_ACK))
377 tcp_event_ack_sent(sk, tcp_skb_pcount(skb)); 377 tcp_event_ack_sent(sk, tcp_skb_pcount(skb));
@@ -381,7 +381,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
381 381
382 TCP_INC_STATS(TCP_MIB_OUTSEGS); 382 TCP_INC_STATS(TCP_MIB_OUTSEGS);
383 383
384 err = tp->af_specific->queue_xmit(skb, 0); 384 err = icsk->icsk_af_ops->queue_xmit(skb, 0);
385 if (unlikely(err <= 0)) 385 if (unlikely(err <= 0))
386 return err; 386 return err;
387 387
@@ -638,12 +638,11 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
638unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu) 638unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu)
639{ 639{
640 struct tcp_sock *tp = tcp_sk(sk); 640 struct tcp_sock *tp = tcp_sk(sk);
641 int mss_now;
642
643 /* Calculate base mss without TCP options: 641 /* Calculate base mss without TCP options:
644 It is MMS_S - sizeof(tcphdr) of rfc1122 642 It is MMS_S - sizeof(tcphdr) of rfc1122
645 */ 643 */
646 mss_now = pmtu - tp->af_specific->net_header_len - sizeof(struct tcphdr); 644 int mss_now = (pmtu - inet_csk(sk)->icsk_af_ops->net_header_len -
645 sizeof(struct tcphdr));
647 646
648 /* Clamp it (mss_clamp does not include tcp options) */ 647 /* Clamp it (mss_clamp does not include tcp options) */
649 if (mss_now > tp->rx_opt.mss_clamp) 648 if (mss_now > tp->rx_opt.mss_clamp)
@@ -705,9 +704,9 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
705 xmit_size_goal = mss_now; 704 xmit_size_goal = mss_now;
706 705
707 if (doing_tso) { 706 if (doing_tso) {
708 xmit_size_goal = 65535 - 707 xmit_size_goal = (65535 -
709 tp->af_specific->net_header_len - 708 inet_csk(sk)->icsk_af_ops->net_header_len -
710 tp->ext_header_len - tp->tcp_header_len; 709 tp->ext_header_len - tp->tcp_header_len);
711 710
712 if (tp->max_window && 711 if (tp->max_window &&
713 (xmit_size_goal > (tp->max_window >> 1))) 712 (xmit_size_goal > (tp->max_window >> 1)))
@@ -1422,7 +1421,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
1422 (sysctl_tcp_retrans_collapse != 0)) 1421 (sysctl_tcp_retrans_collapse != 0))
1423 tcp_retrans_try_collapse(sk, skb, cur_mss); 1422 tcp_retrans_try_collapse(sk, skb, cur_mss);
1424 1423
1425 if(tp->af_specific->rebuild_header(sk)) 1424 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk))
1426 return -EHOSTUNREACH; /* Routing failure or similar. */ 1425 return -EHOSTUNREACH; /* Routing failure or similar. */
1427 1426
1428 /* Some Solaris stacks overoptimize and ignore the FIN on a 1427 /* Some Solaris stacks overoptimize and ignore the FIN on a