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

Re: Cascade of classes + qdisc of DSMARK Class



Marco Fabiani wrote:
> In fact I'd like to mark the TOS of the incoming packets and then I'd
> like to classifier them according the TOS in order to force them to pass
> through some my particular qdiscs.

So you store the TOS in skb->tc_index, classify based on skb->tc_index
(using cls_tcindex), and set the TOS according to skb->tc_index when
leaving sch_dsmark.

If this sounds awkward: TOS aka DS field aka (well, almost) DSCP selects
a PHB. skb->tc_index selects a specific function of the PHB, e.g. if you
have an in-profile and an out-of-profile behaviour for a PHB, you don't
want to change the DSCP, but you still want a different behaviour.
Encoding this behaviour may need more bits than what you have in the DS
field (e.g. if you add the requirement that any DSCPs we don't handle
must not be changed), that's why you can't you just use the DS field
(besides, accessing the DS field is more expensive than accessing
skb->tc_index, which will matter when we start generating optimized
classifiers; see also
ftp://icaftp.epfl.ch/pub/people/almesber/slides/cadley.ps.gz, around
slide 12).

> Perhaps I can resolve the problem with a cascade of two qdisc: SCH_MARK + CBQ.
> But how can I set the cascade of two qdisc?

No, you can't do any classification after the packet has left sch_dsmark.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH           Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/