summaryrefslogtreecommitdiffstats
path: root/include/net/mpls.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-10-25 10:06:04 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-10-25 10:06:04 +0200
commit0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8 (patch)
tree71c906207227dd8753a0191db9304035ec3471a4 /include/net/mpls.h
parentdma-buf/fence: add an lockdep_assert_held() (diff)
parentMerge tag 'drm-intel-next-2016-10-24' of git://anongit.freedesktop.org/drm-in... (diff)
downloadlinux-0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8.tar.xz
linux-0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8.zip
Merge remote-tracking branch 'airlied/drm-next' into topic/drm-misc
Backmerge latest drm-next to have a baseline for the s/fence/dma_fence/ patch from Chris. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/net/mpls.h')
-rw-r--r--include/net/mpls.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/net/mpls.h b/include/net/mpls.h
index 5b3b5addfb08..1dbc669b770e 100644
--- a/include/net/mpls.h
+++ b/include/net/mpls.h
@@ -19,21 +19,18 @@
#define MPLS_HLEN 4
+struct mpls_shim_hdr {
+ __be32 label_stack_entry;
+};
+
static inline bool eth_p_mpls(__be16 eth_type)
{
return eth_type == htons(ETH_P_MPLS_UC) ||
eth_type == htons(ETH_P_MPLS_MC);
}
-/*
- * For non-MPLS skbs this will correspond to the network header.
- * For MPLS skbs it will be before the network_header as the MPLS
- * label stack lies between the end of the mac header and the network
- * header. That is, for MPLS skbs the end of the mac header
- * is the top of the MPLS label stack.
- */
-static inline unsigned char *skb_mpls_header(struct sk_buff *skb)
+static inline struct mpls_shim_hdr *mpls_hdr(const struct sk_buff *skb)
{
- return skb_mac_header(skb) + skb->mac_len;
+ return (struct mpls_shim_hdr *)skb_network_header(skb);
}
#endif