mpls: move mpls_hdr to a common location

This will be also used by openvswitch.

Signed-off-by: Jiri Benc <[email protected]>
Acked-by: David Ahern <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Jiri Benc 2016-09-30 19:08:06 +02:00 • committed by David S. Miller
commit 9095e10edd
2 changed files with 10 additions and 9 deletions

View file

@ -1,9 +1,6 @@
#ifndef MPLS_INTERNAL_H
#define MPLS_INTERNAL_H
struct mpls_shim_hdr {
__be32 label_stack_entry;
};
#include <net/mpls.h>
struct mpls_entry_decoded {
u32 label;
@ -93,11 +90,6 @@ struct mpls_route { /* next hop label forwarding entry */
#define endfor_nexthops(rt) }
static inline struct mpls_shim_hdr *mpls_hdr(const struct sk_buff *skb)
{
return (struct mpls_shim_hdr *)skb_network_header(skb);
}
static inline struct mpls_shim_hdr mpls_entry_encode(u32 label, unsigned ttl, unsigned tc, bool bos)
{
struct mpls_shim_hdr result;