[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <30bfaab5-d4ba-e9bf-a4e4-f3058c71f517@6wind.com>
Date: Fri, 22 Sep 2017 10:39:31 +0200
From: Amine Kherbouche <amine.kherbouche@...nd.com>
To: Roopa Prabhu <roopa@...ulusnetworks.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, xeb@...l.ru,
David Lamparter <equinox@...c24.net>
Subject: Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation
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.
Powered by blists - more mailing lists