Wednesday, May 14, 2008

DCCP-CCID4 bug+patch (p1)


if (hctx->p > 0)
// when loss
{
hctx->x = min(((u64)hctx->x_calc) << 6, min_rate);
low_thresh /= TFRC_T_MBI;
ccid4_hc_tx_x_header_penalty(hctx);
}

else if (ktime_us_delta(now, hctx->t_ld) - (s64)hctx->rtt >= 0)
// no-loss
{
hctx->x = min(2 * old_x, min_rate);
low_thresh = scaled_div(low_thresh, hctx->rtt);
hctx->t_ld = now;
/*ccid4_hc_tx_x_header_penalty(hctx);*/

// babil
// header penalty should not be applied if there's no loss yet
// it will effectively stop the X from growing higher in a small packet and
// low data-rate stream, while the available bandwidth is higher on the link.
}