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.