diff options
| author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-04-09 14:44:43 -0500 | 
|---|---|---|
| committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-04-09 14:44:43 -0500 | 
| commit | 2437f45c1c6642d89f72c95b201b87081b7a5d0b (patch) | |
| tree | 0f012a872408cae83b1afbd554561438d1165a5a | |
| parent | e2da1de0e4d30cd713b35b5b3fc6a81e018a64ff (diff) | |
| parent | 6d342e39065a8e2dfda395d4e98021d7026c462a (diff) | |
| download | vyatta-cfg-qos-2437f45c1c6642d89f72c95b201b87081b7a5d0b.tar.gz vyatta-cfg-qos-2437f45c1c6642d89f72c95b201b87081b7a5d0b.zip | |
Merge branch 'glendale' of suva.vyatta.com:/git/vyatta-cfg-qos into glendale
| -rw-r--r-- | debian/changelog | 28 | ||||
| -rw-r--r-- | scripts/VyattaQosTrafficShaper.pm | 31 | 
2 files changed, 40 insertions, 19 deletions
| diff --git a/debian/changelog b/debian/changelog index 529f71e..ac759cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +vyatta-cfg-qos (0.4) unstable; urgency=low + +  3.0.2 +  [ Mark O'Brien ] + +  * 3.0.1 + +  [ Stephen Hemminger ] +  * Use uppercase when describing DSCP in help text +  * Better validation of numeric input +  * silence ethtool messages when auto bandwidth used +  * Wait for the eternal freeze to lift +  * More unfrozen stuff +  * More trivial stuff to wait for after freeze +  * Put back the spelling fixes. +  * Put back the bugfix for numeric input +  * Fix error messages from ethtool leaking out +  * bandwidth problems should be nonfatal +  * set ceiling on class + +  [ rbalocca ] +  * Fix debian dependencies +  * Set dependencies on either bash or vyatta-bash + +  [ Mark O'Brien ] + + -- Mark O'Brien <mobrien@vyatta.com>  Fri, 04 Apr 2008 18:00:24 -0700 +  vyatta-cfg-qos (0.3) unstable; urgency=low    VC4.0.1 diff --git a/scripts/VyattaQosTrafficShaper.pm b/scripts/VyattaQosTrafficShaper.pm index 8ecb6db..ef7bd7b 100644 --- a/scripts/VyattaQosTrafficShaper.pm +++ b/scripts/VyattaQosTrafficShaper.pm @@ -102,24 +102,21 @@      }      sub rateCheck { -	my ($self, $speed) = @_; -        my $rate = _getPercentRate($self->{_rate}, $speed); -	my $ceil = _getPercentRate($self->{_ceiling}, $speed); +	my ($self, $limit, $level) = @_; -	if ($rate > $speed) { -	    printf "policy bandwidth %dKbps < class bandwidth %dKbps\n", -	    	$speed / 1000, $rate / 1000; -	    return undef; +        my $rate = _getPercentRate($self->{_rate}, $limit); +	if ($rate > $limit) { +	    printf STDERR +		"Warning: $level\nbandwidth %dKbps > overall bandwidth %dKbps\n", +		$rate / 1000, $limit / 1000;  	} -	# create the class +	my $ceil = _getPercentRate($self->{_ceiling}, $limit);          if (defined $ceil && $ceil < $rate) { -	    printf "ceiling %dKbps < bandwidth %dKbps\n", +	    printf STDERR +		"Warning: $level\nceiling %dKbps < class bandwidth %dKbps\n",  	    	$ceil / 1000, $rate / 1000; -	    return undef;  	} - -	return !0;      }      sub prioQdisc { @@ -196,6 +193,7 @@  	printf ${out} "class add dev %s parent %x:1 classid %x:%x htb rate %s",  	    $dev, $parent, $parent, $self->{id}, $rate; +	print ${out} " ceil $self->{_ceiling}"  if ( defined $self->{_ceiling} );  	print ${out} " burst $self->{_burst}"   if ( defined $self->{_burst} );  	print ${out} " prio $self->{_priority}" if ( defined $self->{_priority} );  	print {$out} "\n"; @@ -317,15 +315,10 @@ sub commands {      my $default = shift @$classes;      my $maxid = 1; -    if (! $default->rateCheck($rate) ) { -	die "$self->{_level} default : invalid parameter\n"; -    } +    $default->rateCheck($rate, "$self->{_level} default");      foreach my $class (@$classes) { -	# rate constraints -	if (! $class->rateCheck($rate) ) { -	    die "$self->{_level} class $class->{id} : invalid parameter\n"; -	} +	$class->rateCheck($rate, "$self->{_level} class $class->{id}");  	# find largest class id  	if (defined $class->{id} && $class->{id} > $maxid) { | 
