Thread (6 messages) flat view 6 messages, 2 authors, 2017-09-27

Re: [PATCH v3 1/1] ip_tunnel: add mpls over gre encapsulation

From: Roopa Prabhu <hidden>
Date: 2017-09-27 16:20:08

On Wed, Sep 27, 2017 at 9:08 AM, Amine Kherbouche
[off-list ref] wrote:

On 09/27/2017 05:36 PM, Roopa Prabhu wrote:
quoted
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 ?
I think its better to bring the patch back in.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help