Re: [mpls-linux-general] Looking for examples to test TC/DS/IPTABLE
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2001-12-18 23:02:00
|
Comments below .... On Tue, Dec 18, 2001 at 04:21:48PM +0100, Olivier Dugeon wrote: > Hi Jim, > > James R. Leu wrote: > > > I see the light now..... > > > > Last night I dug around the kernel and I now see why you think that > > netfilter is the best way for interacting with the ipv4 routing table. > > I will look more at your work and see how I can make it less MPLS specific. > > > > Right now I think I am going to add a new netlink. POST_ROUTING_SLOW. > > This will allow a netlink to modify the route cache entry. The result will > > be that the netlink code for this will only be run for the first packet > > in the "flow". The rest will hit the entry in the route cache and > > will be redirected to the MPLS layer. > > > > > Ok, i think it's a good way setup the process of the first packet. It's > that we do by hacking the rt_set_nexthop code. This function is call > only for the first packet of a flow (ie. the first ping packet). Then, > the entry are kept into the route cash a moment (so, stoping a ping and > start some time after a second ping, doesn't call another time > rt_set_nexthop because the route cash entry is still valid). > > What do you intend to do with this new POST_ROUTING_SLOW netlink ? -change the pmtu -use the some index on the skb to lookup the moi, attach it to the route cache entry -change rt->dst.output to be mpls_output This will require that everytime a moi is deleted, the route cache must be cleared. :-( What do you think of this? What should be done with skb that come through POST_ROUTING_SLOW but a moi could not be found? 1. I could drop it, then a route cache entry will not be created and next time a packet for this flow is seen it will be slow routed again giving another chance for a valid moi to be found. 2. I could let it pass and let it go via IP. Also subsequent packets for this flow will be fast routed, thus not given a chance to find valid moi. To get around this everytime a new moi is created the route cache could be cleared, thuis forcing packets to go through the slow path again. What do you suggest? Jim > - directly setup the route cash entry or > - setup mpls_index (or nfmark) ? > > > > Will this satisfy your hope of avoiding double lookups (for every packet > > except the first)? > > > Yes. > > Olivier > -- > FTR&D/DAC/CPN > Technopole Anticipa | mailto:Oli...@fr... > 2, Avenue Pierre Marzin | Phone: +(33) 2 96 05 28 80 > F-22307 LANNION | Fax: +(33) 2 96 05 18 52 -- James R. Leu jl...@mi... |