MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_update_bbr_info

Function bbr_update_bbr_info

freebsd/netinet/tcp_stacks/bbr.c:6750–6844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6748}
6749
6750static void
6751bbr_update_bbr_info(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rtt, uint32_t cts, uint32_t tsin,
6752 uint32_t uts, int32_t match, uint32_t rsm_send_time, int32_t ack_type, struct tcpopt *to)
6753{
6754 uint64_t old_rttprop;
6755
6756 /* Update our delivery time and amount */
6757 bbr->r_ctl.rc_delivered += (rsm->r_end - rsm->r_start);
6758 bbr->r_ctl.rc_del_time = cts;
6759 if (rtt == 0) {
6760 /*
6761 * 0 means its a retransmit, for now we don't use these for
6762 * the rest of BBR.
6763 */
6764 return;
6765 }
6766 if ((bbr->rc_use_google == 0) &&
6767 (match != BBR_RTT_BY_EXACTMATCH) &&
6768 (match != BBR_RTT_BY_TIMESTAMP)){
6769 /*
6770 * We get a lot of rtt updates, lets not pay attention to
6771 * any that are not an exact match. That way we don't have
6772 * to worry about timestamps and the whole nonsense of
6773 * unsure if its a retransmission etc (if we ever had the
6774 * timestamp fixed to always have the last thing sent this
6775 * would not be a issue).
6776 */
6777 return;
6778 }
6779 if ((bbr_no_retran && bbr->rc_use_google) &&
6780 (match != BBR_RTT_BY_EXACTMATCH) &&
6781 (match != BBR_RTT_BY_TIMESTAMP)){
6782 /*
6783 * We only do measurements in google mode
6784 * with bbr_no_retran on for sure things.
6785 */
6786 return;
6787 }
6788 /* Only update srtt if we know by exact match */
6789 tcp_bbr_xmit_timer(bbr, rtt, rsm_send_time, rsm->r_start, tsin);
6790 if (ack_type == BBR_CUM_ACKED)
6791 bbr->rc_ack_is_cumack = 1;
6792 else
6793 bbr->rc_ack_is_cumack = 0;
6794 old_rttprop = bbr_get_rtt(bbr, BBR_RTT_PROP);
6795 /*
6796 * Note the following code differs to the original
6797 * BBR spec. It calls for <= not <. However after a
6798 * long discussion in email with Neal, he acknowledged
6799 * that it should be < than so that we will have flows
6800 * going into probe-rtt (we were seeing cases where that
6801 * did not happen and caused ugly things to occur). We
6802 * have added this agreed upon fix to our code base.
6803 */
6804 if (rtt < old_rttprop) {
6805 /* Update when we last saw a rtt drop */
6806 bbr_log_rtt_shrinks(bbr, cts, 0, rtt, __LINE__, BBR_RTTS_NEWRTT, 0);
6807 bbr_set_reduced_rtt(bbr, cts, __LINE__);

Callers 1

bbr_update_rttFunction · 0.85

Calls 10

tcp_bbr_xmit_timerFunction · 0.85
bbr_get_rttFunction · 0.85
bbr_log_rtt_shrinksFunction · 0.85
bbr_set_reduced_rttFunction · 0.85
bbr_log_type_bbrrttpropFunction · 0.85
apply_filter_min_smallFunction · 0.85
bbr_set_state_targetFunction · 0.85
bbr_google_measurementFunction · 0.85
bbr_nf_measurementFunction · 0.85

Tested by

no test coverage detected