* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
@ 2002-10-25 17:39 ` Werner Almesberger
2002-10-26 1:39 ` Folke Aeon
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Werner Almesberger @ 2002-10-25 17:39 UTC (permalink / raw)
To: lartc
Folke Aeon wrote:
> BUT my trouble is , since i also use have to
> direct all packets into mpls layer , i cannot
> do the dscp marking at the egress . because
> the mpls header is added at the step immediately
> after the packet passes through system routing
> table.
You can explicitly classify on the DSCP, i.e. without using
tcindex. If you need to explicitly skip the MPLS header,
you may use a construct like this:
field mpls_hdr = raw if meta_protocol = ETH_P_MPLS; /* or whatever */
field ip_hdr = mpls_hrd[4]; /* skip shim header */
...
do_whatever if ip_dscp = some_value;
...
> on the packet. i cannot setup proper filter
> based on the index value marked at the ingress.
> thought i still not quite sure whether it is
> because of the mpls header that influences my
> purpose,
That's odd, yes. If MPLS clears skb->tc_index, that would be
a bug.
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
2002-10-25 17:39 ` Werner Almesberger
@ 2002-10-26 1:39 ` Folke Aeon
2002-10-26 2:27 ` Folke Aeon
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Folke Aeon @ 2002-10-26 1:39 UTC (permalink / raw)
To: lartc
Thanks Werner, :)
i still want to know whether i can mark the
dscp at the ingress qdisc or not , for if i cannot
do this , then at the egress qdisc i still have
no dscp to use . :(
>From: Werner Almesberger <wa@almesberger.net>
>To: Folke Aeon <aeon_folke@hotmail.com>
>CC: Subject: Re: [LARTC] can anyone help me to solve this problem?
>Date: Fri, 25 Oct 2002 14:39:14 -0300
>
>Folke Aeon wrote:
> > BUT my trouble is , since i also use have to
> > direct all packets into mpls layer , i cannot
> > do the dscp marking at the egress . because
> > the mpls header is added at the step immediately
> > after the packet passes through system routing
> > table.
>
>You can explicitly classify on the DSCP, i.e. without using
>tcindex. If you need to explicitly skip the MPLS header,
>you may use a construct like this:
>
>field mpls_hdr = raw if meta_protocol = ETH_P_MPLS; /* or whatever */
>field ip_hdr = mpls_hrd[4]; /* skip shim header */
>
>...
> do_whatever if ip_dscp = some_value;
>...
>
> > on the packet. i cannot setup proper filter
> > based on the index value marked at the ingress.
> > thought i still not quite sure whether it is
> > because of the mpls header that influences my
> > purpose,
>
>That's odd, yes. If MPLS clears skb->tc_index, that would be
>a bug.
>
>- Werner
>
>--
>
>_________________________________________________________________________
> / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net
>/
>/_http://www.almesberger.net/____________________________________________/
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_________________________________________________________________
Unlimited Internet access for only $21.95/month. Try MSN!
http://resourcecenter.msn.com/access/plans/2monthsfree.asp
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
2002-10-25 17:39 ` Werner Almesberger
2002-10-26 1:39 ` Folke Aeon
@ 2002-10-26 2:27 ` Folke Aeon
2002-10-26 2:37 ` Werner Almesberger
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Folke Aeon @ 2002-10-26 2:27 UTC (permalink / raw)
To: lartc
>you may use a construct like this:
>
>field mpls_hdr = raw if meta_protocol = ETH_P_MPLS; /* or whatever */
>field ip_hdr = mpls_hrd[4]; /* skip shim header */
>
>...
> do_whatever if ip_dscp = some_value;
>...
well , would you please tell me where should i
add these ?
thanks :)
folke.
_________________________________________________________________
Get a speedy connection with MSN Broadband. Join now!
http://resourcecenter.msn.com/access/plans/freeactivation.asp
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (2 preceding siblings ...)
2002-10-26 2:27 ` Folke Aeon
@ 2002-10-26 2:37 ` Werner Almesberger
2002-10-26 3:34 ` Werner Almesberger
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Werner Almesberger @ 2002-10-26 2:37 UTC (permalink / raw)
To: lartc
Folke Aeon wrote:
> i still want to know whether i can mark the
> dscp at the ingress qdisc or not
No, you can't. You might be able to perform the same classification
at egress, though. If all else fails, you might be able to
accomplish some marking based on ingress decisions with IMQ.
(Well, or fix MPLS to preserve skb->tc_index.)
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (3 preceding siblings ...)
2002-10-26 2:37 ` Werner Almesberger
@ 2002-10-26 3:34 ` Werner Almesberger
2002-10-26 4:05 ` Folke Aeon
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Werner Almesberger @ 2002-10-26 3:34 UTC (permalink / raw)
To: lartc
Folke Aeon wrote:
> well , would you please tell me where should i
> add these ?
In your tcng configuration file. Of course, if you like things a
bit more cryptic, you can also try to do this with plain u32 :-)
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (4 preceding siblings ...)
2002-10-26 3:34 ` Werner Almesberger
@ 2002-10-26 4:05 ` Folke Aeon
2002-10-26 13:57 ` Folke Aeon
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Folke Aeon @ 2002-10-26 4:05 UTC (permalink / raw)
To: lartc
>Folke Aeon wrote:
> > i still want to know whether i can mark the
> > dscp at the ingress qdisc or not
>
>No, you can't. You might be able to perform the same classification
why not ? can't i port some of the dsmark functions to
the ingress qdisc to do this? for you see the following
will return the :1 as tcindex value , is that it?
tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: protocol ip prio 2 u32 \
match ip ....
flowid :1
then why can't i make to it return a value as the dscp value
and directly stores it into the TOS field in the ip header?
if this is possible, would you please give me some
instructions on how to achieve this?
>at egress, though. If all else fails, you might be able to
>accomplish some marking based on ingress decisions with IMQ.
can IMQ classify packets based on their RATE and BURST ?
if it cannot , then it wouldn't do any help to me . :(
>(Well, or fix MPLS to preserve skb->tc_index.)
to be frank i am not quite familiar with this stuff.
i just do everything according to the installation guide
shipped with the mpls-patch downloaded at sf.net/mpls-linux/ :(
_________________________________________________________________
Unlimited Internet access -- and 2 months free! Try MSN.
http://resourcecenter.msn.com/access/plans/2monthsfree.asp
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (5 preceding siblings ...)
2002-10-26 4:05 ` Folke Aeon
@ 2002-10-26 13:57 ` Folke Aeon
2002-10-26 16:37 ` Werner Almesberger
2002-10-26 16:49 ` Werner Almesberger
8 siblings, 0 replies; 10+ messages in thread
From: Folke Aeon @ 2002-10-26 13:57 UTC (permalink / raw)
To: lartc
hi , Werner :)
i do the following modification to the net/sched/sch_ingress.c
ingress_enqueue() function , i simply add the following lines
after the line 169: skb->tc_index = TC_H_MIN(res.classid);
if (skb->tc_index > 0xf || skb->tc_index = 0) {
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
ipv4_change_dsfield(skb->nh.iph,
0x3,skb->tc_index);
break;
case __constant_htons(ETH_P_IPV6):
ipv6_change_dsfield(skb->nh.ipv6h,
0x3,skb->tc_index);
break;
default:
break;
};
};
it works currently, but wonder whether there will be
any negative influence or not. would you please give
some comment on this ?
again , thanks for your precious time.
another thing, i noticed that since the dsmark dequeue
function does not support mpls protocol, so when a mpls
packet arrives, it complains "unsupported protocol".
Although the tcindex value is still there, it just cannot
use it . i think this is where the problem lies in.
folke.
_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (6 preceding siblings ...)
2002-10-26 13:57 ` Folke Aeon
@ 2002-10-26 16:37 ` Werner Almesberger
2002-10-26 16:49 ` Werner Almesberger
8 siblings, 0 replies; 10+ messages in thread
From: Werner Almesberger @ 2002-10-26 16:37 UTC (permalink / raw)
To: lartc
Folke Aeon wrote:
> can IMQ classify packets based on their RATE and BURST ?
> if it cannot , then it wouldn't do any help to me . :(
I haven't used IMQ myself, but I'd expect it to work with
policing, etc., like everywhere else, yes.
>>(Well, or fix MPLS to preserve skb->tc_index.)
>
> to be frank i am not quite familiar with this stuff.
> i just do everything according to the installation guide
> shipped with the mpls-patch downloaded at sf.net/mpls-linux/ :(
I suppose, on
http://lists.sourceforge.net/lists/listinfo/mpls-linux-general
they could help you, if you described the problem.
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LARTC] can anyone help me to solve this problem?
2002-10-25 15:04 [LARTC] can anyone help me to solve this problem? Folke Aeon
` (7 preceding siblings ...)
2002-10-26 16:37 ` Werner Almesberger
@ 2002-10-26 16:49 ` Werner Almesberger
8 siblings, 0 replies; 10+ messages in thread
From: Werner Almesberger @ 2002-10-26 16:49 UTC (permalink / raw)
To: lartc
Folke Aeon wrote:
> it works currently, but wonder whether there will be
> any negative influence or not. would you please give
> some comment on this ?
It should work. You just have to be aware that your kernel
is doing some odd things ...
> another thing, i noticed that since the dsmark dequeue
> function does not support mpls protocol, so when a mpls
> packet arrives, it complains "unsupported protocol".
Only if you try to change the DS field.
> Although the tcindex value is still there, it just cannot
> use it . i think this is where the problem lies in.
No. tc_index does not have to equal the DSCP or DS field.
In dsmark, tc_index is an index to a table with DS field
changes. All you need to do is to reserve a tc_index value
for non-IP traffic, and only mark IP traffic with other
values than that.
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread