|
|
|
@ -441,6 +441,7 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) { |
|
|
|
etcp->rtt_avg_10 = 0; |
|
|
|
etcp->rtt_avg_10 = 0; |
|
|
|
etcp->rtt_avg_100 = 0; |
|
|
|
etcp->rtt_avg_100 = 0; |
|
|
|
etcp->jitter = 0; |
|
|
|
etcp->jitter = 0; |
|
|
|
|
|
|
|
etcp->last_rtt_cb_time = 0; |
|
|
|
etcp->bytes_sent_total = 0; |
|
|
|
etcp->bytes_sent_total = 0; |
|
|
|
etcp->retransmissions_count = 0; |
|
|
|
etcp->retransmissions_count = 0; |
|
|
|
etcp->ack_packets_count = 0; |
|
|
|
etcp->ack_packets_count = 0; |
|
|
|
@ -1545,6 +1546,13 @@ void etcp_conn_input(struct ETCP_DGRAM* pkt) { |
|
|
|
etcp->rtt_avg_10=rtt_max; |
|
|
|
etcp->rtt_avg_10=rtt_max; |
|
|
|
etcp->tt_last=tt_sum/cnt; |
|
|
|
etcp->tt_last=tt_sum/cnt; |
|
|
|
etcp->jitter=j_sum/cnt; |
|
|
|
etcp->jitter=j_sum/cnt; |
|
|
|
|
|
|
|
if (etcp->rtt_last) { |
|
|
|
|
|
|
|
uint64_t now_tb = get_time_tb(); |
|
|
|
|
|
|
|
if (now_tb - etcp->last_rtt_cb_time > RTT_CB_PERIOD_TB) { |
|
|
|
|
|
|
|
topo_node_ping_update_rtt(etcp->instance->topo_groups, etcp->peer_node_id, etcp->rtt_last); |
|
|
|
|
|
|
|
etcp->last_rtt_cb_time = now_tb; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
case ETCP_SECTION_PAYLOAD: { |
|
|
|
case ETCP_SECTION_PAYLOAD: { |
|
|
|
|