[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ce61dd3-293b-c26b-e173-3bdae4ba46a7@6wind.com>
Date: Wed, 27 Sep 2017 18:08:24 +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 v3 1/1] ip_tunnel: add mpls over gre encapsulation
On 09/27/2017 05:36 PM, Roopa Prabhu wrote:
> Amine, one small nit here.., if you define mpls_gre_rcv in gre header
> (like you had initially), you could do the below...
>
> #if IS_ENABLED(CONFIG_MPLS)
> mpls_gre_rcv()
> {
> /* real func */
> }
> #else
> mpls_gre_rcv()
> {
> kfree_skb(skb)
> return NET_RX_DROP
> }
> #endif
>
> and the check in gre_rcv() reduces to
>
> if (unlikely(tpi.proto == htons(ETH_P_MPLS_UC)))
> return mpls_gre_rcv(skb, hdr_len);
>
> Which looks much cleaner.
If I do that, do I have to add back the patch that export mpls_forward()
or just merge it with this one ?
Powered by blists - more mailing lists