"k">if (ack_type == TCP_CC_DUPACK) { tc->cwnd += tc->snd_mss; } else if (ack_type == TCP_CC_PARTIALACK) { tc->cwnd -= tc->bytes_acked; if (tc->bytes_acked > tc->snd_mss) tc->bytes_acked += tc->snd_mss; } } void newreno_conn_init (tcp_connection_t * tc) { tc->ssthresh = tc->snd_wnd; tc->cwnd = tcp_initial_cwnd (tc); } const static tcp_cc_algorithm_t tcp_newreno = { .congestion = newreno_congestion, .recovered = newreno_recovered, .rcv_ack = newreno_rcv_ack, .rcv_cong_ack = newreno_rcv_cong_ack, .init = newreno_conn_init }; clib_error_t * newreno_init (vlib_main_t * vm) { clib_error_t *error = 0; tcp_cc_algo_register (TCP_CC_NEWRENO, &tcp_newreno); return error; } VLIB_INIT_FUNCTION (newreno_init); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */