[mpls-linux-general] Re: Diffserv Instructions
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2002-02-18 21:12:47
|
Hello, I hope you don't mind, I've forwarded this to the list as well. On Tue, Feb 19, 2002 at 03:59:31AM +0800, ncc49a wrote: > Hi, > > I was looking at one of your earlier mails.. you mentioned that exp2tc translate EXP value from incoming label shim into a tc-index. Does that mean that it cannot be used for outgoing MPLS packets? Hmm... I am a little confused now... for an MPLS Linux edge router, traffic scheduling should be still based on the DSCP value or from the newly pushed header's EXP bit value (which is anyway derived from the DSCP value... hmm) Looking back at the kernel code in mpls_input.c and mpls_output.c I see that exp2tc is a valid insytuction for input and output packets. Looking at the kernel code in mpls_utils.c we can build and destroy the exp2tc data. Finally, looking at userland code in mplsadm.c I cannot see any reason why exp2tc can not be used for both input and output instructions. So it looks like I was wrong in writting that it cannot be used for out going packets. > Also, I was executing this command: > > mplsadm -v -I gen:21:0 -i exp2tc:1:2:3:4:pop:dlv > > There is an error saying "In Instr: No such device or address." But the mpls_in file seems to reflect the new incoming label as well as the exp to tc mappings... Did I miss out something here? The DLV command has changed. It is now dlv:<proto id>. I think it is a better idea to use 'peek'. 'peek' allows you to stack/fwd/link incoming LSPs without having to work about which one is the bottom. A 'peek' done on the bottom of stack is an equivalent of a dlv:0x0800. A 'peek' done on a non-botom of stack looks at the next label and starts executing the instructions for that label. Ofcourse the internals of it are tad bit more complicated, but you get the idea :-) Jim -- James R. Leu |