Index: sys/netinet/cc/cc_cdg.c =================================================================== --- sys/netinet/cc/cc_cdg.c +++ sys/netinet/cc/cc_cdg.c @@ -374,7 +374,7 @@ return (sysctl_handle_int(oidp, arg1, arg2, req)); } -static inline unsigned long +static inline uint32_t cdg_window_decrease(struct cc_var *ccv, unsigned long owin, unsigned int beta) { @@ -460,7 +460,7 @@ cdg_data->shadow_w = cdg_window_decrease(ccv, cdg_data->shadow_w, RENO_BETA); - CCV(ccv, snd_ssthresh) = ulmax(cdg_data->shadow_w, + CCV(ccv, snd_ssthresh) = max(cdg_data->shadow_w, cdg_window_decrease(ccv, CCV(ccv, snd_cwnd), V_cdg_beta_loss)); Index: sys/netinet/cc/cc_cubic.c =================================================================== --- sys/netinet/cc/cc_cubic.c +++ sys/netinet/cc/cc_cubic.c @@ -403,8 +403,8 @@ if (cubic_data->num_cong_events == 0) CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd) >> 1; else - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * CUBIC_BETA) - >> CUBIC_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + CUBIC_BETA) >> CUBIC_SHIFT; } Index: sys/netinet/cc/cc_htcp.c =================================================================== --- sys/netinet/cc/cc_htcp.c +++ sys/netinet/cc/cc_htcp.c @@ -504,12 +504,12 @@ * subsequent congestion events, set it to cwnd * beta. */ if (CCV(ccv, snd_ssthresh) == TCP_MAXWIN << TCP_MAX_WINSHIFT) - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * HTCP_MINBETA) - >> HTCP_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + HTCP_MINBETA) >> HTCP_SHIFT; else { htcp_recalc_beta(ccv); - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * htcp_data->beta) - >> HTCP_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + htcp_data->beta) >> HTCP_SHIFT; } } Index: sys/netinet/tcp_usrreq.c =================================================================== --- sys/netinet/tcp_usrreq.c +++ sys/netinet/tcp_usrreq.c @@ -2229,7 +2229,7 @@ tp->snd_wnd, tp->snd_cwnd); db_print_indent(indent); - db_printf("snd_ssthresh: %lu snd_recover: " + db_printf("snd_ssthresh: %u snd_recover: " "0x%08x\n", tp->snd_ssthresh, tp->snd_recover); db_print_indent(indent); @@ -2271,7 +2271,7 @@ "%u\n", tp->ts_offset, tp->last_ack_sent, tp->snd_cwnd_prev); db_print_indent(indent); - db_printf("snd_ssthresh_prev: %lu snd_recover_prev: 0x%08x " + db_printf("snd_ssthresh_prev: %u snd_recover_prev: 0x%08x " "t_badrxtwin: %u\n", tp->snd_ssthresh_prev, tp->snd_recover_prev, tp->t_badrxtwin); Index: sys/netinet/tcp_var.h =================================================================== --- sys/netinet/tcp_var.h +++ sys/netinet/tcp_var.h @@ -185,7 +185,7 @@ uint32_t snd_wnd; /* send window */ uint32_t snd_cwnd; /* congestion-controlled window */ u_long snd_spare1; /* unused */ - u_long snd_ssthresh; /* snd_cwnd size threshold for + uint32_t snd_ssthresh; /* snd_cwnd size threshold for * for slow start exponential to * linear switch */ @@ -227,7 +227,7 @@ tcp_seq last_ack_sent; /* experimental */ uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ - u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ + uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ int t_sndzerowin; /* zero-window updates sent */ u_int t_badrxtwin; /* window for retransmit recovery */