Lines Matching refs:rtcc
254 if (net->rtt > net->cc_mod.rtcc.lbw_rtt + rtt_offset) {
265 ((net->cc_mod.rtcc.lbw << 32) | nbw),
266 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
270 if ((net->cc_mod.rtcc.steady_step) && (inst_ind != SCTP_INST_LOOSING)) {
271 if (net->cc_mod.rtcc.last_step_state == 5)
272 net->cc_mod.rtcc.step_cnt++;
274 net->cc_mod.rtcc.step_cnt = 1;
275 net->cc_mod.rtcc.last_step_state = 5;
276 if ((net->cc_mod.rtcc.step_cnt == net->cc_mod.rtcc.steady_step) ||
277 ((net->cc_mod.rtcc.step_cnt > net->cc_mod.rtcc.steady_step) &&
278 ((net->cc_mod.rtcc.step_cnt % net->cc_mod.rtcc.steady_step) == 0))) {
281 oth = net->cc_mod.rtcc.vol_reduce;
283 oth |= net->cc_mod.rtcc.step_cnt;
285 oth |= net->cc_mod.rtcc.last_step_state;
288 ((net->cc_mod.rtcc.lbw << 32) | nbw),
289 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
295 net->cc_mod.rtcc.vol_reduce++;
297 net->cc_mod.rtcc.step_cnt = 0;
303 if (net->rtt < net->cc_mod.rtcc.lbw_rtt-rtt_offset) {
314 ((net->cc_mod.rtcc.lbw << 32) | nbw),
315 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
319 if (net->cc_mod.rtcc.steady_step) {
321 oth = net->cc_mod.rtcc.vol_reduce;
323 oth |= net->cc_mod.rtcc.step_cnt;
325 oth |= net->cc_mod.rtcc.last_step_state;
328 ((net->cc_mod.rtcc.lbw << 32) | nbw),
329 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
333 if ((net->cc_mod.rtcc.last_step_state == 5) &&
334 (net->cc_mod.rtcc.step_cnt > net->cc_mod.rtcc.steady_step)) {
336 net->cc_mod.rtcc.step_cnt = 0;
339 net->cc_mod.rtcc.last_step_state = 6;
340 net->cc_mod.rtcc.step_cnt = 0;
343 net->cc_mod.rtcc.lbw = nbw;
344 net->cc_mod.rtcc.lbw_rtt = net->rtt;
345 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
357 probepoint |= ((7 << 16) | net->cc_mod.rtcc.ret_from_eq);
360 ((net->cc_mod.rtcc.lbw << 32) | nbw),
361 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
365 if ((net->cc_mod.rtcc.steady_step) && (inst_ind != SCTP_INST_LOOSING)) {
366 if (net->cc_mod.rtcc.last_step_state == 5)
367 net->cc_mod.rtcc.step_cnt++;
369 net->cc_mod.rtcc.step_cnt = 1;
370 net->cc_mod.rtcc.last_step_state = 5;
371 if ((net->cc_mod.rtcc.step_cnt == net->cc_mod.rtcc.steady_step) ||
372 ((net->cc_mod.rtcc.step_cnt > net->cc_mod.rtcc.steady_step) &&
373 ((net->cc_mod.rtcc.step_cnt % net->cc_mod.rtcc.steady_step) == 0))) {
377 net->cc_mod.rtcc.vol_reduce++;
380 net->cc_mod.rtcc.step_cnt = 0;
389 return ((int)net->cc_mod.rtcc.ret_from_eq);
410 if (net->rtt > net->cc_mod.rtcc.lbw_rtt+rtt_offset) {
413 if ((net->cwnd > net->cc_mod.rtcc.cwnd_at_bw_set) &&
421 ((net->cc_mod.rtcc.lbw << 32) | nbw),
422 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
426 if (net->cc_mod.rtcc.ret_from_eq) {
438 ((net->cc_mod.rtcc.lbw << 32) | nbw),
439 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
444 if (net->cc_mod.rtcc.steady_step) {
446 oth = net->cc_mod.rtcc.vol_reduce;
448 oth |= net->cc_mod.rtcc.step_cnt;
450 oth |= net->cc_mod.rtcc.last_step_state;
453 ((net->cc_mod.rtcc.lbw << 32) | nbw),
454 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
461 if ((net->cc_mod.rtcc.vol_reduce) &&
464 net->cc_mod.rtcc.vol_reduce--;
466 net->cc_mod.rtcc.last_step_state = 2;
467 net->cc_mod.rtcc.step_cnt = 0;
470 } else if (net->rtt < net->cc_mod.rtcc.lbw_rtt-rtt_offset) {
477 ((net->cc_mod.rtcc.lbw << 32) | nbw),
478 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
482 if (net->cc_mod.rtcc.steady_step) {
484 oth = net->cc_mod.rtcc.vol_reduce;
486 oth |= net->cc_mod.rtcc.step_cnt;
488 oth |= net->cc_mod.rtcc.last_step_state;
491 ((net->cc_mod.rtcc.lbw << 32) | nbw),
492 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
496 if ((net->cc_mod.rtcc.vol_reduce) &&
499 net->cc_mod.rtcc.vol_reduce--;
501 net->cc_mod.rtcc.last_step_state = 3;
502 net->cc_mod.rtcc.step_cnt = 0;
512 ((net->cc_mod.rtcc.lbw << 32) | nbw),
513 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
517 if (net->cc_mod.rtcc.steady_step) {
519 oth = net->cc_mod.rtcc.vol_reduce;
521 oth |= net->cc_mod.rtcc.step_cnt;
523 oth |= net->cc_mod.rtcc.last_step_state;
526 ((net->cc_mod.rtcc.lbw << 32) | nbw),
527 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
531 if ((net->cc_mod.rtcc.vol_reduce) &&
534 net->cc_mod.rtcc.vol_reduce--;
536 net->cc_mod.rtcc.last_step_state = 4;
537 net->cc_mod.rtcc.step_cnt = 0;
540 net->cc_mod.rtcc.lbw = nbw;
541 net->cc_mod.rtcc.lbw_rtt = net->rtt;
542 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
573 ((net->cc_mod.rtcc.lbw << 32) | nbw),
574 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
578 if (net->cc_mod.rtcc.steady_step) {
580 oth = net->cc_mod.rtcc.vol_reduce;
582 oth |= net->cc_mod.rtcc.step_cnt;
584 oth |= net->cc_mod.rtcc.last_step_state;
587 ((net->cc_mod.rtcc.lbw << 32) | nbw),
588 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
592 net->cc_mod.rtcc.last_step_state = 0;
593 net->cc_mod.rtcc.step_cnt = 0;
594 net->cc_mod.rtcc.vol_reduce = 0;
596 net->cc_mod.rtcc.lbw = nbw;
597 net->cc_mod.rtcc.lbw_rtt = net->rtt;
598 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
602 /* RTCC Algoritm to limit growth of cwnd, return
661 if (net->cc_mod.rtcc.rtt_set_this_sack) {
662 net->cc_mod.rtcc.rtt_set_this_sack = 0;
663 bytes_for_this_rtt = net->cc_mod.rtcc.bw_bytes - net->cc_mod.rtcc.bw_bytes_at_last_rttc;
664 net->cc_mod.rtcc.bw_bytes_at_last_rttc = net->cc_mod.rtcc.bw_bytes;
680 inst_ind = net->cc_mod.rtcc.last_inst_ind;
688 inst_ind = net->cc_mod.rtcc.last_inst_ind;
699 ((net->cc_mod.rtcc.lbw_rtt << 32) | rtt),
705 inst_ind = net->cc_mod.rtcc.last_inst_ind;
707 bw_offset = net->cc_mod.rtcc.lbw >> bw_shift;
708 if (nbw > net->cc_mod.rtcc.lbw + bw_offset) {
716 rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt);
717 if (nbw < net->cc_mod.rtcc.lbw - bw_offset) {
735 net->cc_mod.rtcc.last_inst_ind = inst_ind;
841 if (use_rtcc && (net->cc_mod.rtcc.tls_needs_set > 0)) {
850 if ((net->cc_mod.rtcc.new_tot_time/1000) > 0) {
851 nbw = net->cc_mod.rtcc.bw_bytes/(net->cc_mod.rtcc.new_tot_time/1000);
853 nbw = net->cc_mod.rtcc.bw_bytes;
855 if (net->cc_mod.rtcc.lbw) {
873 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
877 net->cc_mod.rtcc.lbw = nbw;
878 net->cc_mod.rtcc.lbw_rtt = net->rtt;
879 if (net->cc_mod.rtcc.rtt_set_this_sack) {
880 net->cc_mod.rtcc.rtt_set_this_sack = 0;
881 net->cc_mod.rtcc.bw_bytes_at_last_rttc = net->cc_mod.rtcc.bw_bytes;
1162 if ((use_rtcc) && (net->lan_type == SCTP_LAN_LOCAL) && (net->cc_mod.rtcc.use_dccc_ecn)) {
1365 /* Passing a zero argument in last disables the rtcc algoritm */
1373 /* Passing a zero argument in last disables the rtcc algoritm */
1394 net->cc_mod.rtcc.bw_bytes += tp1->send_size;
1401 if (net->cc_mod.rtcc.tls_needs_set > 0) {
1405 timevalsub(<ls, &net->cc_mod.rtcc.tls);
1406 net->cc_mod.rtcc.new_tot_time = (ltls.tv_sec * 1000000) + ltls.tv_usec;
1418 if (net->cc_mod.rtcc.lbw) {
1428 ((net->cc_mod.rtcc.lbw << 32) | 0),
1429 ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt),
1433 net->cc_mod.rtcc.lbw_rtt = 0;
1434 net->cc_mod.rtcc.cwnd_at_bw_set = 0;
1435 net->cc_mod.rtcc.lbw = 0;
1436 net->cc_mod.rtcc.bw_bytes_at_last_rttc = 0;
1437 net->cc_mod.rtcc.vol_reduce = 0;
1438 net->cc_mod.rtcc.bw_tot_time = 0;
1439 net->cc_mod.rtcc.bw_bytes = 0;
1440 net->cc_mod.rtcc.tls_needs_set = 0;
1441 if (net->cc_mod.rtcc.steady_step) {
1442 net->cc_mod.rtcc.vol_reduce = 0;
1443 net->cc_mod.rtcc.step_cnt = 0;
1444 net->cc_mod.rtcc.last_step_state = 0;
1446 if (net->cc_mod.rtcc.ret_from_eq) {
1494 net->cc_mod.rtcc.lbw_rtt = 0;
1495 net->cc_mod.rtcc.cwnd_at_bw_set = 0;
1496 net->cc_mod.rtcc.vol_reduce = 0;
1497 net->cc_mod.rtcc.lbw = 0;
1498 net->cc_mod.rtcc.vol_reduce = 0;
1499 net->cc_mod.rtcc.bw_bytes_at_last_rttc = 0;
1500 net->cc_mod.rtcc.bw_tot_time = 0;
1501 net->cc_mod.rtcc.bw_bytes = 0;
1502 net->cc_mod.rtcc.tls_needs_set = 0;
1503 net->cc_mod.rtcc.ret_from_eq = SCTP_BASE_SYSCTL(sctp_rttvar_eqret);
1504 net->cc_mod.rtcc.steady_step = SCTP_BASE_SYSCTL(sctp_steady_step);
1505 net->cc_mod.rtcc.use_dccc_ecn = SCTP_BASE_SYSCTL(sctp_use_dccc_ecn);
1506 net->cc_mod.rtcc.step_cnt = 0;
1507 net->cc_mod.rtcc.last_step_state = 0;
1525 net->cc_mod.rtcc.ret_from_eq = cc_opt->aid_value.assoc_value;
1533 net->cc_mod.rtcc.use_dccc_ecn = cc_opt->aid_value.assoc_value;
1537 net->cc_mod.rtcc.steady_step = cc_opt->aid_value.assoc_value;
1549 cc_opt->aid_value.assoc_value = net->cc_mod.rtcc.ret_from_eq;
1555 cc_opt->aid_value.assoc_value = net->cc_mod.rtcc.use_dccc_ecn;
1561 cc_opt->aid_value.assoc_value = net->cc_mod.rtcc.steady_step;
1573 if (net->cc_mod.rtcc.tls_needs_set == 0) {
1574 SCTP_GETPTIME_TIMEVAL(&net->cc_mod.rtcc.tls);
1575 net->cc_mod.rtcc.tls_needs_set = 2;
1584 /* Passing a one argument at the last enables the rtcc algoritm */
1593 net->cc_mod.rtcc.rtt_set_this_sack = 1;