Lines Matching defs:tc
332 uint64_t tc; /* Number of bytes currently available in the committed (C) token bucket */
360 uint64_t tc;
390 uint64_t tc;
402 uint64_t time_diff, n_periods, tc, te;
409 /* Put the tokens overflowing from tc into te bucket */
410 tc = m->tc + n_periods * p->cir_bytes_per_period;
412 if (tc > p->cbs) {
413 te += (tc - p->cbs);
416 tc = p->cbs;
420 if (tc >= pkt_len) {
421 m->tc = tc - pkt_len;
427 m->tc = tc;
432 m->tc = tc;
444 uint64_t time_diff, n_periods, tc, te;
451 /* Put the tokens overflowing from tc into te bucket */
452 tc = m->tc + n_periods * p->cir_bytes_per_period;
454 if (tc > p->cbs) {
455 te += (tc - p->cbs);
458 tc = p->cbs;
462 if ((pkt_color == RTE_COLOR_GREEN) && (tc >= pkt_len)) {
463 m->tc = tc - pkt_len;
469 m->tc = tc;
474 m->tc = tc;
485 uint64_t time_diff_tc, time_diff_tp, n_periods_tc, n_periods_tp, tc, tp;
495 tc = m->tc + n_periods_tc * p->cir_bytes_per_period;
496 if (tc > p->cbs)
497 tc = p->cbs;
505 m->tc = tc;
510 if (tc < pkt_len) {
511 m->tc = tc;
516 m->tc = tc - pkt_len;
528 uint64_t time_diff_tc, time_diff_tp, n_periods_tc, n_periods_tp, tc, tp;
538 tc = m->tc + n_periods_tc * p->cir_bytes_per_period;
539 if (tc > p->cbs)
540 tc = p->cbs;
548 m->tc = tc;
553 if ((pkt_color == RTE_COLOR_YELLOW) || (tc < pkt_len)) {
554 m->tc = tc;
559 m->tc = tc - pkt_len;
571 uint64_t time_diff_tc, time_diff_te, n_periods_tc, n_periods_te, tc, te;
581 tc = m->tc + n_periods_tc * p->cir_bytes_per_period;
582 if (tc > p->cbs)
583 tc = p->cbs;
590 if (tc >= pkt_len) {
591 m->tc = tc - pkt_len;
596 m->tc = tc;
602 m->tc = tc;
615 uint64_t time_diff_tc, time_diff_te, n_periods_tc, n_periods_te, tc, te;
625 tc = m->tc + n_periods_tc * p->cir_bytes_per_period;
626 if (tc > p->cbs)
627 tc = p->cbs;
634 if ((pkt_color == RTE_COLOR_GREEN) && (tc >= pkt_len)) {
635 m->tc = tc - pkt_len;
641 m->tc = tc;
647 m->tc = tc;