From: David Lamparter <equinox@diac24.net>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: Amine Kherbouche <amine.kherbouche@6wind.com>,
David Lamparter <equinox@diac24.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/2] mpls: add handlers
Date: Tue, 15 Aug 2017 11:37:45 +0200 [thread overview]
Message-ID: <20170815093745.GC773745@eidolon> (raw)
In-Reply-To: <CAJieiUijsyWjzNL=oFaGxtuos367v0VrpSaEqwHvVacrk5hcTA@mail.gmail.com>
On Sat, Aug 12, 2017 at 08:29:18PM -0700, Roopa Prabhu wrote:
> On Sat, Aug 12, 2017 at 6:35 AM, Amine Kherbouche
> <amine.kherbouche@6wind.com> wrote:
> >
> >
> > On 11/08/2017 16:37, Roopa Prabhu wrote:
> >>
> >> On Fri, Aug 11, 2017 at 5:34 AM, David Lamparter <equinox@diac24.net>
> >> wrote:
> >>>
> >>> On Thu, Aug 10, 2017 at 10:28:36PM +0200, Amine Kherbouche wrote:
> >>>>
> >>>> Mpls handler allows creation/deletion of mpls routes without using
> >>>> rtnetlink. When an incoming mpls packet matches this route, the saved
> >>>> function handler is called.
> >>>
> >>> Since I originally authored this patch, I have come to believe that it
> >>> might be unneccessarily complicated. It is unlikely that a lot of
> >>> different "handlers" will exist here; the only things I can think of
> >>> are VPLS support and BIER-MPLS multicast replication. I'm not saying
> >>> it's a bad idea, but, well, this was in the README that I gave to 6WIND
> >>> with this code:
> >>>
> >>> ...
> >>
> >> yes, I would also prefer just exporting the functions and calling
> >> them directly instead of adding a
> >> handler layer. We can move to that later if it becomes necessary.
> >
> > I understand that the handler layer is an overhead (as said by David's
> > note), and I agree with the solution for exporting the mpls functions that
> > allows route creation/deletion, but how about forwarding the right mpls
> > packet to the right vpls device with the device ptr? I don't see
> > another way.
>
>
> hmm...ok, so you are adding a mpls route to get into vpls_rcv and you
> want this route to carry the vpls_rcv information. Ideally if you knew
> the route is pointing to a vpls device kind, you can directly call
> vpls_rcv.
> But, am not sure if a route is necessary here either.
>
> It just seems like the vpls device information is duplicated in the
> mpls route per vpls dev. Wondering if we can skip the route part and
> always do a lookup on vpls-id/label in mpls_rcv to send it to a
> vpls_rcv if there is a match. This will be the l2 handler for mpls.
I think the reverse is the better option, removing the vpls device
information and just going with the route table. My approach to this
would be to add a new netlink route attribute "RTA_VPLS" which
identifies the vpls device, is stored in the route table, and provides
the device ptr needed here.
(The control word config should also be on the route.)
My reason for thinking this is that the VPLS code needs exactly the same
information as does a normal MPLS route: it attaches to an incoming
label (decapsulating packets instead of forwarding them), and for TX it
does the same operation of looking up a nexthop (possibly with ECMP
support) and adding a label stack. The code should, in fact, probably
reuse the TX path.
This also fits both an 1:1 and 1:n model pretty well. Creating a VPLS
head-end netdevice doesn't even need any config. It'd just work like:
- ip link add name vpls123 type vpls
- ip -f mpls route add \
1234 \ # incoming label for decap
vpls vpls123 \ # new attr: VPLS device
as 2345 via inet 10.0.0.1 dev eth0 # outgoing label for encap
For a 1:n model, one would simply add multiple routes on the same vpls
device.
-David
next prev parent reply other threads:[~2017-08-15 9:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 20:28 [RFC PATCH 0/2] Support of VPLS MPLS Amine Kherbouche
2017-08-10 20:28 ` [PATCH 1/2] mpls: add handlers Amine Kherbouche
2017-08-11 12:34 ` David Lamparter
2017-08-11 14:37 ` Roopa Prabhu
2017-08-12 13:35 ` Amine Kherbouche
2017-08-13 3:29 ` Roopa Prabhu
2017-08-15 9:37 ` David Lamparter [this message]
2017-08-16 5:30 ` Roopa Prabhu
2017-08-16 10:24 ` Amine Kherbouche
2017-08-10 20:28 ` [PATCH 2/2] drivers: add vpls support Amine Kherbouche
2017-08-11 12:55 ` David Lamparter
2017-08-11 15:14 ` Roopa Prabhu
2017-08-12 13:40 ` Amine Kherbouche
2017-08-13 2:46 ` Roopa Prabhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170815093745.GC773745@eidolon \
--to=equinox@diac24.net \
--cc=amine.kherbouche@6wind.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).