Re: TC Hashing Filters

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Towarnyckyj wrote:
> 
> gypsy wrote:
> >Try setting classid to 0xffff and decrement rather than increment it.
> >
> >Pepper the script with
> >debug (print or echo) lines
> >error traps that exit the script on error.
> 
>         The error appears at step 6. For each modem in our database, it
> checks the IPs assigned to it. For each of those, it runs: tc filter add
> dev $dev protocol ip parent 1: u32 ht 2:$table: match ip dst $ip flowid
> 1:$classid

I think that "$classid" is outside its allowable range when that line
executes, although it is also possible that the RTNETLINK message is due
to an erroneous value in "$dev", "$ip" or "$table".

Your script can be modified to display the line with the substitutions
and to exit when executing causes an error.  What I envision is that
you'll watch 2000+ lines of good stuff scroll by and that the final line
will be your Bad Boy.  And the last few lines are what we all are
holding our breath to see <grin>.

> I added a counter in there and an exit command in the "Action"
> subroutine so that when the script errors, it exits and shows me how
> many IPs tc has added before it produced an error. The number was 2045
> and the error was RTNETLINK answers: File exists.

I still don't think it is how many.  I am certain that some value is
just not in the expected range.

>         As for your suggestion about the classid, I'm a bit confused as
> to what you mean about decrementing it. Could you be a little more
> specific on where this is in the script?
>         Action("$tc class add dev eth1 parent 1: classid 1:$classid cbq
> bandwidth 200Mbit rate $$dsrate{dsrate}Kbit allot 1514 prio 5 maxburst
> 20 avpkt 1000 bounded");
>         $rates{$ds} = $classid;
>         $classid++;
          
I think the line above should count down from 65535, not up.         

> ipid='$$computer{ipid}'");
>                 @octets = split(/\./,$ip);
>                 $table = $octets[3];
>                 $table = sprintf("%X", $table);
>                 $classid = $rates{$$modem{dsrate}};
>                 Action("$tc filter add dev $dev protocol ip parent 1:
> u32 ht 2:$table: match ip dst $ip flowid 1:$classid");  ### Here is
> where it errors after 2045 entries ###

And here is where you need to display the Action line.
Plus add an error trap to exit when it fails.

Sorry, that's all I have time for now.
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux