The per-packet delivery rate sample is applied to ack-eliciting packet only
calling ->drs_on_transmit() BBR callback. So, ->on_pkt_lost() which inspects the
delivery rate sampling information during packet loss detection must not be
called for non ack-eliciting packet. If not, it would be facing with non
initialized variables with big chance to trigger a BUG_ON().
As BBR is implemented in the current developement version, there is
no need to backport this patch.
if (tick_is_le(loss_time_limit, now_ms) || reordered) {
struct quic_cc *cc = &qc->path->cc;
- if (cc->algo->on_pkt_lost)
+ /* Delivery rate sampling is applied to ack-eliciting packet only. */
+ if ((pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING) &&
+ cc->algo->on_pkt_lost)
cc->algo->on_pkt_lost(cc, pkt, pkt->rs.lost);
eb64_delete(&pkt->pn_node);
LIST_APPEND(lost_pkts, &pkt->list);