@ -394,6 +394,8 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) {
l - > inflight_bytes = 0 ;
l - > inflight_packets = 0 ;
l - > delivered_bytes = 0 ;
l - > acked_bytes = 0 ;
l - > acked_packets = 0 ;
l - > last_ack_time_tb = get_time_tb ( ) ;
l = l - > next ;
}
@ -1243,14 +1245,28 @@ void etcp_ack_recv(struct ETCP_CONN* etcp, uint32_t seq, uint16_t ts, uint16_t d
link - > delivered_bytes + = rs . delivered ;
link - > last_ack_time_tb = now_tb ;
uint32_t new_cwnd = link - > inflight_lim_bytes ;
uint32_t new_pacing = link - > bbr_pacing_rate ;
DEBUG_DEBUG ( DEBUG_CATEGORY_BBR , " [L%u] BBR in: seq=%u del=%u iv=%uus rtt=%uus pri=%u infl=%u lost=%d app=%d cwnd=%u " ,
link - > local_link_id , seq , rs . delivered , rs . interval_us , rs . rtt_us ,
rs . prior_delivered , rs . tx_in_flight , rs . lost , rs . is_app_limited ,
link - > inflight_lim_bytes ) ;
uint32_t old_cwnd = link - > inflight_lim_bytes ;
uint32_t old_pacing = link - > bbr_pacing_rate ;
uint32_t new_cwnd = old_cwnd ;
uint32_t new_pacing = old_pacing ;
bbr_main ( link - > bbr , & rs , & new_cwnd , & new_pacing , link - > mtu , link - > inflight_bytes ,
( link - > inflight_bytes > = link - > inflight_lim_bytes ) ) ;
etcp_link_update_inflight_lim ( link , new_cwnd ) ;
link - > bbr_pacing_rate = new_pacing ;
link - > bandwidth = ( uint32_t ) ( ( uint64_t ) new_pacing * 8 / 1000 ) ;
link - > bbr_loss_since_ack = 0 ;
DEBUG_DEBUG ( DEBUG_CATEGORY_BBR , " [L%u] BBR out: cwnd %u→%u pace %u→%u bw=%uK mode=%d cyc=%d infl=%u " ,
link - > local_link_id , old_cwnd , new_cwnd , old_pacing , new_pacing ,
link - > bandwidth , link - > bbr - > mode , link - > bbr - > cycle_idx , link - > inflight_bytes ) ;
link - > acked_bytes + = acked_pkt - > ll . len ;
link - > acked_packets + + ;
}