>> You introduced this <class priority> << 8 | XX malarkey with RC1,
>> which was released a couple of hours ago. Your test results and the
>> files you have attached in your previous post have used this
>> not-yet-released RC1 version of shorewall!
> 
> As I stated in my previous post, the 'malarkey' has been in the 
> Shorewall code for almost 3 years.
Oh yeah?

--- shorewall-4.5.8-Beta3/shorewall/Perl/Shorewall/Tc.pm        2012-09-09 
21:20:41.000000000 +0100
+++ shorewall-4.5.8-RC1/shorewall/Perl/Shorewall/Tc.pm  2012-09-13 
18:00:24.000000000 +0100
@@ -1109,11 +1121,25 @@
 
     my $tcref = $tcclasses{$device};
 
+    if ( $devref->{qdisc} eq 'htb' ) {
+       fatal_error "Invalid PRIO ($prio)" unless defined numeric_value $prio;
+    }
+
     my $markval = 0;
+    my $markprio;
 
     if ( $mark ne '-' ) {
        fatal_error "MARK may not be specified when TC_BITS=0" unless 
$config{TC_BITS};
 
+       ( $mark, my $priority ) = split/:/, $mark, 2;
+
+       if ( supplied $priority ) {
+           $markprio = validate_filter_priority( $priority, 'mark' );
+       } else {
+           fatal_error "Missing mark priority" if $prio eq '-';
+           $markprio =  ( $prio << 8 ) | 20; 
+       }
+
        $markval = numeric_value( $mark );
        fatal_error "Invalid MARK ($markval)" unless defined $markval;
 
@@ -1209,25 +1234,45 @@
 
     unless ( $options eq '-' ) {
        for my $option ( split_list1 "\L$options", 'option' ) {
-           my $optval = $tosoptions{$option};
+           my $priority;
+           my $optval;
+
+           ( $option, my $pri ) =  split /:/, $option, 2;
+
+           if ( $option =~ /^tos=(.+)/ || ( $optval = $tosoptions{$option} ) ) 
{
+
+               if ( supplied $pri ) {
+                   $priority = validate_filter_priority( $pri, 'mark' );
+               } else {
+                   fatal_error "Missing TOS priority" if $prio eq '-';
+                   $priority = ( $prio << 8 ) | 15;
+               }
 
            $option = "tos=$optval" if $optval;
+           } elsif ( supplied $pri ) {
+               $option = join ':', $option, $pri;
+           }
 
            if ( $option eq 'default' ) {
                fatal_error "Only one default class may be specified for device 
$device" if $devref->{default};
                fatal_error "The $option option is not valid with 'occurs" if 
$tcref->{occurs} > 1;
                $devref->{default} = $classnumber;
-           } elsif ( $option eq 'tcp-ack' ) {
+           } elsif ( $option =~ /tcp-ack(:(\d+|0x[0-0a-fA-F]))?$/ ) {
                fatal_error "The $option option is not valid with 'occurs" if 
$tcref->{occurs} > 1;
-               $tcref->{tcp_ack} = 1;
+               if ( $1 ) {
+                   $tcref->{tcp_ack} = validate_filter_priority( $2, 'tcp-ack' 
);
+               } else {
+                   fatal_error "Missing tcp-ack priority" if $prio eq '-';
+                   $tcref->{tcp_ack} =  ( $prio << 8 ) | 10;
+               }
            } elsif ( $option =~ /^tos=0x[0-9a-f]{2}$/ ) {
                fatal_error "The $option option is not valid with 'occurs" if 
$tcref->{occurs} > 1;
                ( undef, $option ) = split /=/, $option;
-               push @{$tcref->{tos}}, "$option/0xff";
+               push @{$tcref->{tos}}, "$option/0xff:$priority";
            } elsif ( $option =~ /^tos=0x[0-9a-f]{2}\/0x[0-9a-f]{2}$/ ) {
                fatal_error "The $option option is not valid with 'occurs" if 
$tcref->{occurs} > 1;
                ( undef, $option ) = split /=/, $option;
-               push @{$tcref->{tos}}, $option;
+               push @{$tcref->{tos}}, "$option:$priority";
            } elsif ( $option =~ /^flow=(.*)$/ ) {
                fatal_error "The 'flow' option is not allowed with 'pfifo'" if 
$tcref->{pfifo};
                fatal_error "The 'flow' option is not allowed with 'red'"   if 
$tcref->{red};

I may be older than you, but I am not as stupid.

> No your're not -- but you are prone to making strong statements about 
> things that you really know nothing about.
A bit like you then.

>> Also, you have used MARK - I don't use that. May be that is why I am
>> not getting any priorities set at all when I use HFSC?
> 
> That's correct (and you don't use 'tcp-ack' or 'tos*' options either).
Yes, I do.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to