diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 376b2cfbb685..de8790ced946 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -563,13 +563,13 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, | |||
563 | /* Compute TCP options for SYN packets. This is not the final | 563 | /* Compute TCP options for SYN packets. This is not the final |
564 | * network wire format yet. | 564 | * network wire format yet. |
565 | */ | 565 | */ |
566 | static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, | 566 | static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb, |
567 | struct tcp_out_options *opts, | 567 | struct tcp_out_options *opts, |
568 | struct tcp_md5sig_key **md5) | 568 | struct tcp_md5sig_key **md5) |
569 | { | 569 | { |
570 | struct tcp_sock *tp = tcp_sk(sk); | 570 | struct tcp_sock *tp = tcp_sk(sk); |
571 | struct tcp_cookie_values *cvp = tp->cookie_values; | 571 | struct tcp_cookie_values *cvp = tp->cookie_values; |
572 | unsigned remaining = MAX_TCP_OPTION_SPACE; | 572 | unsigned int remaining = MAX_TCP_OPTION_SPACE; |
573 | u8 cookie_size = (!tp->rx_opt.cookie_out_never && cvp != NULL) ? | 573 | u8 cookie_size = (!tp->rx_opt.cookie_out_never && cvp != NULL) ? |
574 | tcp_cookie_size_check(cvp->cookie_desired) : | 574 | tcp_cookie_size_check(cvp->cookie_desired) : |
575 | 0; | 575 | 0; |
@@ -663,15 +663,15 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, | |||
663 | } | 663 | } |
664 | 664 | ||
665 | /* Set up TCP options for SYN-ACKs. */ | 665 | /* Set up TCP options for SYN-ACKs. */ |
666 | static unsigned tcp_synack_options(struct sock *sk, | 666 | static unsigned int tcp_synack_options(struct sock *sk, |
667 | struct request_sock *req, | 667 | struct request_sock *req, |
668 | unsigned mss, struct sk_buff *skb, | 668 | unsigned int mss, struct sk_buff *skb, |
669 | struct tcp_out_options *opts, | 669 | struct tcp_out_options *opts, |
670 | struct tcp_md5sig_key **md5, | 670 | struct tcp_md5sig_key **md5, |
671 | struct tcp_extend_values *xvp) | 671 | struct tcp_extend_values *xvp) |
672 | { | 672 | { |
673 | struct inet_request_sock *ireq = inet_rsk(req); | 673 | struct inet_request_sock *ireq = inet_rsk(req); |
674 | unsigned remaining = MAX_TCP_OPTION_SPACE; | 674 | unsigned int remaining = MAX_TCP_OPTION_SPACE; |
675 | u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ? | 675 | u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ? |
676 | xvp->cookie_plus : | 676 | xvp->cookie_plus : |
677 | 0; | 677 | 0; |
@@ -742,13 +742,13 @@ static unsigned tcp_synack_options(struct sock *sk, | |||
742 | /* Compute TCP options for ESTABLISHED sockets. This is not the | 742 | /* Compute TCP options for ESTABLISHED sockets. This is not the |
743 | * final wire format yet. | 743 | * final wire format yet. |
744 | */ | 744 | */ |
745 | static unsigned tcp_established_options(struct sock *sk, struct sk_buff *skb, | 745 | static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb, |
746 | struct tcp_out_options *opts, | 746 | struct tcp_out_options *opts, |
747 | struct tcp_md5sig_key **md5) | 747 | struct tcp_md5sig_key **md5) |
748 | { | 748 | { |
749 | struct tcp_skb_cb *tcb = skb ? TCP_SKB_CB(skb) : NULL; | 749 | struct tcp_skb_cb *tcb = skb ? TCP_SKB_CB(skb) : NULL; |
750 | struct tcp_sock *tp = tcp_sk(sk); | 750 | struct tcp_sock *tp = tcp_sk(sk); |
751 | unsigned size = 0; | 751 | unsigned int size = 0; |
752 | unsigned int eff_sacks; | 752 | unsigned int eff_sacks; |
753 | 753 | ||
754 | #ifdef CONFIG_TCP_MD5SIG | 754 | #ifdef CONFIG_TCP_MD5SIG |
@@ -770,9 +770,9 @@ static unsigned tcp_established_options(struct sock *sk, struct sk_buff *skb, | |||
770 | 770 | ||
771 | eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; | 771 | eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; |
772 | if (unlikely(eff_sacks)) { | 772 | if (unlikely(eff_sacks)) { |
773 | const unsigned remaining = MAX_TCP_OPTION_SPACE - size; | 773 | const unsigned int remaining = MAX_TCP_OPTION_SPACE - size; |
774 | opts->num_sack_blocks = | 774 | opts->num_sack_blocks = |
775 | min_t(unsigned, eff_sacks, | 775 | min_t(unsigned int, eff_sacks, |
776 | (remaining - TCPOLEN_SACK_BASE_ALIGNED) / | 776 | (remaining - TCPOLEN_SACK_BASE_ALIGNED) / |
777 | TCPOLEN_SACK_PERBLOCK); | 777 | TCPOLEN_SACK_PERBLOCK); |
778 | size += TCPOLEN_SACK_BASE_ALIGNED + | 778 | size += TCPOLEN_SACK_BASE_ALIGNED + |
@@ -801,7 +801,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
801 | struct tcp_sock *tp; | 801 | struct tcp_sock *tp; |
802 | struct tcp_skb_cb *tcb; | 802 | struct tcp_skb_cb *tcb; |
803 | struct tcp_out_options opts; | 803 | struct tcp_out_options opts; |
804 | unsigned tcp_options_size, tcp_header_size; | 804 | unsigned int tcp_options_size, tcp_header_size; |
805 | struct tcp_md5sig_key *md5; | 805 | struct tcp_md5sig_key *md5; |
806 | struct tcphdr *th; | 806 | struct tcphdr *th; |
807 | int err; | 807 | int err; |
@@ -1258,7 +1258,7 @@ unsigned int tcp_current_mss(struct sock *sk) | |||
1258 | const struct tcp_sock *tp = tcp_sk(sk); | 1258 | const struct tcp_sock *tp = tcp_sk(sk); |
1259 | const struct dst_entry *dst = __sk_dst_get(sk); | 1259 | const struct dst_entry *dst = __sk_dst_get(sk); |
1260 | u32 mss_now; | 1260 | u32 mss_now; |
1261 | unsigned header_len; | 1261 | unsigned int header_len; |
1262 | struct tcp_out_options opts; | 1262 | struct tcp_out_options opts; |
1263 | struct tcp_md5sig_key *md5; | 1263 | struct tcp_md5sig_key *md5; |
1264 | 1264 | ||
@@ -1389,7 +1389,7 @@ static inline int tcp_minshall_check(const struct tcp_sock *tp) | |||
1389 | */ | 1389 | */ |
1390 | static inline int tcp_nagle_check(const struct tcp_sock *tp, | 1390 | static inline int tcp_nagle_check(const struct tcp_sock *tp, |
1391 | const struct sk_buff *skb, | 1391 | const struct sk_buff *skb, |
1392 | unsigned mss_now, int nonagle) | 1392 | unsigned int mss_now, int nonagle) |
1393 | { | 1393 | { |
1394 | return skb->len < mss_now && | 1394 | return skb->len < mss_now && |
1395 | ((nonagle & TCP_NAGLE_CORK) || | 1395 | ((nonagle & TCP_NAGLE_CORK) || |