From: Amine Kherbouche <amine.kherbouche@6wind.com>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
xeb@mail.ru, David Lamparter <equinox@diac24.net>
Subject: Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation
Date: Fri, 22 Sep 2017 10:39:31 +0200 [thread overview]
Message-ID: <30bfaab5-d4ba-e9bf-a4e4-f3058c71f517@6wind.com> (raw)
In-Reply-To: <CAJieiUicOTaxeT4t-y6QzoPibi1i7WJ31X978OP6sqjMjVuVNw@mail.gmail.com>
On 09/22/2017 12:35 AM, Roopa Prabhu wrote:
>> > diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
>> > index 36ea2ad..060ed07 100644
>> > --- a/net/mpls/af_mpls.c
>> > +++ b/net/mpls/af_mpls.c
>> > @@ -16,6 +16,7 @@
>> > #include <net/arp.h>
>> > #include <net/ip_fib.h>
>> > #include <net/netevent.h>
>> > +#include <net/ip_tunnels.h>
>> > #include <net/netns/generic.h>
>> > #if IS_ENABLED(CONFIG_IPV6)
>> > #include <net/ipv6.h>
>> > @@ -39,6 +40,40 @@ static int one = 1;
>> > static int label_limit = (1 << 20) - 1;
>> > static int ttl_max = 255;
>> >
>> > +size_t ipgre_mpls_encap_hlen(struct ip_tunnel_encap *e)
>> > +{
>> > + return sizeof(struct mpls_shim_hdr);
>> > +}
>> > +
>> > +int ipgre_mpls_build_header(struct sk_buff *skb, struct ip_tunnel_encap *e,
>> > + u8 *protocol, struct flowi4 *fl4)
>> > +{
>> > + return 0;
>> > +}
>
> any reason you are supporting only rx ?
Tx path doesn't need changes, all gre hdr fields remain the same except
for the protocol type which is loaded from skb->protocol this last is
set by the mpls stack before entering gre device.
prev parent reply other threads:[~2017-09-22 8:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 9:25 [RFC PATCH 0/0] Introduce MPLS over GRE Amine Kherbouche
2017-09-21 9:25 ` [PATCH 1/2] mpls: expose stack entry function Amine Kherbouche
2017-09-21 9:25 ` [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation Amine Kherbouche
2017-09-21 21:25 ` Francois Romieu
2017-09-21 21:39 ` Amine Kherbouche
2017-09-21 22:35 ` Roopa Prabhu
2017-09-22 8:39 ` Amine Kherbouche [this message]
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=30bfaab5-d4ba-e9bf-a4e4-f3058c71f517@6wind.com \
--to=amine.kherbouche@6wind.com \
--cc=equinox@diac24.net \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=xeb@mail.ru \
/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