On Sat, Aug 26, 2000 at 10:52:30PM -0400, jamal wrote:
>
> Hi Jim,
>
> On Sat, 26 Aug 2000, James R. Leu wrote:
>
> > While figuring out how to get IP fragmentation to take into account the
> > label
> > stack on an outgoing LSP, I came across the code for ip_send() (in
> > net/ip.h).
> > I was disappointed to see that ip_send() doesn't use skb->dst->output.
> >
>
> ip_send() is actually in the data path of dst->input() which would be part
> of say an LERs path.
Correct, and the IP fragmentation calculation is done in ip_send(). But
instead of it refering to dst->output() (which in LER mode is set to
mpls_output()) it refers to ip_finish_output(). So I had to modify
ip_finish_output() to recognize skb's that need to be redirected to
mpls_output().
> All outgoing packets use dst->output() i.e no deviation.
> What are you trying to do? I think your code works fine (although its been
> a while since i'd seen it)
The "fix" I have made is to set dst->output() to ip_finish_output()
in ip_route_input_slow(). Then changed ip_send() to refer to dst->output().
So far it works well for normal IP forwarding and MPLS LER forwarding.
Unfortunaly I don't know how this will affect the other features of the IP
stack.
With the above fix the MPLS forwarding path only needs to modify the IPv4
stack in 3 files (fib_hash.c fib_result.c are modified to store label binding
in the FIB and route.c is modified to setup route cache entries that refer
to the MPLS stack.)
I can post a patch for the change I'm suggesting, I would like to get feedback
from others as to what this will break.
Jim
--
James R. Leu
|