From 7511fff6b92b981f80f2d05d55539dfd466b7e5b Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Sat, 8 Mar 2003 14:40:04 +0000 Subject: when complaining about a queue's abndwidth beeing to small (below the resolution we can handle), don't say it must be >6KB, the value actually depends on quite some factors, including interface MTU. Instead, calculate the real minimum value and show that. mpech@ did a good job in bugging me to fix that ;-) ok pb@ dhartmei@ cedric@ --- sbin/pfctl/pfctl_altq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c index a662b8c50d2..19049ee642d 100644 --- a/sbin/pfctl/pfctl_altq.c +++ b/sbin/pfctl/pfctl_altq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_altq.c,v 1.42 2003/03/06 12:50:40 henning Exp $ */ +/* $OpenBSD: pfctl_altq.c,v 1.43 2003/03/08 14:40:03 henning Exp $ */ /* * Copyright (C) 2002 @@ -436,7 +436,9 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq *pa) * (bandwidth < 6Kbps when max_pkt_size=1500) */ if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) - warnx("queue bandwidth must be larger than 6Kb"); + warnx("queue bandwidth must be larger than %s", + rate2str(ifnsPerByte * (double)opts->maxpktsize / + (double)INT_MAX * (double)pa->ifbandwidth)); fprintf(stderr, "cbq: queue %s is too slow!\n", pa->qname); nsPerByte = (double)(INT_MAX / opts->maxpktsize); -- cgit v1.2.3