diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/tcp.h | 25 | ||||
-rw-r--r-- | include/net/tcp_ecn.h | 11 |
2 files changed, 22 insertions, 14 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index e79803353c83..43910fe3c448 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -420,9 +420,9 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, | |||
420 | 420 | ||
421 | /* tcp_output.c */ | 421 | /* tcp_output.c */ |
422 | 422 | ||
423 | extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, | 423 | extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, |
424 | unsigned int cur_mss, int nonagle); | 424 | int nonagle); |
425 | extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp); | 425 | extern int tcp_may_send_now(struct sock *sk); |
426 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | 426 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); |
427 | extern void tcp_xmit_retransmit_queue(struct sock *); | 427 | extern void tcp_xmit_retransmit_queue(struct sock *); |
428 | extern void tcp_simple_retransmit(struct sock *); | 428 | extern void tcp_simple_retransmit(struct sock *); |
@@ -479,8 +479,10 @@ static inline void tcp_fast_path_on(struct tcp_sock *tp) | |||
479 | __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale); | 479 | __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale); |
480 | } | 480 | } |
481 | 481 | ||
482 | static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp) | 482 | static inline void tcp_fast_path_check(struct sock *sk) |
483 | { | 483 | { |
484 | struct tcp_sock *tp = tcp_sk(sk); | ||
485 | |||
484 | if (skb_queue_empty(&tp->out_of_order_queue) && | 486 | if (skb_queue_empty(&tp->out_of_order_queue) && |
485 | tp->rcv_wnd && | 487 | tp->rcv_wnd && |
486 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && | 488 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && |
@@ -591,10 +593,10 @@ static inline void tcp_dec_pcount_approx(__u32 *count, | |||
591 | } | 593 | } |
592 | } | 594 | } |
593 | 595 | ||
594 | static inline void tcp_packets_out_inc(struct sock *sk, | 596 | static inline void tcp_packets_out_inc(struct sock *sk, |
595 | struct tcp_sock *tp, | ||
596 | const struct sk_buff *skb) | 597 | const struct sk_buff *skb) |
597 | { | 598 | { |
599 | struct tcp_sock *tp = tcp_sk(sk); | ||
598 | int orig = tp->packets_out; | 600 | int orig = tp->packets_out; |
599 | 601 | ||
600 | tp->packets_out += tcp_skb_pcount(skb); | 602 | tp->packets_out += tcp_skb_pcount(skb); |
@@ -778,18 +780,21 @@ static inline void tcp_minshall_update(struct tcp_sock *tp, int mss, | |||
778 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; | 780 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; |
779 | } | 781 | } |
780 | 782 | ||
781 | static inline void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp) | 783 | static inline void tcp_check_probe_timer(struct sock *sk) |
782 | { | 784 | { |
785 | struct tcp_sock *tp = tcp_sk(sk); | ||
783 | const struct inet_connection_sock *icsk = inet_csk(sk); | 786 | const struct inet_connection_sock *icsk = inet_csk(sk); |
787 | |||
784 | if (!tp->packets_out && !icsk->icsk_pending) | 788 | if (!tp->packets_out && !icsk->icsk_pending) |
785 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0, | 789 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0, |
786 | icsk->icsk_rto, TCP_RTO_MAX); | 790 | icsk->icsk_rto, TCP_RTO_MAX); |
787 | } | 791 | } |
788 | 792 | ||
789 | static inline void tcp_push_pending_frames(struct sock *sk, | 793 | static inline void tcp_push_pending_frames(struct sock *sk) |
790 | struct tcp_sock *tp) | ||
791 | { | 794 | { |
792 | __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); | 795 | struct tcp_sock *tp = tcp_sk(sk); |
796 | |||
797 | __tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle); | ||
793 | } | 798 | } |
794 | 799 | ||
795 | static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) | 800 | static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) |
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h index b5f7c6ac0880..89eb3e05116d 100644 --- a/include/net/tcp_ecn.h +++ b/include/net/tcp_ecn.h | |||
@@ -27,9 +27,10 @@ static inline void TCP_ECN_send_synack(struct tcp_sock *tp, | |||
27 | TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_ECE; | 27 | TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_ECE; |
28 | } | 28 | } |
29 | 29 | ||
30 | static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp, | 30 | static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb) |
31 | struct sk_buff *skb) | ||
32 | { | 31 | { |
32 | struct tcp_sock *tp = tcp_sk(sk); | ||
33 | |||
33 | tp->ecn_flags = 0; | 34 | tp->ecn_flags = 0; |
34 | if (sysctl_tcp_ecn) { | 35 | if (sysctl_tcp_ecn) { |
35 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR; | 36 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR; |
@@ -44,9 +45,11 @@ TCP_ECN_make_synack(struct request_sock *req, struct tcphdr *th) | |||
44 | th->ece = 1; | 45 | th->ece = 1; |
45 | } | 46 | } |
46 | 47 | ||
47 | static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp, | 48 | static inline void TCP_ECN_send(struct sock *sk, struct sk_buff *skb, |
48 | struct sk_buff *skb, int tcp_header_len) | 49 | int tcp_header_len) |
49 | { | 50 | { |
51 | struct tcp_sock *tp = tcp_sk(sk); | ||
52 | |||
50 | if (tp->ecn_flags & TCP_ECN_OK) { | 53 | if (tp->ecn_flags & TCP_ECN_OK) { |
51 | /* Not-retransmitted data segment: set ECT and inject CWR. */ | 54 | /* Not-retransmitted data segment: set ECT and inject CWR. */ |
52 | if (skb->len != tcp_header_len && | 55 | if (skb->len != tcp_header_len && |