All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] tc filter priority
@ 2005-06-09 14:03 Glaucius Djalma Pereira Junior
  2005-06-09 14:49 ` Jody Shumaker
  2005-06-10  6:02 ` Dmytro O. Redchuk
  0 siblings, 2 replies; 3+ messages in thread
From: Glaucius Djalma Pereira Junior @ 2005-06-09 14:03 UTC (permalink / raw)
  To: lartc

hi all

friends

has tc filter an priority of rules , like iptables, let me explain it :

with iptables, when the packet find a rule to go, it doesnt see the
rest of rules, and how is the behavior of tc filter ??

see it :

one packet from 10.10.10.1:2421 going to 11.11.11.1:110  what rule
above it will be shaped ??

1 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
src 10.10.10.10 match ip dst 11.11.11.1 flowid 1:$RULE

2 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
src 10.10.10.1 match ip dport 110 0xffff flowid 1:$RULE

the rules were created in this order : 1 and after 2

what rule the packet will be shaped ?

best regards 


-- 
Glaucius Djalma Pereira Junior
glaucius@gmail.com
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] tc filter priority
  2005-06-09 14:03 [LARTC] tc filter priority Glaucius Djalma Pereira Junior
@ 2005-06-09 14:49 ` Jody Shumaker
  2005-06-10  6:02 ` Dmytro O. Redchuk
  1 sibling, 0 replies; 3+ messages in thread
From: Jody Shumaker @ 2005-06-09 14:49 UTC (permalink / raw)
  To: lartc

I'm unsure on the order, it might be based on when they were added. 
However if you really want to be sure one gets used before the other
then why don't you use different prio values? a filter with a lower
prio value will get processed before ones with a higher value. If you
want to guarentee one gets processed before another, then use prio as
that's its whole purpose.

- Jody

On 6/9/05, Glaucius Djalma Pereira Junior <glaucius@gmail.com> wrote:
> hi all
> 
> friends
> 
> has tc filter an priority of rules , like iptables, let me explain it :
> 
> with iptables, when the packet find a rule to go, it doesnt see the
> rest of rules, and how is the behavior of tc filter ??
> 
> see it :
> 
> one packet from 10.10.10.1:2421 going to 11.11.11.1:110  what rule
> above it will be shaped ??
> 
> 1 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> src 10.10.10.10 match ip dst 11.11.11.1 flowid 1:$RULE
> 
> 2 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> src 10.10.10.1 match ip dport 110 0xffff flowid 1:$RULE
> 
> the rules were created in this order : 1 and after 2
> 
> what rule the packet will be shaped ?
> 
> best regards
> 
> 
> --
> Glaucius Djalma Pereira Junior
> glaucius@gmail.com
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] tc filter priority
  2005-06-09 14:03 [LARTC] tc filter priority Glaucius Djalma Pereira Junior
  2005-06-09 14:49 ` Jody Shumaker
@ 2005-06-10  6:02 ` Dmytro O. Redchuk
  1 sibling, 0 replies; 3+ messages in thread
From: Dmytro O. Redchuk @ 2005-06-10  6:02 UTC (permalink / raw)
  To: lartc

On Thu, Jun 09, 2005 at 11:03:31AM -0300, Glaucius Djalma Pereira Junior wrote:
> see it :
> 
> one packet from 10.10.10.1:2421 going to 11.11.11.1:110  what rule
> above it will be shaped ??
> 
> 1 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> src 10.10.10.10 match ip dst 11.11.11.1 flowid 1:$RULE
> 
> 2 ) tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> src 10.10.10.1 match ip dport 110 0xffff flowid 1:$RULE
> 
> the rules were created in this order : 1 and after 2
> 
> what rule the packet will be shaped ?
I do believe that if you add filter by filter with the same prio to the same
parent -- they'll have sequential IDs (their "fh" in "tc filter show ..").
And I believe they will be passed (checked) ID by ID sequentially.

So, in the example above, first filter will filter the packet to 1:$RULE.


At least I relied upon that often and haven't been ashamed :-)

> 
> best regards 
> 
> 
> -- 
> Glaucius Djalma Pereira Junior
> glaucius@gmail.com

-- 
  _,-=._              /|_/|
  `-.}   `=._,.-=-._.,  @ @._,
     `._ _,-.   )      _,.-'
        `    G.m-"^m`m'        Dmytro O. Redchuk

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-10  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-09 14:03 [LARTC] tc filter priority Glaucius Djalma Pereira Junior
2005-06-09 14:49 ` Jody Shumaker
2005-06-10  6:02 ` Dmytro O. Redchuk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.