RE: packet marking: only a ratio, not all

Linux Advanced Routing and Traffic Control

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

 



Hi Andy!

I haven't checked the iproute sources for that,
but maybe I was not clear:

What I need is not having ALL packets re-marked when
they are overlimit, or sent to any class, etc..

I want them to be remarked at a ratio. (eg. 2%)

And granularity is important, if I have to re-mark
with
a 20% ratio, I wish to remark every 5th, and not mark
20 continously at not mark other 80 continously.

(
Why I need this:
A protocol (RMD-QoS-NSLP) I want to implement has this
syntax to signal if a link is congested to some edge
nodes at the border of a domain.
)

Do you have a solution for this? I believe what you
suggested is not this, is it?

And I already found a 'somewhat' solution: 

filter actions

See my mail with subject: 
"action pass random determ/netrand reclassify
-value-": granularity problems

With:

tc filter add dev eth0 parent X protocol ip prio Y u32
match ip src 0/0 flowid Z action continue random
determ pass 5

I believe I am able to send every 5th package to class
Z (for remarking with dsmark) and the other 4/5 to the
next filter (with continue), which can send the packet
to the link.

This results in marking 20% of all the packets this
interface gets (via u32 match ip src 0/0).

Do you think this works? I still have not tried.
I believe "continue" gives the packet to the next
filter (order determined by filter command sequence)
and "pass" gives it to the "flowid Z".

Or, does "pass" actually sends the packet to the wire?


Thanks for the info,

Ferenc

--- Andy Furniss <andy.furniss@xxxxxxxxxxxxx> wrote:

> pfer wrote:
> > Hi all!
> >  
> >  In short: 
> >  
> >  Anybody wrote a patch for DSMARK to make it
> capable of marking
> >  only a ratio (a given arg to the tc command) of
> the packets it gets?
> >  Say, 20%? Or, do I have to hack into the source?
> Alternatives,
> >  like a filter spitting packets to 2 different
> DSMARK based on this ratio?
> >  
> >  In long:
> >  
> >  I'm a hungarian univ student involved in a
> project (RMD-QoS stuff)
> >  which needs the following:
> >  
> >   \                    This node has 3 ingress and
> 1 egress link, all have for ex. 10 Mbit
> >     \                  limit to their traffic.
> >       \
> >    ---  node -----  Suppose ingress traffic is: 8
> + 3 +5 = 16 while the egress
> >      /                 link will be congested with
> 10. Because this node is a simple,
> >    /                   intradomain router, we
> would like to notify the downstream 
> >  /                    edge node about this
> congestion, to tear down some of the flows
> >                       causing it. (Congestion
> occured via for. ex. a net failure)
> >  
> >  What the protocol (draft) says, is that the edge
> will be notified of the level of the congestion,
> which will be calculated by this proportional data
> packet marking method, to avoid additional
> signaling.
> >  Say, if 16 would go on a link with 10 capacity,
> congested core-node will mark
> >  60% of the packets it sends to the output of the
> link to another DSCP.
> >  
> >  I thought about DSMARK first, but that is
> incapable of doing this stuff.
> >  (or I think so :)
> >  Ideas?
> >  
> >  PS: I did not check the archives rigorously, so
> sorry if I am asking trivial things.
> >  
> >  PS2: Since I checked not to get mails from this
> list, please send your answer
> >  to forgamedev@xxxxxxxxxx
> 
> I am not sure I get the logic of what you are trying
> to do for this 
> paticular setup, but there are examples of using
> policers with meters 
> shared across ingress links to dsmark overlimits
> packets in the iproute2 
> sources.
> 
> Andy.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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