Message ID | d34f8440be3e1d735c694c6899c5a8b14e9a70ea.1506590878.git.amine.kherbouche@6wind.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | Introduce MPLS over GRE | expand |
Le 28/09/2017 à 11:34, Amine Kherbouche a écrit : > Exporting mpls_forward() function to be able to be called from elsewhere > such as MPLSoverGRE in the next commit. I'm nitpicking, but the commit title is too generic. What about something like 'mpls: export mpls_forward()'? When parsing history, the user knows precisely what is done in the commit without openning it. Regards, Nicolas
From: Amine Kherbouche <amine.kherbouche@6wind.com> Date: Thu, 28 Sep 2017 11:34:19 +0200 > Exporting mpls_forward() function to be able to be called from elsewhere > such as MPLSoverGRE in the next commit. > > Signed-off-by: Amine Kherbouche <amine.kherbouche@6wind.com> > Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> You need to resubmit this series with this patch having a proper subsystem prefix in the Subject line, as pointed out by another reviewer. Thanks.
diff --git a/include/linux/mpls.h b/include/linux/mpls.h index 384fb22..b0579ab 100644 --- a/include/linux/mpls.h +++ b/include/linux/mpls.h @@ -2,10 +2,14 @@ #define _LINUX_MPLS_H #include <uapi/linux/mpls.h> +#include <linux/netdevice.h> #define MPLS_TTL_MASK (MPLS_LS_TTL_MASK >> MPLS_LS_TTL_SHIFT) #define MPLS_BOS_MASK (MPLS_LS_S_MASK >> MPLS_LS_S_SHIFT) #define MPLS_TC_MASK (MPLS_LS_TC_MASK >> MPLS_LS_TC_SHIFT) #define MPLS_LABEL_MASK (MPLS_LS_LABEL_MASK >> MPLS_LS_LABEL_SHIFT) +int mpls_forward(struct sk_buff *skb, struct net_device *dev, + struct packet_type *pt, struct net_device *orig_dev); + #endif /* _LINUX_MPLS_H */ diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index c5b9ce4..36ea2ad 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -307,8 +307,8 @@ static bool mpls_egress(struct net *net, struct mpls_route *rt, return success; } -static int mpls_forward(struct sk_buff *skb, struct net_device *dev, - struct packet_type *pt, struct net_device *orig_dev) +int mpls_forward(struct sk_buff *skb, struct net_device *dev, + struct packet_type *pt, struct net_device *orig_dev) { struct net *net = dev_net(dev); struct mpls_shim_hdr *hdr; @@ -442,6 +442,7 @@ static int mpls_forward(struct sk_buff *skb, struct net_device *dev, kfree_skb(skb); return NET_RX_DROP; } +EXPORT_SYMBOL(mpls_forward); static struct packet_type mpls_packet_type __read_mostly = { .type = cpu_to_be16(ETH_P_MPLS_UC),