On 9/20/12 3:32 PM, "Mr Dash Four" <[email protected]> wrote:

>>> 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.

My God, you are an arrogant jackass! You totally overlooked this bit and
then you call me stupid!

@ -1886,7 +1957,6 @@
 
                $classids{$classid}=$devname;
 
-               my $priority = $tcref->{priority} << 8;
                my $parent   = in_hexp $tcref->{parent};
 
                emit ( "[ \$${dev}_mtu -gt $quantum ] &&
quantum=\$${dev}_mtu || quantum=$quantum" );
@@ -1945,22 +2015,23 @@
                # add filters
                #
                unless ( $mark eq '-' ) {
-                   emit "run_tc filter add dev $device protocol all
parent $devicenumber:0 prio " . ( $priority | 20 ) . " handle $mark fw
classid $classid" if $tcref->{occurs} == 1;
+                   emit "run_tc filter add dev $device protocol all
parent $devicenumber:0 prio $tcref->{markprio} handle $mark fw classid
$classid" if $tcref->{occurs} == 1;
                }
 
                emit "run_tc filter add dev $device protocol all prio 1
parent $sfqinhex: handle $classnum flow hash keys $tcref->{flow} divisor
1024" if $tcref->{flow};
                #
                # options
                #
-               emit( "run_tc filter add dev $device parent
$devicenumber:0 protocol ip prio " . ( $priority | 10 ) . ' u32' .
+               emit( "run_tc filter add dev $device parent
$devicenumber:0 protocol ip prio $tcref->{tcp_ack} u32" .
                      "\\\n    match ip protocol 6 0xff" .
                      "\\\n    match u8 0x05 0x0f at 0" .
                      "\\\n    match u16 0x0000 0xffc0 at 2" .
                      "\\\n    match u8 0x10 0xff at 33 flowid $classid" )
if $tcref->{tcp_ack};
 
                for my $tospair ( @{$tcref->{tos}} ) {
+                   ( $tospair, my $priority ) = split /:/, $tospair;
                    my ( $tos, $mask ) = split q(/), $tospair;
-                   emit "run_tc filter add dev $device parent
$devicenumber:0 protocol ip prio " . ( $priority | 10 ) . " u32 match ip
tos $tos $mask flowid $classid";
+                   emit "run_tc filter add dev $device parent
$devicenumber:0 protocol ip prio $priority u32 match ip tos $tos $mask
flowid $classid";
                }
 
                save_progress_message_short qq("   TC Class $classid
defined.");


Take your business somewhere else. I'm finished listening to you.

-Tom
You do not need a parachute to skydive. You only need a parachute to
skydive twice.





------------------------------------------------------------------------------
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