/*
 * Copyright (c) 2014 Nicira, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 */

#ifndef _NET_MPLS_H
#define _NET_MPLS_H 1

#include <linux/if_ether.h>
#include <linux/netdevice.h>

#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);
}

static inline struct mpls_shim_hdr *mpls_hdr(const struct sk_buff *skb)
{
	return (struct mpls_shim_hdr *)skb_network_header(skb);
}
#endif
28fcaadd259613f59db3c6d1c'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/trace/events/tlb.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/trace/events/tlb.h?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/trace/events/tlb.h?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/trace/events/tlb.h?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/trace/events/tlb.h'>
<input type='hidden' name='id' value='2b1d530cb3157f828fcaadd259613f59db3c6d1c'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/trace?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>trace</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/trace/events?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>events</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/trace/events/tlb.h?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c'>tlb.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/trace/events/tlb.h?id=2b1d530cb3157f828fcaadd259613f59db3c6d1c&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>