• Home
  • Raw
  • Download

Lines Matching refs:avg

251 		to->avg = cfg->avg;  in cfg_copy()
263 to->avg = cfg->avg; in cfg_copy()
543 if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 1)) in hashlimit_parse()
567 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 1)) in hashlimit_mt_parse_v1()
569 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 1)) in hashlimit_mt_parse_v1()
576 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 1)) in hashlimit_mt_parse_v1()
578 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 1)) in hashlimit_mt_parse_v1()
608 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse_v2()
610 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse_v2()
617 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse_v2()
619 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse_v2()
649 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse()
651 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse()
658 if (parse_bytes(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse()
660 else if (!parse_rate(cb->arg, &info->cfg.avg, cb->udata, 2)) in hashlimit_mt_parse()
711 if (info->cfg.burst < cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check_v1()
714 cost_to_bytes(info->cfg.avg)); in hashlimit_mt_check_v1()
717 burst /= cost_to_bytes(info->cfg.avg); in hashlimit_mt_check_v1()
718 if (info->cfg.burst % cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check_v1()
742 if (info->cfg.burst < cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check_v2()
745 cost_to_bytes(info->cfg.avg)); in hashlimit_mt_check_v2()
748 burst /= cost_to_bytes(info->cfg.avg); in hashlimit_mt_check_v2()
749 if (info->cfg.burst % cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check_v2()
773 if (info->cfg.burst < cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check()
775 "burst cannot be smaller than %"PRIu64"b", cost_to_bytes(info->cfg.avg)); in hashlimit_mt_check()
778 burst /= cost_to_bytes(info->cfg.avg); in hashlimit_mt_check()
779 if (info->cfg.burst % cost_to_bytes(info->cfg.avg)) in hashlimit_mt_check()
790 info->cfg.avg /= udata->mult; in hashlimit_mt_check()
845 static uint32_t print_bytes(uint64_t avg, uint64_t burst, const char *prefix) in print_bytes() argument
850 r = cost_to_bytes(avg); in print_bytes()
854 bytes_to_cost(r & ~(units[i].thresh - 1)) == avg) in print_bytes()
906 quantum = print_rate(r->cfg.avg, 1); in hashlimit_print()
932 quantum = print_bytes(cfg->avg, cfg->burst, ""); in hashlimit_mt_print()
935 period = cfg->avg; in hashlimit_mt_print()
941 quantum = print_rate(cfg->avg, revision); in hashlimit_mt_print()
1059 quantum = print_rate(r->cfg.avg, 1); in hashlimit_save()
1088 quantum = print_bytes(cfg->avg, cfg->burst, "--hashlimit-"); in hashlimit_mt_save()
1090 quantum = print_rate(cfg->avg, revision); in hashlimit_mt_save()
1212 static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, in print_packets_rate_xlate() argument
1220 if (avg > _rates[i].mult || in print_packets_rate_xlate()
1221 _rates[i].mult / avg < _rates[i].mult % avg) in print_packets_rate_xlate()
1225 _rates[i-1].mult / avg, _rates[i-1].name); in print_packets_rate_xlate()
1234 r = cost_to_bytes(cfg->avg); in print_bytes_rate_xlate()
1238 bytes_to_cost(r & ~(units[i].thresh - 1)) == cfg->avg) in print_bytes_rate_xlate()
1355 print_packets_rate_xlate(xl, cfg->avg, revision); in hashlimit_mt_xlate()
1374 print_packets_rate_xlate(xl, info->cfg.avg, 1); in hashlimit_xlate()